summaryrefslogtreecommitdiffstats
path: root/abs/core/zlib/PKGBUILD
blob: 719fff585d017636b03a5317f76bca9b56cc3f85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# $Id$
# Maintainer: Pierre Schmitz <pierre@archlinux.de>

pkgbase=zlib
pkgname=(zlib minizip)
epoch=1
pkgver=1.2.11
pkgrel=2
arch=('x86_64')
license=('custom')
url="https://www.zlib.net/"
depends=('glibc')
options=('staticlibs')  # needed by binutils testsuite
source=("https://zlib.net/zlib-${pkgver}.tar.gz"{,.asc})
md5sums=('1c9f62f0778697a09d36121ead88e08e'
         'SKIP')
validpgpkeys=('5ED46A6721D365587791E2AA783FCD8E58BCAFBA')

prepare() {
	cd ${srcdir}/zlib-$pkgver
	grep -A 24 '^  Copyright' zlib.h > LICENSE
}

build() {
	cd ${srcdir}/zlib-$pkgver
	./configure --prefix=/usr
	make

	cd contrib/minizip
	cp Makefile Makefile.orig
	cp ../README.contrib readme.txt
	autoreconf --install
	./configure --prefix=/usr --enable-static=no
	make
}

check() {
	cd ${srcdir}/zlib-$pkgver
	make test

	cd contrib/minizip
	make -f Makefile.orig test
}

package_zlib() {
	pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'

	cd ${srcdir}/zlib-$pkgver
	make install DESTDIR=${pkgdir}
	install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/zlib/LICENSE
}

package_minizip() {
	pkgdesc='Mini zip and unzip based on zlib'
	depends=('zlib')

	cd ${srcdir}/zlib-$pkgver/contrib/minizip
	make install DESTDIR=${pkgdir}
	install -D -m644 ${srcdir}/zlib-$pkgver/LICENSE ${pkgdir}/usr/share/licenses/minizip/LICENSE
}