| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- ##
- ## lzma.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_opkg 4.x
- %define V_lzmautils 4.999.3alpha
- %define V_sdk 459
- # package information
- Name: lzma
- Summary: Lempel-Ziv-Markov Algorithm (LZMA) Compression
- URL: http://tukaani.org/lzma/
- Vendor: Igor Pavlov, Lasse Collin
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: EVAL
- Group: Compression
- License: LGPL
- Version: %{V_opkg}
- Release: 20080813
- # list of sources
- Source0: http://tukaani.org/lzma/lzma-%{V_lzmautils}.tar.gz
- Source1: http://switch.dl.sourceforge.net/sevenzip/7z%{V_sdk}.tar.bz2
- Patch0: lzma.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, gcc::with_cxx = yes
- PreReq: OpenPKG, openpkg >= 20060823
- AutoReq: no
- AutoReqProv: no
- %description
- Simple command line implementation of LZMA compression algorithm.
- This tool uses raw LZMA format as opposed to 7z container format,
- which uses LZMA as the default compression algorithm, but has
- many additional features and a header incompatible to that of raw
- LZMA streams. If you need to create highly-compatible archives,
- you probably want to use p7zip(1). lzma(1) is taken from the LZMA
- SDK. Compression ratio is about 25-30% better than bzip2(1) and
- decompression speed is about two times faster. The downside is
- higher CPU and RAM requirements for compression.
- %track
- prog lzma:lzmautils = {
- version = %{V_lzmautils}
- url = http://tukaani.org/lzma/download
- regex = lzma-(__VER__)\.tar\.gz
- }
- prog lzma:sdk = {
- version = %{V_sdk}
- url = http://prdownloads.sourceforge.net/sevenzip/
- regex = 7z(__VER__)\.tar\.bz2
- }
- %prep
- %setup -q -c
- %setup -q -c -T -D -a 1
- %patch -p0 -d lzma-%{V_lzmautils}
- %build
- # build LZMA from LZMA Utils
- ( cd lzma-%{V_lzmautils}
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- ./configure \
- --prefix=%{l_prefix} \
- --mandir=%{l_prefix}/man \
- --without-libiconv-prefix \
- --without-libintl-prefix \
- --disable-nls \
- --disable-shared
- %{l_make} %{l_mflags}
- ) || exit $?
- # build LZMA from 7-Zip SDK
- ( cd CPP/7zip/Compress/LZMA_Alone
- %{l_make} %{l_mflags} -f makefile.gcc \
- CXX="%{l_cxx} %{l_cxxflags -O} -D_LZMA_SYSTEM_SIZE_T" \
- CXX_C="%{l_cc} %{l_cflags -O} -D_LZMA_SYSTEM_SIZE_T"
- ) || exit $?
- %install
- rm -rf $RPM_BUILD_ROOT
- # install LZMA from LZMA Utils
- ( cd lzma-%{V_lzmautils}
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
- ) || exit $?
- # install LZMA from 7-Zip SDK
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin
- %{l_shtool} install -c -s -m 755 \
- CPP/7zip/Compress/LZMA_Alone/lzma \
- $RPM_BUILD_ROOT%{l_prefix}/bin/lzma-7z
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|