db-move: moved firefox-i18n from [testing] to [extra] (any)
[arch-packages.git] / zlib / trunk / PKGBUILD
blob0513015e4c7562a810b9584863a568594f2b2e7f
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgbase=zlib
4 pkgname=(zlib minizip)
5 epoch=1
6 pkgver=1.2.13
7 pkgrel=2
8 arch=('x86_64')
9 license=('custom')
10 url="https://www.zlib.net/"
11 depends=('glibc')
12 options=(
13   'staticlibs'  # needed by binutils testsuite
14   'debug'
16 source=("https://zlib.net/zlib-${pkgver}.tar.gz"{,.asc})
17 sha256sums=('b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30'
18             'SKIP')
19 validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA')
21 prepare() {
22         cd "${srcdir}/zlib-$pkgver"
23         grep -A 24 '^  Copyright' zlib.h > LICENSE
26 build() {
27         cd "${srcdir}/zlib-$pkgver"
29         CFLAGS+=" -ffat-lto-objects"
30         ./configure --prefix=/usr
31         make
33         cd contrib/minizip
34         cp Makefile Makefile.orig
35         cp ../README.contrib readme.txt
36         autoreconf --install
37         ./configure --prefix=/usr --enable-static=no
38         make
41 check() {
42         cd "${srcdir}/zlib-$pkgver"
43         make test
45         cd contrib/minizip
46         make -f Makefile.orig test
49 package_zlib() {
50         pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
52         cd "${srcdir}/zlib-$pkgver"
53         make install DESTDIR="${pkgdir}"
54         install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/zlib/LICENSE"
57 package_minizip() {
58         pkgdesc='Mini zip and unzip based on zlib'
59         depends=('zlib')
61         cd "${srcdir}/zlib-$pkgver/contrib/minizip"
62         make install DESTDIR="${pkgdir}"
63         install -D -m644 "${srcdir}/zlib-$pkgver/LICENSE" "${pkgdir}/usr/share/licenses/minizip/LICENSE"
65         # https://github.com/madler/zlib/pull/229
66         rm "${pkgdir}/usr/include/minizip/crypt.h"