%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Name: pdlzip Version: 1.7 %if %{p7build} Release: 1.p7 %else Release: 1 %endif Summary: Lossless Data Compressor based on the LZMA Algorithm Source0: http://mirrors.zerg.biz/nongnu/%{name}/%{name}-%{version}.tar.gz Source1: http://mirrors.zerg.biz/nongnu/%{name}/%{name}-%{version}.tar.gz.sig Patch0: %{name}-%{version}-aix.patch URL: http://www.nongnu.org/lzip/pdlzip.html Group: Productivity/Archiving/Compression License: Public Domain BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make %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 Pdlzip is a lossless data compressor based on the LZMA algorithm, with very safe integrity checking and a user interface similar to the one of gzip or bzip2. Pdlzip decompresses almost as fast as gzip and compresses better than bzip2, which makes it well suited for software distribution and data archiving. Pdlzip is also able to decompress legacy lzma-alone (.lzma) files. Pdlzip is a limited, public domain version of the lzip data compressor, intended for those who can't distribute GPL licensed Free Software. Pdlzip is written in C. Pdlzip uses public domain compression code from the LZMA SDK written by Igor Pavlov. %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 CC=xlc_r ./configure \ --prefix="%{_prefix}" \ CC="${CC}" \ CFLAGS="${CFLAGS}" \ CXX="${CXX}" \ CXXFLAGS="${CXXFLAGS}" gmake %install mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_infodir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 cp %{name} ${RPM_BUILD_ROOT}%{_bindir}/ chmod 0755 ${RPM_BUILD_ROOT}%{_bindir}/* /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : cp doc/%{name}.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/%{name}.1 chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man1/* mkdir -p ${RPM_BUILD_ROOT}/usr/bin cd ${RPM_BUILD_ROOT}/usr/bin ln -s ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS ChangeLog INSTALL NEWS README %{_bindir}/* %{_mandir}/man1/* /usr/bin/* %changelog * Wed Jun 22 2016 Michael Perzl - 1.7-1 - updated to version 1.7 * Thu Jul 16 2015 Michael Perzl - 1.6-1 - updated to version 1.6 * Wed Sep 25 2013 Michael Perzl - 1.5-1 - updated to version 1.5 * Tue May 28 2013 Michael Perzl - 1.4-1 - updated to version 1.4 * Sun Jan 08 2012 Michael Perzl - 1.3-1 - updated to version 1.3 * Mon Jan 02 2011 Michael Perzl - 1.2-1 - first version for AIX V5.1 and higher