APKBUILD 1.65 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.23
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
_builddir="$srcdir"/$pkgname-$pkgver
20 21 22 23
prepare() {
	cd "$_builddir"
	gunzip -c "$srcdir"/libpng-$pkgver-apng.patch.gz | patch -p1 || return 1
}
24

Carlo Landmeter's avatar
Carlo Landmeter committed
25
build() {
26
	cd "$_builddir"
27 28 29 30
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
31 32 33
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
34
		|| return 1
35
	make || return 1
36 37 38
}

package() {
39 40 41 42
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1
Carlo Landmeter's avatar
Carlo Landmeter committed
43 44
}

45 46 47 48 49 50
md5sums="a49e4cc48d968c79def53d082809c9f2  libpng-1.6.23.tar.gz
bf44929a1c272f585a11baeca05af500  libpng-1.6.23-apng.patch.gz"
sha256sums="74a9db9ddd66caa64be82bfcb3cbec4fc4394ceb1053cb7e94b2a0aa9b78eb88  libpng-1.6.23.tar.gz
08906e0639a953f6be2d47857661cbdf04dcab93d3bf9f8cb0f7675567b07ad3  libpng-1.6.23-apng.patch.gz"
sha512sums="f5cf137186fc0a10deb3ce54b1961cb9a358cec380cd3f8c21d2726e68348574c49a5a6808ecd79736737e970fa41ae83626811cb72b059bbf6054fabf6639f8  libpng-1.6.23.tar.gz
105e7f70d1292f4a059e62fda7c4ffbfcd4eacd3c11cd1fbdd09bdcf2b1469a54ee864c4f5f22afe9e17ddfd1d10196661a69bb4eb469173a3bfc789181923ce  libpng-1.6.23-apng.patch.gz"