aboutsummaryrefslogtreecommitdiffstats
path: root/main/zlib/APKBUILD
blob: bdcd517c52ea7656dc2ffa6457545647c81d0bed (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zlib
pkgver=1.2.7
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
	make || return 1
}

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

dev() {
	default_dev
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/libz.a "$subpkgdir"/lib/libz.a
}

md5sums="60df6a37c56e7c1366cca812414f7b85  zlib-1.2.7.tar.gz"