Upgraded lzip family
[dragora.git] / recipes / compressors / clzip / recipe
blobbe13b6e2b2891cb9d210ddecf3a1c673db4f221c
1 # Build recipe for clzip.
3 # Copyright (c) 2016-2019, 2022 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 # Exit immediately on any error
18 set -e
20 program=clzip
21 version=1.13
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=compressors
27 tarname=${program}-${version}.tar.gz
29 # Remote source(s)
30 fetch=https://download.savannah.gnu.org/releases/lzip/clzip/$tarname
32 description="
33 C version of the high-quality data compressor Lzip.
35 Clzip is a lossless data compressor with a user interface similar to
36 the one of gzip or bzip2.  Clzip is about as fast as gzip, compresses
37 most files more than bzip2, and is better than both from a data
38 recovery perspective.
40 Clzip uses the lzip file format; the files produced by clzip are fully
41 compatible with lzip-1.4 or newer, and can be rescued with lziprecover.
43 Clzip is in fact a C language version of lzip, intended for embedded
44 devices or systems lacking a C++ compiler.
47 homepage=https://lzip.nongnu.org/clzip.html
48 license=GPLv2+
50 # Source documentation
51 docs="AUTHORS COPYING ChangeLog NEWS README"
52 docsdir="${docdir}/${program}-${version}"
54 build()
56     unpack "${tardir}/$tarname"
58     cd "$srcdir"
60     # Set sane permissions
61     chmod -R u+w,go-w,a+rX-s .
63     ./configure CPPFLAGS="$QICPPFLAGS" \
64     CFLAGS="-Wall -W $QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
65      $configure_args \
66      --infodir=$infodir \
67      --mandir=$mandir \
68      --build="$(gcc -dumpmachine)"
70     make -j${jobs}
71     make -j${jobs} DESTDIR="$destdir" install
73     # Compress info documents and manual page
75     rm -f "${destdir}/${infodir}/dir";  # Redundancy
76     lzip -9 \
77      "${destdir}/${infodir}/clzip.info" \
78      "${destdir}/${mandir}/man1/clzip.1"
80     # Copy documentation
81     mkdir -p "${destdir}${docsdir}"
82     cp -p $docs "${destdir}${docsdir}"