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.5
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
}

43 44 45 46 47 48
md5sums="d219454052b3930c5d1eebd2f79e6540  libpng-1.6.5.tar.gz
e05f0ba9534e0331bf499d63811cbf93  libpng-1.6.5-apng.patch.gz"
sha256sums="39111bc125c654f2975e3732a872c2a63501e0b1d2cfb12f882b6cdc6e9fc146  libpng-1.6.5.tar.gz
ce8a456b1219d632fc3ea27fffb9ba416f3c406adce84d98fb0a7314d90257dc  libpng-1.6.5-apng.patch.gz"
sha512sums="2a15da430768a7ecf3dc6644e9f9d30427c9bcf91fb38456f3c92d7d5e5a4a1f94fa9896386d2d94e1859dfc9762f719dffe21fa345652556e43418da01425d2  libpng-1.6.5.tar.gz
2aeddc7393c7443620c376e9f3a0c8ecee0c762af8f8b479335984691de11edc211391dc380e142c1de201bebf606a75ba4d4bc9b8d3bad857c9411d9920e93f  libpng-1.6.5-apng.patch.gz"