Commit c22e5bb7 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Added support for RPM and DEB releases.

Fixed building issues with Ubuntu Xenial.
Fixed DEB parallel building issue.
parent 303bec5a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# This file part of: SExtractor # This file part of: SExtractor
# #
# Copyright: (C) 2002-2017 IAP/CNRS/UPMC # Copyright: (C) 2002-2018 IAP/CNRS/SorbonneU
# #
# License: GNU General Public License # License: GNU General Public License
# #
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>. # along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
# #
# Last modified: 19/06/2017 # Last modified: 24/08/2018
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -55,11 +55,11 @@ deb: dist ...@@ -55,11 +55,11 @@ deb: dist
mkdir -p $(DEB_SRCDIR) mkdir -p $(DEB_SRCDIR)
tar -xvf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz -C $(DEB_SRCDIR) tar -xvf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz -C $(DEB_SRCDIR)
cd $(DEB_SRCDIR)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) cd $(DEB_SRCDIR)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
debuild -j4 -b -us -uc debuild --set-envvar=PACKAGE_RELEASE=$(PACKAGE_RELEASE) -j4 -b -us -uc
deb-best: dist deb-best: dist
mkdir -p $(DEB_SRCDIR) mkdir -p $(DEB_SRCDIR)
tar -xvf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz -C $(DEB_SRCDIR) tar -xvf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz -C $(DEB_SRCDIR)
cd $(DEB_SRCDIR)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION) cd $(DEB_SRCDIR)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
debuild --set-envvar=USE_BEST=1 --preserve-env --preserve-envvar=PATH -j4 -b -us -uc debuild --set-envvar=PACKAGE_RELEASE=$(PACKAGE_RELEASE) --set-envvar=USE_BEST=1 --preserve-env --preserve-envvar=PATH -j4 -b -us -uc
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# This file part of: SExtractor # This file part of: SExtractor
# #
# Copyright: (C) 2002-2018 IAP/CNRS/UPMC # Copyright: (C) 2002-2018 IAP/CNRS/SorbonneU
# #
# License: GNU General Public License # License: GNU General Public License
# #
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>. # along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
# #
# Last modified: 08/02/2018 # Last modified: 24/08/2018
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
define([AC_CACHE_LOAD],) define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],) define([AC_CACHE_SAVE],)
# This is your standard Bertin source code... # This is your standard AstrOmatic source code...
AC_INIT(SExtractor, 2.25.0,[astromatic@astromatic.net], AC_INIT(SExtractor, 2.25.1,[astromatic@astromatic.net],
sextractor, [http://astromatic.net/software/sextractor]) sextractor, [http://astromatic.net/software/sextractor])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR(autoconf) AC_CONFIG_AUX_DIR(autoconf)
...@@ -50,14 +50,26 @@ AC_SUBST(DATE3, "$date3") ...@@ -50,14 +50,26 @@ AC_SUBST(DATE3, "$date3")
# Include macros # Include macros
sinclude(acx_atlas.m4) sinclude(acx_atlas.m4)
sinclude(acx_openblas.m4)
sinclude(acx_fftw.m4) sinclude(acx_fftw.m4)
sinclude(acx_mkl.m4) sinclude(acx_mkl.m4)
sinclude(acx_prog_cc_optim.m4) sinclude(acx_prog_cc_optim.m4)
sinclude(acx_pthread.m4) sinclude(acx_pthread.m4)
sinclude(acx_urbi_resolve_dir.m4) sinclude(acx_urbi_resolve_dir.m4)
# Provide a special option for setting the package release number
AC_ARG_WITH(release,
[AS_HELP_STRING([--with-release=<release number>],
[set the package release number (default = 1)])],
[],
[with_release="no"])
if test "$with_release" = "no"; then
with_release=1
fi
AC_SUBST(PACKAGE_RELEASE, "$with_release")
# Display pakage and version number # Display pakage and version number
AC_MSG_RESULT([******** Configuring: $PACKAGE_NAME $VERSION ($date) ********]) AC_MSG_RESULT([******** Configuring: $PACKAGE_NAME $PACKAGE_VERSION - $PACKAGE_RELEASE ($date) ********])
# Provide special option for choosing automatically the compilation flags. # Provide special option for choosing automatically the compilation flags.
AC_MSG_CHECKING([if compilation flags are set automatically]) AC_MSG_CHECKING([if compilation flags are set automatically])
...@@ -91,7 +103,7 @@ AC_ARG_ENABLE(mkl, ...@@ -91,7 +103,7 @@ AC_ARG_ENABLE(mkl,
AC_LANG(C) AC_LANG(C)
AC_SEARCH_LIBS([strerror],[cposix]) AC_SEARCH_LIBS([strerror],[cposix])
if test x$enable_auto_flags = xyes; then if test "$enable_auto_flags" = "yes"; then
CFLAGS="" CFLAGS=""
LDFLAGS="" LDFLAGS=""
ACX_PROG_CC_OPTIM ACX_PROG_CC_OPTIM
...@@ -223,7 +235,6 @@ the executable as portable as possible (default = no)])], ...@@ -223,7 +235,6 @@ the executable as portable as possible (default = no)])],
AC_MSG_RESULT([yes]), AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])) AC_MSG_RESULT([no]))
################# Actions to complete in case of multhreading ################ ################# Actions to complete in case of multhreading ################
AC_DEFINE_UNQUOTED(THREADS_NMAX, $n_pthreads,[Maximum number of POSIX threads]) AC_DEFINE_UNQUOTED(THREADS_NMAX, $n_pthreads,[Maximum number of POSIX threads])
if test "$use_pthreads" = "yes"; then if test "$use_pthreads" = "yes"; then
......
@PACKAGE_TARNAME@ (@PACKAGE_VERSION@-1) UNRELEASED; urgency=low @PACKAGE_TARNAME@ (@PACKAGE_VERSION@-@PACKAGE_RELEASE@) UNRELEASED; urgency=low
* Automatic Debian release. * Automatic Debian release.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_BUILD_OPTIONS = noddebs DEB_BUILD_OPTIONS = noddebs parallel=4
%: %:
dh $@ --parallel --with autoreconf dh $@ --parallel --with autoreconf
...@@ -16,21 +16,27 @@ ifeq ($(USE_BEST),1) ...@@ -16,21 +16,27 @@ ifeq ($(USE_BEST),1)
--build=$(DEB_BUILD_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man \ --prefix=/usr --mandir=\$${prefix}/share/man \
--enable-icc --enable-mkl \ --enable-icc --enable-mkl \
--enable-auto-flags --enable-best-link --enable-auto-flags --enable-best-link \
--with-release=$(PACKAGE_RELEASE)
else else
ifeq ($(USE_ICC),1) ifeq ($(USE_ICC),1)
dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \ dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man \ --prefix=/usr --mandir=\$${prefix}/share/man \
--enable-icc --enable-icc \
--with-release=$(PACKAGE_RELEASE)
else else
dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \ dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --mandir=\$${prefix}/share/man --prefix=/usr --mandir=\$${prefix}/share/man \
--with-release=$(PACKAGE_RELEASE)
endif endif
endif endif
override_dh_installchangelogs: override_dh_installchangelogs:
dh_installchangelogs ChangeLog dh_installchangelogs ChangeLog
override_dh_auto_clean:
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# This file part of: SExtractor # This file part of: SExtractor
# #
# Copyright: (C) 2002-2012 Emmanuel Bertin -- IAP/CNRS/UPMC # Copyright: (C) 2002-2018 IAP/CNRS/SorbonneU
# #
# License: GNU General Public License # License: GNU General Public License
# #
...@@ -22,21 +22,22 @@ ...@@ -22,21 +22,22 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with SExtractor. If not, see <http://www.gnu.org/licenses/>. # along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
# #
# Last modified: 19/06/2017 # Last modified: 24/08/2018
# #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%define name @PACKAGE_TARNAME@ %define name @PACKAGE_TARNAME@
%define version @PACKAGE_VERSION@ %define version @PACKAGE_VERSION@
%define release 1%{?dist} %define release @PACKAGE_RELEASE@%{?dist}
%define debug_package %{nil}
%undefine _missing_build_ids_terminate_build %undefine _missing_build_ids_terminate_build
Summary: Extract catalogs of sources from astronomical images Summary: Extract catalogs of sources from astronomical images
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}
Source0: ftp://ftp.iap.fr/pub/from_users/bertin/sextractor/%{name}-%{version}.tar.gz Source0: http://astromatic.net/download/%{name}/%{name}-%{version}.tar.gz
URL: http://astromatic.net/software/%{name} URL: http://astromatic.net/software/%{name}/
License: GPL v3+ License: GPL v3+
Group: Sciences/Astronomy Group: Sciences/Astronomy
BuildRoot: %{_tmppath}/%{name}-buildroot BuildRoot: %{_tmppath}/%{name}-buildroot
...@@ -52,11 +53,11 @@ Extract catalogs of sources from astronomical images ...@@ -52,11 +53,11 @@ Extract catalogs of sources from astronomical images
%build %build
if test "$USE_BEST"; then if test "$USE_BEST"; then
%configure --enable-mkl --enable-auto-flags --enable-best-link %configure --enable-mkl --enable-auto-flags --enable-best-link --with-release=@PACKAGE_RELEASE@
elif test "$USE_ICC"; then elif test "$USE_ICC"; then
%configure --enable-icc %configure --enable-icc --with-release=@PACKAGE_RELEASE@
else else
%configure %configure --with-release=@PACKAGE_RELEASE@
fi fi
make %{?_smp_mflags} make %{?_smp_mflags}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment