Summary: LZMA compression utilities Name: xz Version: 5.0.0 Release: 1 License: LGPLv2+ Group: Applications/File Source0: http://tukaani.org/%{name}/%{name}-%{version}.tar.bz2 Source1: http://tukaani.org/%{name}/%{name}-%{version}.tar.bz2.sig Source2: liblzma.so.0-aix32 Source3: liblzma.so.0-aix64 Patch0: %{name}-%{version}-aix.patch URL: http://tukaani.org/%{name}/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make, gettext, pkg-config, bash Requires: %{name}-libs = %{version}-%{release} Requires: bash, gettext %description XZ Utils are an attempt to make LZMA compression easy to use on free (as in freedom) operating systems. This is achieved by providing tools and libraries which are similar to use than the equivalents of the most popular existing compression algorithms. LZMA is a general purpose compression algorithm designed by Igor Pavlov as part of 7-Zip. It provides high compression ratio while keeping the decompression speed fast. %package libs Summary: Libraries for decoding LZMA compression Group: System Environment/Libraries License: LGPLv2+ %description libs Libraries for decoding files compressed with LZMA or XZ utils. %package devel Summary: Devel libraries & headers for liblzma Group: Development/Libraries License: LGPLv2+ Requires: %{name}-libs = %{version}-%{release} Requires: pkg-config %description devel Devel libraries and headers for liblzma. %package lzma-compat Summary: Older LZMA format compatibility binaries Group: Development/Libraries # lz{grep,diff,more} are GPLv2+. Other binaries are LGPLv2+ License: GPLv2+ and LGPLv2+ Requires: %{name} = %{version}-%{release} Requires: gettext Obsoletes: lzma < 5 Provides: lzma = 5 %description lzma-compat The lzma-compat package contains compatibility links for older commands that deal with the older LZMA format. %prep %setup -q %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 %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="cc -qlanglvl=extc99 -qcpluscmt" export CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64" export CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64" # first build the 64-bit version export OBJECT_MODE=64 ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} cp src/liblzma/.libs/liblzma.so.5 . gmake distclean # now build the 32-bit version export OBJECT_MODE="32" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects /usr/bin/ar -X32_64 -q src/liblzma/.libs/liblzma.a ./liblzma.so.5 # Add the older 4.999.9 shared members for compatibility with older apps # (make sure they're set for LOADONLY with 'strip -e') cp %{SOURCE2} liblzma.so.0 /usr/bin/strip -X32 -e liblzma.so.0 /usr/bin/ar -X32 -q src/liblzma/.libs/liblzma.a liblzma.so.0 cp %{SOURCE3} liblzma.so.0 /usr/bin/strip -X64 -e liblzma.so.0 /usr/bin/ar -X64 -q src/liblzma/.libs/liblzma.a liblzma.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : rm -rf ${RPM_BUILD_ROOT}%{_docdir}/%{name} ( 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 README THANKS COPYING.* ChangeLog %{_bindir}/*xz* %{_mandir}/man1/*xz* /usr/bin/*xz* %files libs %defattr(-,root,system,-) %doc COPYING.* %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %doc doc/faq.txt doc/lzma-file-format.txt %doc doc/xz-file-format.txt doc/history.txt %{_includedir}/lzma* %{_libdir}/*.la %{_libdir}/pkgconfig/liblzma.pc /usr/include/* /usr/lib/*.la %files lzma-compat %defattr(-,root,system,-) %{_bindir}/*lz* %{_mandir}/man1/*lz* /usr/bin/*lz* %changelog * Wed Oct 27 2010 Michael Perzl - 5.0.0-1 - updated to version 5.0.0 * Thu Jul 01 2010 Michael Perzl - 4.999.9-1.1.beta.20091007git - removed dependency on gettext >= 0.17 * Mon Jan 11 2009 Michael Perzl - 4.999.9-0.1.beta.20091007git - first version for AIX V5.1 and higher