1 # Build recipe for plzip.
3 # Copyright (c) 2017-2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/compressors"
24 tarname=${program}-${version}.tar.lz
27 fetch=http://download.savannah.gnu.org/releases/lzip/plzip/$tarname
29 homepage=http://lzip.nongnu.org/plzip.html
33 A massively parallel lossless data compressor.
35 Plzip is a massively parallel (multi-threaded) lossless data compressor
36 based on the lzlib compression library, with a user interface similar
37 to the one of lzip, bzip2 or gzip.
39 Plzip can compress/decompress large files on multiprocessor machines
40 much faster than lzip, at the cost of a slightly reduced compression
41 ratio (0.4 to 2 percent larger compressed files). Note that the number
42 of usable threads is limited by file size; on files larger than a
43 few GB plzip can use hundreds of processors, but on files of only a
44 few MB plzip is no faster than lzip.
46 Plzip is the default version of Lzip used in Dragora as the main 'lzip'.
49 # Limit package name to the program name
52 # Source documentation
53 docs="AUTHORS COPYING ChangeLog NEWS README"
54 docsdir="${docdir}/${program}"
60 unpack "${tardir}/$tarname"
64 # Set sane permissions
65 chmod -R u+w,go-w,a+rX-s .
67 ./configure CXXFLAGS="$QICXXFLAGS -Wall -W" \
68 LDFLAGS="$QILDFLAGS -static" \
72 --build="$(cc -dumpmachine)"
75 make -j${jobs} DESTDIR="$destdir" install-as-lzip
77 # Compress info documents and manual page
79 rm -f "${destdir}/${infodir}/dir"; # Redundancy
81 "${destdir}/${infodir}/plzip.info" \
82 "${destdir}/${mandir}/man1/plzip.1"
84 # Make symlink for compatibility
85 ln -s plzip.1.lz "${destdir}/${mandir}/man1/lzip.1.lz"
88 mkdir -p "${destdir}${docsdir}"
89 cp -p $docs "${destdir}${docsdir}"