%define sversion %(echo %version |sed -e 's#\\.##') %define major 0 %define libname %mklibname %{name} %{major} %define develname %mklibname %name -d %define develnamestatic %mklibname %name -d -s Summary: A library for accessing files in FITS format for C and Fortran Name: cfitsio Version: 3.310 Release: %mkrel 3 License: BSD-like Group: System/Libraries URL: http://heasarc.gsfc.nasa.gov/docs/software/fitsio/ Source: ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/%{name}%{sversion}.tar.gz #this patch adds to configure.in #1) major number "0" to the lib suffix name #2) extra linker flags: -Wl, -soname, libcfitsio.so.0 #which are necessary to trigger the rpmbuild automatic "Provides: #devel(libcfitsio)" Patch0: cfitsio-%{version}-majornum.patch #fix wrong version number in pc file Patch1: cfitsio-%{version}-pkgconfig.patch BuildRequires: sed BuildRequires: grep BuildRequires: bison BuildRequires: flex BuildRequires: gcc-gfortran BuildRequires: quadmath-devel BuildRequires: pkgconfig Requires: %{libname} = %{version}-%{release} %description Cfitsio is a library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format. Cfitsio simplifies the task of writing software that deals with FITS files by providing an easy to use set of high-level routines that insulate the programmer from the internal complexities of the FITS file format. At the same time, cfitsio provides many advanced features that have made it the most widely used FITS file programming interface in the astronomical community. %package -n %{libname} License: BSD-like Summary: A library for accessing files in FITS format for C and Fortran Group: System/Libraries Obsoletes: %{_lib}%{name} < 3.090 %description -n %{libname} This package contains the shared library required by programs that use the cfitsio library. %package -n %{develname} License: BSD-like Summary: Headers, libraries, & docs for the cfitsio library Group: System/Libraries Provides: fitsio-devel = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} Requires: %{libname} = %{version}-%{release} Conflicts: %{_lib}%{name} < 3.090 %description -n %{develname} This package contains the headers required for compiling software that uses the cfitsio library. %package -n %{develnamestatic} License: BSD-like Summary: Static development file for the cfitsio library Group: System/Libraries Requires: %{develname} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} Requires: pkgconfig Provides: lib%{name}-static-devel = %{version}-%{release} %description -n %{develnamestatic} This package contains the static files required for compiling software that uses the cfitsio library. %prep %setup -q -n %{name} %patch0 -p1 %patch1 -p1 %build autoreconf --force --install # (cjw) ssse3 is not standard on x86-64 so it cannot be enabled at compile time %configure2_5x \ %ifarch x86_64 --enable-sse2 \ %endif --enable-reentrant %make shared %make fpack %make funpack %make fitscopy %make imcopy %check make testprog LD_LIBRARY_PATH=. ./testprog > testprog.lis cmp -s testprog.lis testprog.out cmp -s testprog.fit testprog.std %install rm -fr %{buildroot} %makeinstall_std install -D -m755 fpack %{buildroot}%{_bindir}/fpack install -D -m755 funpack %{buildroot}%{_bindir}/funpack install -D -m755 fitscopy %{buildroot}%{_bindir}/fitscopy install -D -m755 imcopy %{buildroot}%{_bindir}/imcopy pushd %{buildroot}%{_libdir} ln -s lib%{name}.so.%{major} lib%{name}.so popd %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{_bindir}/* %files -n %{libname} %defattr(-,root,root) %doc README %{_libdir}/*.so.%{major}* %files -n %{develname} %defattr(-,root,root) %{_libdir}/*.so %{_includedir}/* %{_libdir}/pkgconfig/* %files -n %{develnamestatic} %defattr(-,root,root) %{_libdir}/*.a %changelog * Fri Jan 11 2013 cjw <cjw> 3.310-3.mga3 + Revision: 348386 - do not enable ssse3 on x86-64 since not all cpus support it * Fri Jan 11 2013 umeabot <umeabot> 3.310-2.mga3 + Revision: 347575 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Aug 22 2012 eatdirt <eatdirt> 3.310-1.mga3 + Revision: 283177 - Upgrade to version 3.310 * Tue Jul 10 2012 eatdirt <eatdirt> 3.300-2.mga3 + Revision: 269251 - Fixes missing linker option, cleaning specfile * Mon Jul 09 2012 eatdirt <eatdirt> 3.300-1.mga3 + Revision: 269112 - Upgrade to version 3.300, cleaning specfile * Thu Dec 15 2011 fwang <fwang> 3.290-1.mga2 + Revision: 181680 - update patch - new version 3.290 * Tue Jun 28 2011 fwang <fwang> 3.280-1.mga2 + Revision: 115161 - new version 3.280 * Sat Jan 22 2011 ahmad <ahmad> 3.250-2.mga1 + Revision: 33112 - drop old/unneeded scriptlets - imported package cfitsio