summaryrefslogtreecommitdiffstats
path: root/main/zlib/APKBUILD
blob: 14cf87d88f90ec019f2c1c191267e067163cfb2a (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zlib
pkgver=1.2.8
pkgrel=0
pkgdesc="A compression/decompression Library"
arch="all"
license=custom:zlib
url="http://zlib.net"
depends=
source="http://zlib.net/$pkgname-$pkgver.tar.gz
	"
subpackages="$pkgname-dev $pkgname-doc"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"
	# we trade size for a little more speed.
	export CFLAGS="$CFLAGS -O2"
	CHOST="${CHOST}" ./configure \
		--prefix=/usr \
		--libdir=/lib \
		--shared \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make install \
		pkgconfigdir="/usr/lib/pkgconfig" \
		DESTDIR="$pkgdir" || return 1
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/lib
	# newer abuild might do this for us
	if [ -f "$pkgdir"/libz.a ]; then
		mv "$pkgdir"/lib/libz.a "$subpkgdir"/lib/libz.a
	fi
}

md5sums="44d667c142d7cda120332623eab69f40  zlib-1.2.8.tar.gz"
sha256sums="36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d  zlib-1.2.8.tar.gz"
sha512sums="ece209d4c7ec0cb58ede791444dc754e0d10811cbbdebe3df61c0fd9f9f9867c1c3ccd5f1827f847c005e24eef34fb5bf87b5d3f894d75da04f1797538290e4a  zlib-1.2.8.tar.gz"