recipes: compressors/xz: Upgraded to version 5.6.2
[dragora.git] / recipes / libs / lzlib / recipe
blob0744169ac10addec2090df124e228acac7f59c30
1 # Build recipe for lzlib.
3 # Copyright (c) 2017-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=lzlib
21 version=1.13
22 release=1
24 # Define a category for the output of the package name
25 pkgcategory=libs
27 tarname=${program}-${version}.tar.lz
29 # Remote source(s)
30 fetch=https://download.savannah.gnu.org/releases/lzip/lzlib/$tarname
32 homepage=https://lzip.nongnu.org/lzlib.html
33 license=GPLv2+
35 description="
36 A data compression library for the lzip format.
38 Lzlib is a data compression library providing in-memory LZMA
39 compression and decompression functions, including integrity checking
40 of the decompressed data.  The compressed data format used by the
41 library is the lzip format.  Lzlib is written in C.
43 For more information, visit: $homepage
46 # Source documentation
47 docs="AUTHORS COPYING ChangeLog NEWS README"
48 docsdir="${docdir}/${program}-${version}"
50 build()
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
56     # Set sane permissions
57     chmod -R u+w,go-w,a+rX-s .
59     ./configure CPPFLAGS="$QICPPFLAGS" \
60     CFLAGS="-Wall -W $QICFLAGS -O3" LDFLAGS="$QILDFLAGS" \
61      $configure_args \
62      --libdir=/usr/lib${libSuffix} \
63      --infodir=$infodir \
64      --mandir=$mandir \
65      --enable-shared \
66      --disable-ldconfig \
67      --build="$(gcc -dumpmachine)"
69     make -j${jobs}
70     make -j${jobs} DESTDIR="$destdir" install
71     make -j${jobs} DESTDIR="$destdir" install-bin;      # Install "minilzip".
73     # Compress texinfo documents
75     rm -f "${destdir}/${infodir}/dir";                  # Redundancy.
76     lzip -9 "${destdir}/${infodir}/lzlib.info"
78     # Copy documentation
79     mkdir -p "${destdir}/$docsdir"
80     cp -p $docs "${destdir}/$docsdir"