summaryrefslogtreecommitdiff
path: root/core/zlib/PKGBUILD
blob: e92f893dec259b4e5e8b7e6743fbf9d3eff375ac (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
# $Id: PKGBUILD 135916 2011-08-20 07:14:14Z allan $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>

pkgname=zlib
pkgver=1.2.5
pkgrel=4
pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
arch=('i686' 'x86_64' 'mips64el')
license=('custom')
url="http://www.zlib.net/"
depends=('glibc')
options=('!makeflags')
source=("http://zlib.net/zlib-${pkgver}.tar.gz"
        'zlib-1.2.5-lfs-decls.patch')
md5sums=('c735eab2d659a96e5a594c9e8541ad63'
         '4cb279ea3beab621f3526bf7b7ab99e5')

build() {
	cd ${srcdir}/zlib-$pkgver
	# see http://bugs.archlinux.org/task/19280
	patch -p1 -i ${srcdir}/zlib-1.2.5-lfs-decls.patch
	# work around gcc bug; see https://bugs.archlinux.org/task/20647
	export CFLAGS="${CFLAGS/-O2/-O3} -fno-tree-vectorize -DUNALIGNED_OK"
	./configure --prefix=/usr
	make

	grep -A 24 '^  Copyright' zlib.h > LICENSE
}

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

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