recipes: upgrade libevent to snapshot 246f440 and tmux to version 2.8
[dragora.git] / recipes / libs / libz / recipe
bloba154bfe3dc488bffb9b01ea1bacae42980f8e4f7
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 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/libs"
24 pkgversion=1.2.8
26 tarname=${program}-${version}.tar.gz
28 # Remote source(s)
29 fetch=http://sortix.org/libz/release/libz-1.2.8.2015.12.26.tar.gz
31 description="
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=https://sortix.org/libz
43 license="Custom, zlib"
45 # Source documentation
46 docs="CHANGES FAQ README TODO"
47 docsdir="${docdir}/${program}-${pkgversion}"
49 build()
51     set -e
53     unpack "${tardir}/$tarname"
55     cd "$srcdir"
57     # Set sane permissions
58     chmod -R u+w,go-w,a+rX-s .
60     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
61      $configure_args \
62      --libdir=/usr/lib${libSuffix} \
63      --mandir=$mandir \
64      --enable-shared \
65      --enable-static
67     make -j${jobs}
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}"
77     # Compress man pages
78     lzip -9 "${destdir}/${mandir}"/man?/*.?
80     # Copy documentation
81     mkdir -p "${destdir}${docsdir}"
82     cp -p $docs "${destdir}${docsdir}"