aboutsummaryrefslogtreecommitdiffstats
path: root/main/libpng/APKBUILD
blob: 3044e0654903e270769aa69b892c086f7ffa456e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libpng
pkgver=1.5.21
pkgrel=0
pkgdesc="Portable Network Graphics library"
url="http://www.libpng.org/"
arch="all"
license="GPL"
depends=
depends_dev="zlib-dev"
makedepends="$depends_dev gawk"
subpackages="$pkgname-doc $pkgname-dev"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	http://downloads.sourceforge.net/project/libpng-apng/libpng15/$pkgver/libpng-$pkgver-apng.patch.gz
	"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	gunzip -c "$srcdir"/libpng-$pkgver-apng.patch.gz | patch -p1 || return 1
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		|| return 1
	make
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir" install
	install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE || return 1
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="5a399a6dd143cb82cdb6c8d98c75fa42  libpng-1.5.21.tar.gz
c2db739bf068fe5ca66bbf184030b24d  libpng-1.5.21-apng.patch.gz"
sha256sums="835ce1d42ea9f50eddf74754f2b06b1c0f7a1d8e46deb89b839a5ca018599793  libpng-1.5.21.tar.gz
fe78d77cea22017cfd9568e35ca4e721c7052dd12fb353396c78f2302d43b1b2  libpng-1.5.21-apng.patch.gz"
sha512sums="d59e733f7268480e5cd2816e3894d11bdf739a230c0d1a717eac23a5e2825ed50ed1eaeba7701ee049304ef992d87a13bd7dc52b29aa616de35b35d8ab21cc99  libpng-1.5.21.tar.gz
6fc6c043e24edaace05d46589c9d4be46741710b9656e6061c4c8d25e46a58f2b997377bdb0fbfd7df8ee1602b77a048233e7e9699e8c8bc383b940d04538965  libpng-1.5.21-apng.patch.gz"