Summary: SZIP - Science Data Lossless Compression library Name: szip Version: 2.1 Release: 1 License: free for non-commercial, scientific use only in HDF software Group: System/Libraries Source0: ftp://ftp.hdfgroup.org/lib-external/%{name}/%{version}/%{name}-%{version}.tar.gz URL: http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %define _libdir64 %{_prefix}/lib64 %description SZIP is an implementation of the extended-Rice lossless compression algorithm. The Consultative Committee on Space Data Systems (CCSDS) has adopted the extended-Rice algorithm for international standards for space applications. SZIP is reported to provide fast and effective compression, specifically for the EOS data generated by the NASA Earth Observatory System (EOS). It was originally developed at University of New Mexico (UNM) and integrated with HDF4 by UNM researchers and developers. %package devel Summary: Header files for SZIP library Group: Development/C Requires: %{name} = %{version}-%{release} %description devel Header files for SZIP library. %prep %setup -q mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --disable-static make %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libsz.a ${RPM_BUILD_ROOT}%{_libdir64}/libsz.so* ( cd ${RPM_BUILD_ROOT} for dir in include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/COPYING 32bit/RELEASE.txt %{_libdir}/lib*.a %{_libdir}/lib*.so* /usr/lib/lib*.a /usr/lib/lib*.so* %files devel %defattr(-,root,system) %{_includedir}/*.h %{_libdir}/*.la /usr/include/* /usr/lib/*.la %changelog * Sun Nov 27 2016 Michael Perzl - 2.1-1 - first version for AIX5L v5.1 and higher