%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif Summary: A file compression and packaging utility compatible with PKZIP Name: zip Version: 3.0 %if %{p7build} Release: 3.p7 %else Release: 3 %endif License: BSD Group: Applications/Archiving Source0: http://ftp.info-zip.org/pub/infozip/src/zip30.tar.gz Patch0: %{name}-%{version}-aix.patch # Not upstreamed. Patch2: %{name}-%{version}-currdir.patch Patch5: %{name}-%{version}-format-security.patch Patch6: zipnote.patch URL: http://www.info-zip.org/pub/infozip/Zip.html BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch, tar %if %{p7build} BuildRequires: bzip2 >= 1.0.5-3 Requires: bzip2 >= 1.0.5-3 %else BuildRequires: bzip2 >= 1.0.2-4 Requires: bzip2 >= 1.0.2-4 %endif %description The zip program is a compression and file packaging utility. Zip is analogous to a combination of the UNIX tar and compress commands and is compatible with PKZIP (a compression and file packaging utility for MS-DOS systems). Install the zip package if you need to compress files using the zip program. %prep export PATH=/opt/freeware/bin:$PATH %setup -q -n %{name}30 %patch0 %patch2 -p1 -b .currdir %patch5 -p1 -b .format-security %patch6 -p1 -b .zipnote %build export LOCAL_ZIP="-I. -DUNIX -qmaxmem=-1 -O3 -qstrict -qarch=pwr7 -qtune=pwr7" \ make -f unix/Makefile \ prefix=%{_prefix} \ %if %{p7build} "CFLAGS=$CFLAGS -I. -DUNIX -qmaxmem=-1 -O3 -qstrict -qarch=pwr7 -qtune=pwr7" \ %else "CFLAGS=$CFLAGS -I. -DUNIX -qmaxmem=-1 -O3 -qstrict" \ %endif generic %{?_smp_mflags} %install mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BULD_ROOT}%{_mandir}/man1 make -f unix/Makefile prefix=${RPM_BUILD_ROOT}%{_prefix} \ MANDIR=${RPM_BUILD_ROOT}%{_mandir}/man1 install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc README CHANGES TODO WHATSNEW WHERE LICENSE README.CR %doc proginfo/algorith.txt %{_bindir}/* %{_mandir}/man1/* /usr/bin/* %changelog * Tue Jul 19 2016 Michael Perzl - 3.0-3 - rebuilt optimized version * Thu Jan 21 2016 Michael Perzl - 3.0-2 - incorporated all latest patches from Fedora * Tue Oct 14 2008 Michael Perzl - 3.0-1 - updated to version 3.0 * Mon Apr 21 2008 Michael Perzl - 2.32-1 - First version for AIX5L v5.1 and higher