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
4
pkgver=1.6.7
5
_apngver=$pkgver
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
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
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
40
	rm -f "$pkgdir"/usr/lib/*.la
Carlo Landmeter's avatar
Carlo Landmeter committed
41 42
}

43 44 45 46 47 48
md5sums="ab48db8c1acf75472a48c22649a6d13b  libpng-1.6.7.tar.gz
aad92ea0cc3e29415b90c78f1d267799  libpng-1.6.7-apng.patch.gz"
sha256sums="5d3be409d4ed4425923ad8677fc45497abb43c6b9cfd5beafe7dfc6f2a94f24b  libpng-1.6.7.tar.gz
b3a42513483243dd8af219b6f150cf8e6159d2394d2c6e364e94579d16adb0bc  libpng-1.6.7-apng.patch.gz"
sha512sums="9cfe0fd37db8b8c870c95d5cabf9fec499dadbffa72c1e607b87f49d3b1a1b6e675f0c42d219a0a4ce13c0dda1995a3dd71339a77d0148a111ee394829fa83af  libpng-1.6.7.tar.gz
41c95920b7bb67d741aec2f88247bb59d351a8de50548f41b10516c62cd8d8d0fbb9301365ba8f12f79871a758d65941792076aed43311902a4e88c6cd3f715a  libpng-1.6.7-apng.patch.gz"