Summary: Lightweight library to easily extract data from zip files Name: zziplib Version: 0.13.59 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.14-3, file-devel, pkg-config, make Requires: zlib, SDL >= 1.2.14-3, file %define _libdir64 %{_prefix}/lib64 %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. The library is available as 32-bit and 64-bit. %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. 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 "gcc -maix64". %prep %setup -q %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build export CC="cc -qcpluscmt" 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} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-sdl # Disable _smp_mflags because docs fail to build (as of 0.13.49) gmake 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} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --enable-sdl # Disable _smp_mflags because docs fail to build (as of 0.13.49) gmake %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake install DESTDIR=${RPM_BUILD_ROOT} ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} /usr/bin/rm -f *.so* for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} /usr/bin/rm -f *.so* 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}/libzzip-0.a ${RPM_BUILD_ROOT}%{_libdir64}/libzzip-0.so.13 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libzzipfseeko-0.a ${RPM_BUILD_ROOT}%{_libdir64}/libzzipfseeko-0.so.13 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libzzipmmapped-0.a ${RPM_BUILD_ROOT}%{_libdir64}/libzzipmmapped-0.so.13 /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libzzipwrap-0.a ${RPM_BUILD_ROOT}%{_libdir64}/libzzipwrap-0.so.13 # 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 lib64 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/docs/COPYING* 32bit/ChangeLog 32bit/README 32bit/TODO %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files utils %defattr(-,root,system,-) %{_bindir}/* /usr/bin/* %files devel %defattr(-,root,system,-) %doc 32bit/docs/README.SDL 32bit/docs/*.htm %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc %{_datadir}/aclocal/*.m4 %{_mandir}/man3/* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Tue Dec 07 2010 Michael Perzl - 0.13.59-1 - updated to version 0.13.59, added RTL-style shared libraries * Wed Dec 09 2009 Michael Perzl - 0.13.58-1 - first version for AIX V5.1 and higher