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
4
pkgver=1.6.27
A. Klitzing's avatar
A. Klitzing committed
5
_apngver=1.6.26
6
pkgrel=1
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"
14
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
15
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
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"
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 \
33 34 35
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
36
		|| return 1
37
	make || return 1
38 39 40
}

package() {
Carlo Landmeter's avatar
Carlo Landmeter committed
41
	cd "$builddir"
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
}

53
md5sums="58698519e9f6126c1caeefc28dbcbd5f  libpng-1.6.27.tar.gz
A. Klitzing's avatar
A. Klitzing committed
54
921d2717418bf74b40b94191c8b282c7  libpng-1.6.26-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
55
e58c8d9a4086999456de13b2c4b9e224  libpng-fix-arm-neon.patch"
56
sha256sums="c9d164ec247f426a525a7b89936694aefbc91fb7a50182b198898b8fc91174b4  libpng-1.6.27.tar.gz
A. Klitzing's avatar
A. Klitzing committed
57
01dec904d91ee8c90a9a78f253d01d8fac0e37a3f4beacb60e136ea7c814d72c  libpng-1.6.26-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
58
db38cd0a8ae637e1bf2dca464a2068a40576346d16ae929f20dc712d21870316  libpng-fix-arm-neon.patch"
59
sha512sums="fac2945fec7ad24c47775d1e8c6d6c84c198e0286349e9b51424da5400735c62c70fd61f5f14a6effa5f2db3113e754e61eb1c52bcaac231a2760315031f79ba  libpng-1.6.27.tar.gz
A. Klitzing's avatar
A. Klitzing committed
60
e5831b8c5fbe963d6625dd55c656708997d41d9ac91173777560dd7d4a01beaa7a024497d7e428450800b32486ee788baacffbd2317cc0d909fbd89fbbd79684  libpng-1.6.26-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
61
30c8389d075b90c0e30c0be8d7630cbf98c87c610f414c529485630dd0411cced28852d2fecc96bca72bc712f0f7e13358f9fc47b6d7b8c7806d34ebeef20514  libpng-fix-arm-neon.patch"