archrelease: copy trunk to extra-x86_64
[arch-packages.git] / zlib / trunk / PKGBUILD
blobabdce10613691c69adfe96623cf62ac222111811
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Levente Polyak <anthraxx@archlinux.org>
3 # Contributor: Pierre Schmitz <pierre@archlinux.de>
5 pkgbase=zlib
6 pkgname=(zlib minizip)
7 epoch=1
8 pkgver=1.2.13
9 pkgrel=2
10 arch=('x86_64')
11 license=('custom')
12 url="https://www.zlib.net/"
13 depends=('glibc')
14 options=(
15   'staticlibs'  # needed by binutils testsuite
16   'debug'
18 source=("https://zlib.net/zlib-${pkgver}.tar.gz"{,.asc})
19 sha256sums=('b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30'
20             'SKIP')
21 validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA')
23 prepare() {
24   cd $pkgbase-$pkgver/contrib/minizip
25   cp Makefile Makefile.orig
26   cp ../README.contrib readme.txt
27   autoreconf -fiv
30 build() {
31   cd $pkgbase-$pkgver
33   CFLAGS+=" -ffat-lto-objects"
34   ./configure --prefix=/usr
35   make
37   cd contrib/minizip
38   ./configure --prefix=/usr --enable-static=no
39   make
42 check() {
43   make test -C $pkgbase-$pkgver
45   make -f Makefile.orig test -C $pkgbase-$pkgver/contrib/minizip
48 package_zlib() {
49   pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
51   make install DESTDIR="${pkgdir}" -C $pkgbase-$pkgver
52   install -D -m644 $pkgbase-$pkgver/LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname/"
55 package_minizip() {
56   pkgdesc='Mini zip and unzip based on zlib'
57   depends=('zlib')
59   make install DESTDIR="${pkgdir}" -C $pkgbase-$pkgver/contrib/$pkgname
60   install -D -m644 $pkgbase-$pkgver/LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname/"
62   # https://github.com/madler/zlib/pull/229
63   rm "${pkgdir}/usr/include/minizip/crypt.h"