File libcfitsio0.spec of Package libcfitsio0

#
# spec file for package libcfitsio0 (Version 3.09)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libcfitsio0
BuildRequires:  gcc-fortran
Url:            http://heasarc.nasa.gov/fitsio/fitsio.html
License:        GPL v2 only; Other uncritical OpenSource License
Group:          Development/Libraries/Other
AutoReqProv:    on
Version:        3.09
Release:        1
Summary:        A FITS File Subroutine Library
Source:         cfitsio3090.tar.bz2
Patch1:         cfitsio-3.09-makefile.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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 provides simple high-level routines for reading and
writing FITS files that insulate the programmer from the internal
complexities of the FITS format. CFITSIO also provides many advanced
features for manipulating and filtering the informationin FITS files.



%package -n libcfitsio-devel 
License:        GPL v2 only; Other uncritical OpenSource License
Group:          Development/Libraries/Other
Summary:        Headers required when building programs against cfitsio library
Requires:       %{name} = %{version}-%{release}                                       
Requires:       pkgconfig                                                             

%description -n libcfitsio-devel
Headers required when building programs against cfitsio library.



%package -n libcfitsio-doc
License:        GPL v2 only; Other uncritical OpenSource License
Group:          Development/Libraries/Other
Summary:        The documentation for FITS File Subroutine Library
Requires:       %{name} = %{version}-%{release}                                       

%description -n libcfitsio-doc
The documentation for FITS File Subroutine Library.



%prep
%setup -n cfitsio
%patch1

%build
export CC=gcc
export FC=f95
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure
make shared

%check
# testsuite
make testprog
./testprog > testprog.lis
diff testprog.lis testprog.out
cmp testprog.fit testprog.std ; echo $?

%install
mkdir -p $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}        
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
make LIBDIR=%{_lib} INCLUDEDIR=include/%{name} CFITSIO_LIB=$RPM_BUILD_ROOT%{_libdir} \
     CFITSIO_INCLUDE=$RPM_BUILD_ROOT%{_includedir}/%{name} install 
pushd $RPM_BUILD_ROOT%{_libdir}
ln -s libcfitsio.so.0 libcfitsio.so                                             
popd       
#   mkdir -p $RPM_BUILD_ROOT/usr/lib/pkgconfig
#mkdir -p $RPM_BUILD_ROOT/usr/include
# make DESTDIR=$RPM_BUILD_ROOT install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc License.txt README changes.txt
%{_libdir}/libcfitsio.so.*

%files -n libcfitsio-devel
%defattr(-,root,root)
/usr/include/%{name}
%{_libdir}/libcfitsio.a
%{_libdir}/libcfitsio.so
%{_libdir}/pkgconfig/cfitsio.pc

%files -n libcfitsio-doc
%defattr(-,root,root)
%doc cfitsio.doc cfitsio.ps cfortran.doc fitsio.doc fitsio.ps quick.ps 

%changelog
* Tue Aug 12 2008 lmichnovic@suse.cz
- update to version 3.09
  * added a clarification to the cfortran.doc file that cfortran.h
  may be used and distributed under the terms of the GNU Library
  General Public License.
  * many many bugfixes
- obsoletes strncat_overflow.patch
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Thu Nov 15 2007 lmichnovic@suse.cz
- switched to gcc-fortran in BuildRequires
* Mon Oct 15 2007 lmichnovic@suse.cz
- fixed buffer overflow using strncat
  (cfitsio-strncat_overflow.patch)
* Mon Oct 15 2007 lmichnovic@suse.cz
- update to version 3.06
  * modified the imcopy.c utility program (to tile-compress images)
  so that it writes the default EXTNAME = 'COMPRESSED_IMAGE'
  keyword in the compressed images, to preserve the behavior of
  earlier versions of imcopy.
  * modified the angsep function in the FITS calculator (in eval.y)
  to use haversines, instead of the 'law of cosines', to provide
  more precision at small angles (< 0.1 arcsec).
  * extensive changes to imcompress.c to fully support implicit
  data type conversion when reading and writing arrays of data
  to FITS images, where the data type of the array is not the
  same as the data type of the FITS image.  This includes
  support for null pixels, and data scaling via the BSCALE and
  BZERO keywords.
  * rewrote the fits_read_tbl_coord routine in wcssub.c, that gets
  the standard set of WCS keywords appropriate to a pair of
  columns in a table, to better support the full set of
  officially approved WCS keywords.
  * made significant changes to histo.c, which creates an image by
  binning columns of a table, to better translate the WCS
  keywords in the table header into the WCS keywords that are
  appropriate for an image HDU.
  * modified imcompress.c so that when pixels are written to a
  tile-compressed image, the appropriate BSCALE and BZERO values
  of that image are applied.  This fixes a bug in which writing
  to an unsigned integer datatype image (with BZERO = 32768) was
  not done correctly.
* Thu Jul 19 2007 lmichnovic@suse.cz
- split off doc subpackage
* Tue Jul 17 2007 lmichnovic@suse.cz
- initial version 3.04
  library package named libcfitsio0
openSUSE Build Service is sponsored by