| 1 | #
|
|---|
| 2 | # spec file for package xz (Version 4.999.9beta)
|
|---|
| 3 | #
|
|---|
| 4 | # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|---|
| 5 | #
|
|---|
| 6 | # All modifications and additions to the file contributed by third parties
|
|---|
| 7 | # remain the property of their copyright owners, unless otherwise agreed
|
|---|
| 8 | # upon. The license for this file, and modifications and additions to the
|
|---|
| 9 | # file, is the same license as for the pristine package itself (unless the
|
|---|
| 10 | # license for the pristine package is not an Open Source License, in which
|
|---|
| 11 | # case the license is the MIT License). An "Open Source License" is a
|
|---|
| 12 | # license that conforms to the Open Source Definition (Version 1.9)
|
|---|
| 13 | # published by the Open Source Initiative.
|
|---|
| 14 |
|
|---|
| 15 | # Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|---|
| 16 | #
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | Name: xz
|
|---|
| 21 | Summary: A Program for Compressing Files
|
|---|
| 22 | Version: 4.999.9beta
|
|---|
| 23 | Release: 4%{?dist}
|
|---|
| 24 | Group: Productivity/Archiving/Compression
|
|---|
| 25 | License: LGPLv2.1+
|
|---|
| 26 | Url: http://tukaani.org/lzma/
|
|---|
| 27 |
|
|---|
| 28 | Source: %{name}-4.999.9beta.tar.bz2
|
|---|
| 29 | #Source2: baselibs.conf
|
|---|
| 30 |
|
|---|
| 31 | Patch0: %{name}-os2.diff
|
|---|
| 32 |
|
|---|
| 33 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|---|
| 34 | BuildRequires: pkgconfig
|
|---|
| 35 | Provides: lzma = %version
|
|---|
| 36 | Obsoletes: lzma < %version
|
|---|
| 37 | Requires: liblzma0 = %{version}
|
|---|
| 38 | # avoid bootstrapping problem
|
|---|
| 39 | %define _binary_payload w9.bzdio
|
|---|
| 40 |
|
|---|
| 41 | %description
|
|---|
| 42 | The xz command is a very powerful program for compressing files.
|
|---|
| 43 |
|
|---|
| 44 | * Average compression ratio of LZMA is about 30% better than that of
|
|---|
| 45 | gzip, and 15% better than that of bzip2.
|
|---|
| 46 |
|
|---|
| 47 | * Decompression speed is only little slower than that of gzip, being
|
|---|
| 48 | two to five times faster than bzip2.
|
|---|
| 49 |
|
|---|
| 50 | * In fast mode, compresses faster than bzip2 with a comparable
|
|---|
| 51 | compression ratio.
|
|---|
| 52 |
|
|---|
| 53 | * Achieving the best compression ratios takes four to even twelve
|
|---|
| 54 | times longer than with bzip2. However. this doesn't affect
|
|---|
| 55 | decompressing speed.
|
|---|
| 56 |
|
|---|
| 57 | * Very similar command line interface to what gzip and bzip2 have.
|
|---|
| 58 |
|
|---|
| 59 | %package -n liblzma0
|
|---|
| 60 | License: LGPLv2.1+
|
|---|
| 61 | Summary: LZMA library
|
|---|
| 62 | Group: System/Libraries
|
|---|
| 63 |
|
|---|
| 64 | %description -n liblzma0
|
|---|
| 65 | Library for encoding/decoding LZMA files.
|
|---|
| 66 |
|
|---|
| 67 | %package devel
|
|---|
| 68 | License: LGPLv2.1+
|
|---|
| 69 | Summary: Development package for the LZMA library
|
|---|
| 70 | Group: Development/Libraries/C and C++
|
|---|
| 71 | Requires: liblzma0 = %{version}
|
|---|
| 72 | Provides: lzma-devel = %version
|
|---|
| 73 | Obsoletes: lzma-devel < %version
|
|---|
| 74 | Provides: lzma-alpha-devel = %version
|
|---|
| 75 | Obsoletes: lzma-alpha-devel < %version
|
|---|
| 76 |
|
|---|
| 77 | %description devel
|
|---|
| 78 | This package contains the header files and libraries needed for
|
|---|
| 79 | compiling programs using the LZMA library.
|
|---|
| 80 |
|
|---|
| 81 | %prep
|
|---|
| 82 | %setup -q -n %{name}-4.999.9beta
|
|---|
| 83 | %patch0 -p1 -b .os2~
|
|---|
| 84 |
|
|---|
| 85 | %build
|
|---|
| 86 | #AUTOPOINT=true autoreconf -fi
|
|---|
| 87 | #configure --libdir=/%{_lib} --disable-static --with-pic --docdir=%_docdir/%name
|
|---|
| 88 |
|
|---|
| 89 | export CONFIG_SHELL="/bin/sh"
|
|---|
| 90 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 91 | export LIBS="-lurpo -lmmap -lpthread"
|
|---|
| 92 | %configure \
|
|---|
| 93 | --enable-shared --disable-static \
|
|---|
| 94 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 95 |
|
|---|
| 96 | make %{?_smp_mflags}
|
|---|
| 97 |
|
|---|
| 98 | #%check
|
|---|
| 99 | #LD_LIBRARY_PATH=$PWD/src/liblzma/.libs make check
|
|---|
| 100 |
|
|---|
| 101 | %install
|
|---|
| 102 | make install DESTDIR=$RPM_BUILD_ROOT
|
|---|
| 103 | #%{__mkdir_p} %{buildroot}%{_libdir}
|
|---|
| 104 | #%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/liblzma.so) %{buildroot}%{_libdir}/liblzma.so
|
|---|
| 105 | #%{__mv} -v %{buildroot}/%{_lib}/pkgconfig %{buildroot}%{_libdir}
|
|---|
| 106 | #%{__rm} -v %{buildroot}/%{_lib}/liblzma.{so,la}
|
|---|
| 107 | cp src/liblzma/*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 108 | cp src/liblzma/.libs/*.lib $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 109 | # fix exe installation
|
|---|
| 110 | cp src/lzmainfo/*.exe $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 111 | cp src/xz/*.exe $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 112 | cp src/xzdec/*.exe $RPM_BUILD_ROOT%{_bindir}
|
|---|
| 113 |
|
|---|
| 114 | %clean
|
|---|
| 115 | rm -fr $RPM_BUILD_ROOT
|
|---|
| 116 |
|
|---|
| 117 | #%post -n liblzma0 -p /sbin/ldconfig
|
|---|
| 118 |
|
|---|
| 119 | #%postun -n liblzma0 -p /sbin/ldconfig
|
|---|
| 120 |
|
|---|
| 121 | %files
|
|---|
| 122 | %defattr(-, root, root)
|
|---|
| 123 | %_docdir/%name
|
|---|
| 124 | %{_bindir}/*
|
|---|
| 125 | %{_mandir}/man?/*
|
|---|
| 126 |
|
|---|
| 127 | %files -n liblzma0
|
|---|
| 128 | %defattr(-, root, root)
|
|---|
| 129 | %{_libdir}/*.dll
|
|---|
| 130 |
|
|---|
| 131 | %files devel
|
|---|
| 132 | %defattr(-, root, root)
|
|---|
| 133 | %{_includedir}/*.h
|
|---|
| 134 | %{_includedir}/lzma
|
|---|
| 135 | %{_libdir}/*.a
|
|---|
| 136 | %{_libdir}/*.la
|
|---|
| 137 | %{_libdir}/*.lib
|
|---|
| 138 | %{_libdir}/pkgconfig/*.pc
|
|---|
| 139 |
|
|---|
| 140 | %changelog
|
|---|