stages/*: change license to Apache 2.0
[dragora.git] / recipes / libs / libz / recipe
blob9537812339d2cbaf52571a55d88b2cdc78c14012
1 # Build recipe for libz.
3 # Copyright (c) 2016-2017 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=libz
18 version=1.2.8.2015.12.26
19 release=1
21 pkgversion=1.2.8
23 tarname=${program}-${version}.tar.gz
25 # Remote source(s)
26 fetch=http://sortix.org/libz/release/libz-1.2.8.2015.12.26.tar.gz
28 description="
29 A general purpose data compression library.
31 libz is a general purpose data compression library.  The data format
32 used by libz is described by RFC 1950 (zlib format), RFC 1951 (deflate
33 format), and RFC 1952 (gzip format).
35 Sortix libz is developed as part of the Sortix operating system by
36 Jonas 'Sortie' Termansen (sortie@maxsi.org) and contributors.
39 homepage=https://sortix.org/libz
40 license="Custom, zlib"
42 # Source documentation
43 docs="CHANGES FAQ README TODO"
44 docsdir="${docdir}/${program}-${pkgversion}"
46 build()
48     set -e
50     unpack "${tardir}/$tarname"
52     cd "$srcdir"
54     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
55      $configure_args \
56      --libdir=/usr/lib${libSuffix} \
57      --mandir=$mandir \
58      --enable-shared \
59      --enable-static
61     make -j${jobs}
62     make -j${jobs} DESTDIR="$destdir" install
64     # Strip manually (LDFLAGS is not picked up)
65     strip --strip-unneeded "${destdir}/usr/lib${libSuffix}"/libz.so*
66     strip -g "${destdir}/usr/lib${libSuffix}/libz.a"
68     # Fix library permissions
69     chmod 755 "${destdir}/usr/lib${libSuffix}/libz.so.${pkgversion}"
71     # Compress man pages
72     lzip -9 "${destdir}/${mandir}"/man?/*.?
74     # Copy documentation
75     mkdir -p "${destdir}${docsdir}"
76     cp -p $docs "${destdir}${docsdir}"