aboutsummaryrefslogtreecommitdiffstats
path: root/main/zlib/APKBUILD
blob: 88cbdb1d96be9417c5a7f41f8acd32925278a3cc (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.11
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="1c9f62f0778697a09d36121ead88e08e  zlib-1.2.11.tar.gz"
sha256sums="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1  zlib-1.2.11.tar.gz"
sha512sums="73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae  zlib-1.2.11.tar.gz"