summaryrefslogtreecommitdiffstats
path: root/main/augeas/APKBUILD
blob: c416c81b7a5fbd30288d7def56f66f82ed9ca93a (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
69
70
71
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=augeas
pkgver=1.2.0
pkgrel=2
pkgdesc="A configuration editing tool"
url="http://augeas.net"
arch="all"
license="LGPL2+"
depends=""
depends_dev="libxml2-dev"
makedepends="$depends_dev readline-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-tests $pkgname-libs"
source="http://download.augeas.net/augeas-$pkgver.tar.gz
	0001-Dnsmasq-add-structure-to-address-and-server-options.patch"

_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 || return 1
	make tests || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null
	rm "$pkgdir"/usr/lib/*.la || return 1
}

tests() {
	pkgdesc="Tests for Augeas lenses"
	arch="noarch"
	mkdir -p "$subpkgdir"/usr/share/augeas/lenses/dist/
	mv "$pkgdir"/usr/share/augeas/lenses/dist/tests \
		"$subpkgdir"/usr/share/augeas/lenses/dist/
}

libs() {
	pkgdesc="Libraries for augeas"
	replaces="augeas"
	mkdir -p "$subpkgdir"/usr/ "$subpkgdir"/usr/share/augeas/
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ || return 1
	mv "$pkgdir"/usr/share/augeas/lenses \
		"$subpkgdir"/usr/share/augeas/ || return 1
}

md5sums="dce2f52cbd20f72c7da48e014ad48076  augeas-1.2.0.tar.gz
b140791828aec2037c411164102ef8cd  0001-Dnsmasq-add-structure-to-address-and-server-options.patch"
sha256sums="f4aeb28ebe0b0921920fe1c9b4c016739c25261a15de04cb97db02d669f481e0  augeas-1.2.0.tar.gz
0cb29dfdef3f293c5a4db06704072a6672ce728c82d4b2a7260da341522efc37  0001-Dnsmasq-add-structure-to-address-and-server-options.patch"
sha512sums="fa3cf6bf5143bc4afbf3b360834565a295d7ef815894a019f1e8017a0199f778adc6d6c44ee220b24b37355211264535af7efc56134c81b167df296134095aa8  augeas-1.2.0.tar.gz
f2cdf6fcd84de4f86bc54d89292d3c4c19070b1c6d5149af6a8d7c49678e2a7527b6549ad114e5ccec53d4d9582814153732f69a4c0228243aac96c48a0e1d1d  0001-Dnsmasq-add-structure-to-address-and-server-options.patch"