From c22e5bb704d1d41a27da0faaad28a4fa35cc4aef Mon Sep 17 00:00:00 2001 From: Emmanuel Bertin Date: Fri, 3 Jan 2020 01:10:41 +0100 Subject: [PATCH] Added support for RPM and DEB releases. Fixed building issues with Ubuntu Xenial. Fixed DEB parallel building issue. --- Makefile.am | 8 ++++---- configure.ac | 25 ++++++++++++++++++------- debian/changelog.in | 2 +- debian/rules | 14 ++++++++++---- sextractor.spec.in | 17 +++++++++-------- 5 files changed, 42 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index 08721db..3d19ad8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ # # This file part of: SExtractor # -# Copyright: (C) 2002-2017 IAP/CNRS/UPMC +# Copyright: (C) 2002-2018 IAP/CNRS/SorbonneU # # License: GNU General Public License # @@ -22,7 +22,7 @@ # You should have received a copy of the GNU General Public License # along with SExtractor. If not, see . # -# Last modified: 19/06/2017 +# Last modified: 24/08/2018 # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -55,11 +55,11 @@ deb: dist mkdir -p $(DEB_SRCDIR) tar -xvf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz -C $(DEB_SRCDIR) 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 mkdir -p $(DEB_SRCDIR) tar -xvf $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz -C $(DEB_SRCDIR) 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 diff --git a/configure.ac b/configure.ac index 7ff6cce..f58d2a8 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ # # This file part of: SExtractor # -# Copyright: (C) 2002-2018 IAP/CNRS/UPMC +# Copyright: (C) 2002-2018 IAP/CNRS/SorbonneU # # License: GNU General Public License # @@ -22,7 +22,7 @@ # You should have received a copy of the GNU General Public License # along with SExtractor. If not, see . # -# Last modified: 08/02/2018 +# Last modified: 24/08/2018 # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -30,8 +30,8 @@ define([AC_CACHE_LOAD],) define([AC_CACHE_SAVE],) -# This is your standard Bertin source code... -AC_INIT(SExtractor, 2.25.0,[astromatic@astromatic.net], +# This is your standard AstrOmatic source code... +AC_INIT(SExtractor, 2.25.1,[astromatic@astromatic.net], sextractor, [http://astromatic.net/software/sextractor]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(autoconf) @@ -50,14 +50,26 @@ AC_SUBST(DATE3, "$date3") # Include macros sinclude(acx_atlas.m4) +sinclude(acx_openblas.m4) sinclude(acx_fftw.m4) sinclude(acx_mkl.m4) sinclude(acx_prog_cc_optim.m4) sinclude(acx_pthread.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=], + [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 -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. AC_MSG_CHECKING([if compilation flags are set automatically]) @@ -91,7 +103,7 @@ AC_ARG_ENABLE(mkl, AC_LANG(C) AC_SEARCH_LIBS([strerror],[cposix]) -if test x$enable_auto_flags = xyes; then +if test "$enable_auto_flags" = "yes"; then CFLAGS="" LDFLAGS="" ACX_PROG_CC_OPTIM @@ -223,7 +235,6 @@ the executable as portable as possible (default = no)])], AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) - ################# Actions to complete in case of multhreading ################ AC_DEFINE_UNQUOTED(THREADS_NMAX, $n_pthreads,[Maximum number of POSIX threads]) if test "$use_pthreads" = "yes"; then diff --git a/debian/changelog.in b/debian/changelog.in index ac675ba..3b2c99a 100644 --- a/debian/changelog.in +++ b/debian/changelog.in @@ -1,4 +1,4 @@ -@PACKAGE_TARNAME@ (@PACKAGE_VERSION@-1) UNRELEASED; urgency=low +@PACKAGE_TARNAME@ (@PACKAGE_VERSION@-@PACKAGE_RELEASE@) UNRELEASED; urgency=low * Automatic Debian release. diff --git a/debian/rules b/debian/rules index 1c3327c..a4e2ad6 100755 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,7 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) -DEB_BUILD_OPTIONS = noddebs +DEB_BUILD_OPTIONS = noddebs parallel=4 %: dh $@ --parallel --with autoreconf @@ -16,21 +16,27 @@ ifeq ($(USE_BEST),1) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man \ --enable-icc --enable-mkl \ - --enable-auto-flags --enable-best-link + --enable-auto-flags --enable-best-link \ + --with-release=$(PACKAGE_RELEASE) else ifeq ($(USE_ICC),1) dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --mandir=\$${prefix}/share/man \ - --enable-icc + --enable-icc \ + --with-release=$(PACKAGE_RELEASE) + else dh_auto_configure -- --host=$(DEB_HOST_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 override_dh_installchangelogs: dh_installchangelogs ChangeLog +override_dh_auto_clean: diff --git a/sextractor.spec.in b/sextractor.spec.in index df5abf6..7586fc8 100644 --- a/sextractor.spec.in +++ b/sextractor.spec.in @@ -7,7 +7,7 @@ # # 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 # @@ -22,21 +22,22 @@ # You should have received a copy of the GNU General Public License # along with SExtractor. If not, see . # -# Last modified: 19/06/2017 +# Last modified: 24/08/2018 # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %define name @PACKAGE_TARNAME@ %define version @PACKAGE_VERSION@ -%define release 1%{?dist} +%define release @PACKAGE_RELEASE@%{?dist} +%define debug_package %{nil} %undefine _missing_build_ids_terminate_build Summary: Extract catalogs of sources from astronomical images Name: %{name} Version: %{version} Release: %{release} -Source0: ftp://ftp.iap.fr/pub/from_users/bertin/sextractor/%{name}-%{version}.tar.gz -URL: http://astromatic.net/software/%{name} +Source0: http://astromatic.net/download/%{name}/%{name}-%{version}.tar.gz +URL: http://astromatic.net/software/%{name}/ License: GPL v3+ Group: Sciences/Astronomy BuildRoot: %{_tmppath}/%{name}-buildroot @@ -52,11 +53,11 @@ Extract catalogs of sources from astronomical images %build 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 -%configure --enable-icc +%configure --enable-icc --with-release=@PACKAGE_RELEASE@ else -%configure +%configure --with-release=@PACKAGE_RELEASE@ fi make %{?_smp_mflags} -- GitLab