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

_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="d9794246f853d15ce0fcbf79b9a3cf13  zlib-1.2.10.tar.gz"
sha256sums="8d7e9f698ce48787b6e1c67e6bff79e487303e66077e25cb9784ac8835978017  zlib-1.2.10.tar.gz"
sha512sums="5fa71052a418a0f2b345fce28af9941bbd1c6ee276ce506ab3092157f15776ee41f96bb1799657227513b852913f96ac52dae8122a437f34b43933ee48d63ee0  zlib-1.2.10.tar.gz"