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
tmpfile's avatar
tmpfile committed
4
pkgver=1.6.32
Sören Tempel's avatar
Sören Tempel committed
5
pkgrel=0
Carlo Landmeter's avatar
Carlo Landmeter committed
6 7
pkgdesc="Portable Network Graphics library"
url="http://www.libpng.org/"
8
arch="all"
Carlo Landmeter's avatar
Carlo Landmeter committed
9
license="GPL"
Sören Tempel's avatar
Sören Tempel committed
10
depends=""
11 12
depends_dev="zlib-dev"
makedepends="$depends_dev gawk"
13
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
14
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
15
	http://downloads.sourceforge.net/sourceforge/$pkgname-apng/$pkgname-$pkgver-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
16
	libpng-fix-arm-neon.patch
17
	"
18
builddir="$srcdir/$pkgname-$pkgver"
Carlo Landmeter's avatar
Carlo Landmeter committed
19

20
prepare() {
Carlo Landmeter's avatar
Carlo Landmeter committed
21
	cd "$builddir"
tmpfile's avatar
tmpfile committed
22 23
	gunzip -c "$srcdir"/$pkgname-$pkgver-apng.patch.gz | patch -p1
	default_prepare
24
}
25

Carlo Landmeter's avatar
Carlo Landmeter committed
26
build() {
Carlo Landmeter's avatar
Carlo Landmeter committed
27
	cd "$builddir"
28 29 30 31
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
Sören Tempel's avatar
Sören Tempel committed
32 33
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
tmpfile's avatar
tmpfile committed
34 35
		--localstatedir=/var
	make
Natanael Copa's avatar
Natanael Copa committed
36 37
}

38 39 40 41
check() {
	make -C "$builddir" check
}

Natanael Copa's avatar
Natanael Copa committed
42
package() {
Carlo Landmeter's avatar
Carlo Landmeter committed
43
	cd "$builddir"
tmpfile's avatar
tmpfile committed
44
	make DESTDIR="$pkgdir" install
Sören Tempel's avatar
Sören Tempel committed
45
	install -Dm644 LICENSE \
tmpfile's avatar
tmpfile committed
46
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
Ariadne Conill's avatar
Ariadne Conill committed
47
	rm -f "$pkgdir"/usr/lib/*.la
Carlo Landmeter's avatar
Carlo Landmeter committed
48 49
}

50 51 52 53 54 55
utils() {
	pkgdesc="$pkgdesc (pngfix utils)"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

tmpfile's avatar
tmpfile committed
56 57 58
sha512sums="adf47cdfdf7d420ad9c6db5d3680d176ddf96824dc4be0fd6c198c9de24cdb35f063c4359cfad1c0e291077961226b3c683db804d30b164006d6dd6312030448  libpng-1.6.32.tar.gz
4a6e158f5a9d49e036bb4006b4bd8cf4c7563bc9c7e38a12dd4764dedb6891ca03a1b3ae46029017912e984434b67ee6b434e279e5bc22db4e627340e55ab59d  libpng-1.6.32-apng.patch.gz
e3fae918f14bc34e7c126892f69527c6e1b4d72593835ece839d9a28cff55a886b2030f877cf9e29b2c97abf2e47bbb5ba54584828edd2a841c2556f330b9c7e  libpng-fix-arm-neon.patch"