APKBUILD 1.27 KB
Newer Older
1 2
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
Carlo Landmeter's avatar
Carlo Landmeter committed
3
pkgname=libxml2
Natanael Copa's avatar
Natanael Copa committed
4
pkgver=2.7.8
5
pkgrel=4
Carlo Landmeter's avatar
Carlo Landmeter committed
6 7
pkgdesc="XML parsing library, version 2"
url="http://www.xmlsoft.org/"
8
arch="all"
Natanael Copa's avatar
Natanael Copa committed
9
license="MIT"
Natanael Copa's avatar
Natanael Copa committed
10
depends=
11
depends_dev="zlib-dev python-dev"
12
makedepends="zlib-dev python-dev"
13
subpackages="$pkgname-doc $pkgname-dev py-$pkgname:py $pkgname-utils"
14
source="ftp://ftp.xmlsoft.org/${pkgname}/${pkgname}-${pkgver}.tar.gz
15
	largefile64.patch"
16 17 18 19 20 21 22 23 24 25

options="!strip"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"
	for _i in "$srcdir"/*.patch; do
		patch -p1 -i "$_i"
	done
}
Carlo Landmeter's avatar
Carlo Landmeter committed
26 27

build() {
28
	cd "$_builddir"
Carlo Landmeter's avatar
Carlo Landmeter committed
29 30 31 32
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info 
Natanael Copa's avatar
Natanael Copa committed
33 34 35 36
	make
}

package() {
37
	cd "$_builddir"
Carlo Landmeter's avatar
Carlo Landmeter committed
38
	make -j1 DESTDIR="$pkgdir" install
Natanael Copa's avatar
Natanael Copa committed
39
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
Carlo Landmeter's avatar
Carlo Landmeter committed
40 41
}

42
py() {
43
	cd "$_builddir"
44 45 46 47 48
	pkgdesc="$pkgname python bindings"
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

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

Natanael Copa's avatar
Natanael Copa committed
56
md5sums="8127a65e8c3b08856093099b52599c86  libxml2-2.7.8.tar.gz
57
5ad4915665608ebfa5b89f7908467a72  largefile64.patch"