Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.58 Release: 1 License: LGPLv2+ or MPLv1.1 Group: Applications/Archiving URL: http://zziplib.sourceforge.net/ Source0: http://dl.sf.net/%{name}/%{name}-%{version}.tar.bz2 Source1: zzip-32-config.h Source2: zzip-64-config.h Source3: zzip-config.h Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: zlib-devel, zip, python >= 2.6.2 BuildRequires: SDL-devel >= 1.2.13, file-devel, pkg-config, make Requires: zlib, SDL >= 1.2.13, file %description The zziplib library is intentionally lightweight, it offers the ability to easily extract data from files archived in a single zip file. Applications can bundle files into a single zip archive and access them. The implementation is based only on the (free) subset of compression with the zlib algorithm which is actually used by the zip/unzip tools. %package utils Summary: Utilities for the zziplib library Group: Applications/Archiving Requires: %{name} = %{version}-%{release} %description utils The zziplib library is intentionally lightweight, it offers the ability to easily extract data from files archived in a single zip file. Applications can bundle files into a single zip archive and access them. The implementation is based only on the (free) subset of compression with the zlib algorithm which is actually used by the zip/unzip tools. This packages contains all the utilities that come with the zziplib library. %package devel Summary: Development files for the zziplib library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config, zlib-devel, SDL-devel >= 1.2.13 %description devel The zziplib library is intentionally lightweight, it offers the ability to easily extract data from files archived in a single zip file. Applications can bundle files into a single zip archive and access them. The implementation is based only on the (free) subset of compression with the zlib algorithm which is actually used by the zip/unzip tools. This package contains files required to build applications that will use the zziplib library. %prep %setup -q %patch0 %build export CC="cc -qcpluscmt" # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-sdl # Disable _smp_mflags because docs fail to build (as of 0.13.49) gmake cp AIX.d/config.h . cp AIX.d/zzip/.libs/libzzip-0.so.13 . cp AIX.d/zzip/.libs/libzzipfseeko-0.so.13 . cp AIX.d/zzip/.libs/libzzipmmapped-0.so.13 . cp AIX.d/zzipwrap/.libs/libzzipwrap-0.so.13 . gmake distclean # now build the 32-bit version export OBJECT_MODE=32 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-sdl # Disable _smp_mflags because docs fail to build (as of 0.13.49) gmake # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X64 -q AIX.d/zzip/.libs/libzzip-0.a libzzip-0.so.13 /usr/bin/ar -X64 -q AIX.d/zzip/.libs/libzzipfseeko-0.a libzzipfseeko-0.so.13 /usr/bin/ar -X64 -q AIX.d/zzip/.libs/libzzipmmapped-0.a libzzipmmapped-0.so.13 /usr/bin/ar -X64 -q AIX.d/zzipwrap/.libs/libzzipwrap-0.a libzzipwrap-0.so.13 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # Overwrite the platform specific _config.h with our own modified common one rm -f %{RPM_BUILD_ROOT}%{_includedir}/zzip/_config.h cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_includedir}/zzip/_config-ppc32.h cp %{SOURCE2} ${RPM_BUILD_ROOT}%{_includedir}/zzip/_config-ppc64.h cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_includedir}/zzip/_config.h chmod 0644 ${RPM_BUILD_ROOT}%{_includedir}/zzip/_config*.h ( 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 docs/COPYING* ChangeLog README TODO %{_libdir}/*.a /usr/lib/*.a %files utils %defattr(-,root,system,-) %{_bindir}/* /usr/bin/* %files devel %defattr(-,root,system,-) %doc docs/README.SDL docs/*.htm %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/*.m4 %{_mandir}/man3/* /usr/include/* /usr/lib/*.la %changelog * Wed Dec 09 2009 Michael Perzl - 0.13.58-1 - first version for AIX V5.1 and higher