aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas/APKBUILD
blob: 534952baf24ec4bedc0f05d434605e5b5b2fe4b8 (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
72
73
74
75
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=augeas
pkgver=1.1.0
pkgrel=1
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 iface-multiopt.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	# fix eglibc-2.16+ build issue
	sed -i -e '/gets is a/d' \
		gnulib/lib/stdio.in.h \
		|| return 1
}

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="520ce983457ff9ffa3816bc41a9f328b  augeas-1.1.0.tar.gz
5fb936320a5f7f0386fbc00f3bc751c2  iface-multiopt.patch"
sha256sums="9d81e4228329e2d5cccb018ab06bc8b734fb2dede2c4d9b5c02303d4a690b76b  augeas-1.1.0.tar.gz
1407f8de30cc2383cb6279e650fe458e664551426fa8227803e474a1550086a8  iface-multiopt.patch"
sha512sums="ddb06f71993079330fc5b134ccd45476c1ab24f475b7a859c5920a7af3bd00d4dae31bf8110841ded4c4f5197e72911c298d7fcfe32d1d3e6821bca74aa67e26  augeas-1.1.0.tar.gz
185875ddac0e81d2842864a5627e90dea402492927b5dfb92397c01045ac864994e1ff2502ab4c21b66d9e8ad65028c3f5dcf860bf24181b18cd5422f2d04adf  iface-multiopt.patch"