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.
18 version=1.2.8.2015.12.26
21 # Define a category for the output of the package name
26 tarname=${program}-${version}.tar.gz
29 fetch=http://sortix.org/libz/release/libz-1.2.8.2015.12.26.tar.gz
32 A general purpose data compression library.
34 libz is a general purpose data compression library. The data format
35 used by libz is described by RFC 1950 (zlib format), RFC 1951 (deflate
36 format), and RFC 1952 (gzip format).
38 Sortix libz is developed as part of the Sortix operating system by
39 Jonas 'Sortie' Termansen (sortie@maxsi.org) and contributors.
42 homepage=http://sortix.org/libz
43 license="Custom, zlib"
45 # Source documentation
46 docs="CHANGES FAQ README TODO"
47 docsdir="${docdir}/${program}-${pkgversion}"
53 unpack "${tardir}/$tarname"
57 # Set sane permissions
58 chmod -R u+w,go-w,a+rX-s .
60 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
62 --libdir=/usr/lib${libSuffix} \
68 make -j${jobs} DESTDIR="$destdir" install
70 # Strip manually (LDFLAGS is not picked up)
71 strip --strip-unneeded "${destdir}/usr/lib${libSuffix}"/libz.so*
72 strip -g "${destdir}/usr/lib${libSuffix}/libz.a"
74 # Fix library permissions
75 chmod 755 "${destdir}/usr/lib${libSuffix}/libz.so.${pkgversion}"
78 lzip -9 "${destdir}/${mandir}"/man?/*.?
81 mkdir -p "${destdir}${docsdir}"
82 cp -p $docs "${destdir}${docsdir}"