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
Natanael Copa's avatar
Natanael Copa committed
4
pkgver=1.6.15
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
}

Natanael Copa's avatar
Natanael Copa committed
43 44 45 46 47 48
md5sums="829a256f3de9307731d4f52dc071916d  libpng-1.6.15.tar.gz
612524080d5515f4ea81541a9b13bf61  libpng-1.6.15-apng.patch.gz"
sha256sums="dc4f90ff3ba4559b5eb653da9058e3d862d5e8162fe2612f9339a6f6d2a2139d  libpng-1.6.15.tar.gz
8b86508a323782247e5ab058fb8acba7b777fdeaba6eb55e811bd618b9dafd66  libpng-1.6.15-apng.patch.gz"
sha512sums="50d072e694814020047345045e12130445b06f4b14b2ea5853c4dd0f7d8729dd92a7d6eb67c355591b493aaca942bdc9ae66d0fc3daf6051a431a53cc665ae24  libpng-1.6.15.tar.gz
d3e7ad1b5d8b2ce7ad5f8e76cd2f9fb4642305b10ea191fc5b59977c7ed76f76fb3201551d1845d52191a14f8d83dcf99204db14ef0ee2e81e1fca5a57bfa62e  libpng-1.6.15-apng.patch.gz"