APKBUILD 2.13 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
Timo Teräs's avatar
Timo Teräs committed
4 5 6
pkgver=1.6.28
_apngver=1.6.28
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"
14
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
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
Carlo Landmeter's avatar
Carlo Landmeter committed
17
	libpng-fix-arm-neon.patch
18
	"
19
builddir="$srcdir/$pkgname-$pkgver"
Carlo Landmeter's avatar
Carlo Landmeter committed
20

21
prepare() {
Carlo Landmeter's avatar
Carlo Landmeter committed
22
	cd "$builddir"
Natanael Copa's avatar
Natanael Copa committed
23
	gunzip -c "$srcdir"/libpng-$_apngver-apng.patch.gz | patch -p1 || return 1
Carlo Landmeter's avatar
Carlo Landmeter committed
24
	default_prepare || return 1
25
}
26

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

package() {
Carlo Landmeter's avatar
Carlo Landmeter committed
41
	cd "$builddir"
Sören Tempel's avatar
Sören Tempel committed
42 43 44
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1
Carlo Landmeter's avatar
Carlo Landmeter committed
45 46
}

47 48 49 50 51 52
utils() {
	pkgdesc="$pkgdesc (pngfix utils)"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

Timo Teräs's avatar
Timo Teräs committed
53 54
md5sums="897ccec1ebfb0922e83c2bfaa1be8748  libpng-1.6.28.tar.gz
fca7c6d87c8352e645facefc2e1dd153  libpng-1.6.28-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
55
e58c8d9a4086999456de13b2c4b9e224  libpng-fix-arm-neon.patch"
Timo Teräs's avatar
Timo Teräs committed
56 57
sha256sums="b6cec903e74e9fdd7b5bbcde0ab2415dd12f2f9e84d9e4d9ddd2ba26a41623b2  libpng-1.6.28.tar.gz
4b294933e3c875d0e3331d286840b859b8a70dc338f1fefbe803a464c1d9b654  libpng-1.6.28-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
58
db38cd0a8ae637e1bf2dca464a2068a40576346d16ae929f20dc712d21870316  libpng-fix-arm-neon.patch"
Timo Teräs's avatar
Timo Teräs committed
59 60
sha512sums="8d90eacf3281a6557172d3647a5c0c562cfe1e6d2d3f8087d7d86ce0531d1530616fc18a08ca941197f403a20b8f2dd48fde419806f798b4715ddd543420a695  libpng-1.6.28.tar.gz
6b4282ff314a65af67d566445009d3a818f4a469af4c102b4aa8e22ac49dacbdd36d8af6f60095daef2262510416a725dc76030ec01fcebd9d569edb657b05ca  libpng-1.6.28-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
61
30c8389d075b90c0e30c0be8d7630cbf98c87c610f414c529485630dd0411cced28852d2fecc96bca72bc712f0f7e13358f9fc47b6d7b8c7806d34ebeef20514  libpng-fix-arm-neon.patch"