recipes: use + to append C flags in order to preserve the current (mostly the warning...
[dragora.git] / recipes / compressors / plzip / recipe
blobde1b5d2ddf732eef0e4a4c86900f48f89a884ecf
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.
17 program=plzip
18 version=1.8
19 release=1
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/compressors"
24 tarname=${program}-${version}.tar.lz
26 # Remote source(s)
27 fetch=http://download.savannah.gnu.org/releases/lzip/plzip/$tarname
29 homepage=http://lzip.nongnu.org/plzip.html
30 license=GPLv2+
32 description="
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
50 full_pkgname=$program
52 # Source documentation
53 docs="AUTHORS COPYING ChangeLog NEWS README"
54 docsdir="${docdir}/${program}"
56 build()
58     set -e
60     unpack "${tardir}/$tarname"
62     cd "$srcdir"
64     # Set sane permissions
65     chmod -R u+w,go-w,a+rX-s .
67     ./configure CXXFLAGS+="$QICXXFLAGS" LDFLAGS="$QILDFLAGS -static" \
68      $configure_args \
69      --infodir=$infodir \
70      --mandir=$mandir \
71      --build="$(cc -dumpmachine)"
73     make -j${jobs}
74     make -j${jobs} DESTDIR="$destdir" install-as-lzip
76     # Compress info documents and manual page
78     rm -f "${destdir}/${infodir}/dir";  # Redundancy
79     lzip -9 \
80      "${destdir}/${infodir}/plzip.info" \
81      "${destdir}/${mandir}/man1/plzip.1"
83     # Make symlink for compatibility
84     ln -s plzip.1.lz "${destdir}/${mandir}/man1/lzip.1.lz"
86     # Copy documentation
87     mkdir -p "${destdir}${docsdir}"
88     cp -p $docs "${destdir}${docsdir}"