diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..757104b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sextractor-2.28.2.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index f627a18..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: sextractor -# $Id$ -NAME := sextractor -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sextractor-format-sec.patch b/sextractor-format-sec.patch new file mode 100644 index 0000000..99dcead --- /dev/null +++ b/sextractor-format-sec.patch @@ -0,0 +1,65 @@ +diff -ur sextractor-2.19.5/src/catout.c sextractor-2.19.5.prep/src/catout.c +--- sextractor-2.19.5/src/catout.c 2013-09-12 14:35:37.000000000 +0200 ++++ sextractor-2.19.5.prep/src/catout.c 2014-03-26 18:25:06.390874672 +0100 +@@ -999,7 +999,7 @@ + break; + + case ASCII_SKYCAT: +- fprintf(ascfile, skycattail); ++ fprintf(ascfile, "%s", skycattail); + if (!prefs.pipe_flag) + fclose(ascfile); + break; +diff -ur sextractor-2.19.5/src/xml.c sextractor-2.19.5.prep/src/xml.c +--- sextractor-2.19.5/src/xml.c 2013-04-27 15:22:23.000000000 +0200 ++++ sextractor-2.19.5.prep/src/xml.c 2014-03-26 18:29:36.122059320 +0100 +@@ -696,7 +696,7 @@ + name, ucd); + break; + case P_STRING: +- sprintf(value, (char *)key[i].ptr); ++ sprintf(value, "%s", (char *)key[i].ptr); + fprintf(file, " \n", + name, ucd, *value? value: " "); +@@ -705,13 +705,13 @@ + n = *(key[i].nlistptr); + if (n) + { +- sprintf(value, ((char **)key[i].ptr)[0]); ++ sprintf(value, "%s", ((char **)key[i].ptr)[0]); + fprintf(file, " \n"); +@@ -722,7 +722,7 @@ + name, ucd); + break; + case P_KEY: +- sprintf(value, key[i].keylist[*((int *)key[i].ptr)]); ++ sprintf(value, "%s", key[i].keylist[*((int *)key[i].ptr)]); + fprintf(file, " \n", + name, ucd, value); +@@ -731,13 +731,13 @@ + n = *(key[i].nlistptr); + if (n) + { +- sprintf(value, key[i].keylist[((int *)key[i].ptr)[0]]); ++ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[0]]); + fprintf(file, " \n"); diff --git a/sextractor.spec b/sextractor.spec new file mode 100644 index 0000000..77b33e6 --- /dev/null +++ b/sextractor.spec @@ -0,0 +1,49 @@ +Name: sextractor +Version: 2.28.2 +Release: %autorelease +Summary: Extract catalogs of sources from astronomical images + +# Automatically converted from old format: GPLv3+ - review is highly recommended. +License: GPL-3.0-or-later +URL: http://astromatic.iap.fr/software/%{name} +Source0: https://github.com/astromatic/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: sextractor-format-sec.patch + +BuildRequires: make +BuildRequires: gcc +BuildRequires: automake autoconf libtool +BuildRequires: fftw-devel >= 3.1 +BuildRequires: openblas-devel +BuildRequires: cfitsio-devel + +%description +SExtractor is a program that builds a catalogue of objects from an +astronomical image. Although it is particularly oriented towards +reduction of large scale galaxy-survey data, it performs rather +well on moderately crowded star fields. + +%prep +%setup -q +%patch -P0 -p1 +sh ./autogen.sh + +%build +%configure --enable-openblas +make %{?_smp_mflags} + +%install +make DESTDIR=%{buildroot} install +mkdir -p %{buildroot}%{_datadir}/%{name} +install -m 644 -p config/*.conv %{buildroot}%{_datadir}/%{name} +install -m 644 -p config/default.nnw %{buildroot}%{_datadir}/%{name} + +%files +%doc AUTHORS BUGS COPYRIGHT HISTORY README.md THANKS config/default.sex config/default.param config/README +%license LICENSE +%{_bindir}/* +%{_mandir}/man1/* +%{_mandir}/manx/* +%{_datadir}/%{name}/ + +%changelog +%autochangelog diff --git a/sources b/sources index e69de29..32e1aac 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (sextractor-2.28.2.tar.gz) = f54b9e69944e582c68769c0d01534fc437f03fa5fc9dcb59bc680baed429983ebaa4c2422570b0f424b25c6c44cdf54a6587819ab2bc524aa33ed5c9f2595e62