%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Summary: A file compression utility Name: lzlib Version: 1.11 %if %{p7build} Release: 1.p7 %else Release: 1 %endif License: BSD Group: Applications/File URL: http://www.nongnu.org/lzip/lzlib.html Source0: http://www.very-clever.com/download/nongnu/lzip/%{name}-%{version}.tar.gz Source1: http://www.very-clever.com/download/nongnu/lzip/%{name}-%{version}.tar.gz.sig Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %description The lzlib compression library provides in-memory LZMA compression and decompression functions, including integrity checking of the uncompressed data. The compressed data format used by the library is the lzip format. Compression/decompression is done by repeteadly calling a couple of read/write functions until all the data has been processed by the library. This interface is safer and less error prone than the traditional zlib interface. Lzlib will correctly decompress a data stream which is the concatenation of two or more compressed data streams. The result is the concatenation of the corresponding uncompressed data streams. Integrity testing of concatenated compressed data streams is also supported. All the library functions are thread safe. The library does not install any signal handler. The decoder checks the consistency of the compressed data, so the library should never crash even in case of corrupted input. Lzlib implements a simplified version of the LZMA (Lempel-Ziv-Markov chain-Algorithm) algorithm. The original LZMA algorithm was designed by Igor Pavlov. For a description of the LZMA algorithm, see the lzip manual. The library is available as 32-bit and 64-bit. %package devel Summary: Header files developing apps which will use bzip2 Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Header files of lzlib functions, for developing apps which will use the library. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "xlc_r -q64" or "gcc -maix64". %prep %setup -q %if %{p7build} %else %patch0 # fake a as AIX5L V5.1 and XLC/C++ V7 doesn't have one cat > stdbool.h << EOF #ifndef stdbool_h_wrapper #define stdbool_h_wrapper typedef enum {false = 0, true = 1} bool; #endif EOF %endif %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ %if %{p7build} CC=xlc_r CXX=xlC_r CFLAGS="-qarch=pwr7 -qtune=pwr7 -O3 -qstrict" CXXFLAGS="-qarch=pwr7 -qtune=pwr7 -O3 -qstrict" %else CC=xlc_r CXX=xlC_r CFLAGS="-O3 -qstrict" CXXFLAGS="-O3 -qstrict" %endif gmake liblz.a CreateExportList -X64 %{name}.exp liblz.a ${CXX} -qmkshrobj liblz.a -o shr64.o -bE:%{name}.exp rm -f %{name}.exp gmake clean # now build the 32-bit version export OBJECT_MODE=32 gmake liblz.a CreateExportList -X32 %{name}.exp liblz.a ${CXX} -qmkshrobj liblz.a -o shr.o -bE:%{name}.exp rm -f liblz.a ${AR} -rv liblz.a shr64.o shr.o # make minilzip rm -f minilzip gmake minilzip %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_libdir} mkdir -p ${RPM_BUILD_ROOT}%{_includedir} mkdir -p ${RPM_BUILD_ROOT}%{_infodir} cp minilzip ${RPM_BUILD_ROOT}%{_bindir} chmod 0755 ${RPM_BUILD_ROOT}%{_bindir}/* /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : cp liblz.a ${RPM_BUILD_ROOT}%{_libdir} chmod 0644 ${RPM_BUILD_ROOT}%{_libdir}/* cp %{name}.h ${RPM_BUILD_ROOT}%{_includedir} chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/* cp doc/%{name}.info ${RPM_BUILD_ROOT}%{_infodir} gzip --best ${RPM_BUILD_ROOT}%{_infodir}/* chmod 0644 ${RPM_BUILD_ROOT}%{_infodir}/* ( cd ${RPM_BUILD_ROOT} for dir in bin 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 AUTHORS COPYING ChangeLog INSTALL README %{_bindir}/* %{_libdir}/* %{_infodir}/* /usr/bin/* /usr/lib/* %files devel %defattr(-,root,system,-) %{_includedir}/* /usr/include/* %changelog * Mon Jan 14 2019 Michael Perzl - 1.11-1 - updated to version 1.11 * Tue Jun 12 2018 Michael Perzl - 1.10-1 - updated to version 1.10 * Thu Jun 01 2017 Michael Perzl - 1.9-1 - updated to version 1.9 * Wed Jun 22 2016 Michael Perzl - 1.8-1 - updated to version 1.8 * Fri Jan 01 2015 Michael Perzl - 1.7-1 - updated to version 1.7 * Mon Oct 13 2014 Michael Perzl - 1.6-1 - updated to version 1.6 * Wed Sep 25 2013 Michael Perzl - 1.5-1 - updated to version 1.5 * Sun Jun 02 2013 Michael Perzl - 1.4-1 - updated to version 1.4 * Mon Apr 09 2012 Michael Perzl - 1.3-1 - updated to version 1.3 * Thu Oct 27 2011 Michael Perzl - 1.2-1 - updated to version 1.2 * Tue Jan 04 2011 Michael Perzl - 1.1-1 - updated to version 1.1 * Wed May 12 2010 Michael Perzl - 1.0-1 - updated to version 1.0 * Fri Feb 19 2010 Michael Perzl - 0.9-1 - updated to version 0.9 * Tue Jan 19 2010 Michael Perzl - 0.8-1 - updated to version 0.8 * Tue Dec 15 2009 Michael Perzl - 0.7-1 - updated to version 0.7 * Thu Jul 09 2009 Michael Perzl - 0.5-1 - updated to version 0.5 * Wed Jul 08 2009 Michael Perzl - 0.4-1 - first version for AIX V5.1 and higher