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.10
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="b0f0c38a02dc92f70f0053a40abc7e0b  libpng-1.6.10.tar.gz
3404257f66d4a118b26ccc3fc4788810  libpng-1.6.10-apng.patch.gz"
sha256sums="b0206a22b49c91fc5521b2cfb1c251433a37aed0a645bc504ab3d061f27e4d51  libpng-1.6.10.tar.gz
88ffe8b3c9e2f1e187ef50684abd64476617f061b57e2c2afe5219c18ec02214  libpng-1.6.10-apng.patch.gz"
sha512sums="e473e3ea436b55da2e0d68ea58fe4356127a7edb93f28de68ff18efe6aa4a346d7f1a50a1c6dd0fb32500cf0e00f122d82ab710f7484cbe465faebefcf6bf018  libpng-1.6.10.tar.gz
8489525926805c54699d6fa95bf3aaa1a1fc6303500cd93b44d1d848ae05d47f7b9d03273ba8086fd676a985858fda39f17d6e2c1f16dedf5bf5a4376845cf60  libpng-1.6.10-apng.patch.gz"