APKBUILD 1.57 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.21
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"
Sören Tempel's avatar
Sören Tempel committed
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
	"

_builddir="$srcdir/$pkgname-$pkgver"
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
		|| return 1
Natanael Copa's avatar
Natanael Copa committed
32 33 34 35 36
	make
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
Carlo Landmeter's avatar
Carlo Landmeter committed
37
	make DESTDIR="$pkgdir" install
38
	install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE || return 1
Carlo Landmeter's avatar
Carlo Landmeter committed
39 40
}

Natanael Copa's avatar
Natanael Copa committed
41 42 43 44 45 46
md5sums="aca36ec8e0a3b406a5912243bc243717  libpng-1.6.21.tar.gz
360346394543ec0a880f61830541608f  libpng-1.6.21-apng.patch.gz"
sha256sums="b36a3c124622c8e1647f360424371394284f4c6c4b384593e478666c59ff42d3  libpng-1.6.21.tar.gz
6da70e2526fe91c3379592546d2f14c0dfef8f04e2b338dddd5dc9ef45618c73  libpng-1.6.21-apng.patch.gz"
sha512sums="033bbac08e5415500289dc41a854f1a2b1b61923b62bcdccb6f5d9c0f1efb95924712f2b5ec370bfbea30ec3deab5883a308ee78709a81095c748359a63373ae  libpng-1.6.21.tar.gz
144bf07770d5584ea78648b65468a9acd40909b34c501ec4d91fc53ddf8ca85c99e2fcb1b245fce54d045b60ad2e1da575c27ad6ca566358643b4573176f05b2  libpng-1.6.21-apng.patch.gz"