APKBUILD 1.59 KB
Newer Older
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Carlo Landmeter's avatar
Carlo Landmeter committed
3
pkgname=libpng
Natanael Copa's avatar
Natanael Copa committed
4
pkgver=1.6.16
Natanael Copa's avatar
Natanael Copa committed
5
_apngver=$pkgver
Natanael Copa's avatar
Natanael Copa committed
6
pkgrel=0
Carlo Landmeter's avatar
Carlo Landmeter committed
7 8
pkgdesc="Portable Network Graphics library"
url="http://www.libpng.org/"
9
arch="all"
Carlo Landmeter's avatar
Carlo Landmeter committed
10
license="GPL"
11
depends=
12 13
depends_dev="zlib-dev"
makedepends="$depends_dev gawk"
Carlo Landmeter's avatar
Carlo Landmeter committed
14
subpackages="$pkgname-doc $pkgname-dev"
15
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
Natanael Copa's avatar
Natanael Copa committed
16
	http://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-$_apngver-apng.patch.gz
17 18 19 20 21 22 23 24
	"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	gunzip -c "$srcdir"/libpng-$pkgver-apng.patch.gz | patch -p1 || return 1
}
25

Carlo Landmeter's avatar
Carlo Landmeter committed
26
build() {
27
	cd "$_builddir"
28 29 30 31
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
32
		|| return 1
Natanael Copa's avatar
Natanael Copa committed
33 34 35 36 37
	make
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
Carlo Landmeter's avatar
Carlo Landmeter committed
38
	make DESTDIR="$pkgdir" install
39
	install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE || return 1
Natanael Copa's avatar
Natanael Copa committed
40
	rm -f "$pkgdir"/usr/lib/*.la
Carlo Landmeter's avatar
Carlo Landmeter committed
41 42
}

Natanael Copa's avatar
Natanael Copa committed
43 44 45 46 47 48
md5sums="1a4ad377919ab15b54f6cb6a3ae2622d  libpng-1.6.16.tar.gz
52de72a29e5d0428a0e527be74b99c24  libpng-1.6.16-apng.patch.gz"
sha256sums="02f96b6bad5a381d36d7ba7a5d9be3b06f7fe6c274da00707509c23592a073ad  libpng-1.6.16.tar.gz
70cd38ca898b944875c2393254bd1394bcd10ec2fe0aa739a96cf3fd8a3ac2e9  libpng-1.6.16-apng.patch.gz"
sha512sums="8d96076306f8bb8b1160d53cba0f050c29969b981de9f2e34ea6b01709e59ff7c2c3b92d6237d7d15dd102a2838b5916b444b78d78ff0a7c2261f3acc75cfe68  libpng-1.6.16.tar.gz
0fc052bac6202fa13f3f1272eee523c22acfe32eec7ea55e6159ba067650a8d869936757b52054c8a0a0a68e797918c159dc7910f2428053b6727a3ef0d9e236  libpng-1.6.16-apng.patch.gz"