aboutsummaryrefslogtreecommitdiffstats
path: root/main/libxml2/APKBUILD
blob: 5500426a1787db3376687576ff452210d1105e7b (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=libxml2
pkgver=2.9.1
pkgrel=0
pkgdesc="XML parsing library, version 2"
url="http://www.xmlsoft.org/"
arch="all"
license="MIT"
depends=
depends_dev="zlib-dev python-dev"
makedepends="zlib-dev python-dev"
subpackages="$pkgname-doc $pkgname-dev py-$pkgname:py $pkgname-utils"
source="ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz
	"

options="!strip"

_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
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	make
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/lib/*.la \
		"$pkgdir"/usr/lib/python*/site-packages/*.la \
		|| return 1
		
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

py() {
	cd "$_builddir"
	pkgdesc="$pkgname python bindings"
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

utils() {
	pkgdesc="XML utilities"
	replaces="libxml2"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

md5sums="9c0cfef285d5c4a5c80d00904ddab380  libxml2-2.9.1.tar.gz"
sha256sums="fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb  libxml2-2.9.1.tar.gz"
sha512sums="7b10de749485bc2eb2108063e97d89e70d6fbb78b1bf195ab5528c8c64e79483d55223a49d95934f4e00b00e906c18bdd34344703ffe158dcf08096905a44c1b  libxml2-2.9.1.tar.gz"