File nifticlib.spec of Package nifticlib
Name: nifticlib
Summary: IO libraries for the NIfTI-1 data format
Version: 1.1.0
Release: 1
License: Public Domain
Group: Applications/Scientific
Source: %{name}-%{version}.tar.gz
Patch0: nifticlib-1.1.0-ecode.patch
URL: http://niftilib.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gcc-c++ zlib-devel cmake
%description
Nifticlib is a set of C i/o libraries for reading and writing files in
the nifti-1 data format. nifti-1 is a binary file format for storing
medical image data, e.g. magnetic resonance image (MRI) and functional
MRI (fMRI) brain images.
%package devel
Summary: Static libraries and header files for nifticlib development
Group: Development/Libraries
Requires: nifticlib = %{version}
%description devel
The nifticlib-devel package contains the header files and static libraries
necessary for developing programs that make use of the nifticlib library.
%prep
%setup -q
%patch0 -p1
%build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DNIFTI_INSTALL_INCLUDE_DIR=%{_prefix}/include/nifti .
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
## hack to get this to work for x86_64
%if "%{?_lib}" == "lib64"
mv $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/%{_libdir}
%endif
%post
ldconfig
%postun
ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README
%{_libdir}/*.so.*
%{_bindir}/*
#%{_datadir}/doc/*
%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/*
%changelog
* Sat Oct 4 2008 - Michael Hanke <michael.hanke@gmail.com> - 1.1.0-1
- Initial release. SPEC file based originally from Andy Loening <loening at alum dot mit dot edu>.