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.17
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="134282f1752dcf4cd81a37b8ff421cef  libpng-1.6.17.tar.gz
f68d34f10bcc7f43b8c3dce5708e1933  libpng-1.6.17-apng.patch.gz"
sha256sums="a18233c99e1dc59a256180e6871d9305a42e91b3f98799b3ceb98e87e9ec5e31  libpng-1.6.17.tar.gz
25998d89d423834df3f0171d195ef15a0bca30f55657a339138313429a9d0f2b  libpng-1.6.17-apng.patch.gz"
sha512sums="445cf5cace57eb89f2f52be96e9f0e956717a4d4474bd6f5d0545a8b30b45ff45df94325c2504b044d014880cbb3e696475cd6fa7936993dee7ffee93756e384  libpng-1.6.17.tar.gz
5abfe55ad8e2778572fa5c1543c23b01c7f7fc4fea1aec535ac5749ae1ba1e209e7b94641d34d4b6514be7abbf176b957e3690832d4358d0590754063303eeb0  libpng-1.6.17-apng.patch.gz"