aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas/APKBUILD
blob: 2b42bd912404cdfb8e2a75e5cfe9a0cd946f47d0 (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
76
77
78
79
80
81
82
83
84
85
86
87
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=augeas
pkgver=1.11.0
pkgrel=0
pkgdesc="A configuration editing tool"
url="http://augeas.net"
arch="all"
license="LGPL-2.0-or-later"
makedepends="autoconf automake libxml2-dev readline-dev libtool"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-tests::noarch $pkgname-libs"
source="http://download.augeas.net/augeas-$pkgver.tar.gz
	fix-test.patch
	acf.aug
	awall.aug"
builddir="$srcdir/$pkgname-$pkgver"
options="!checkroot"

prepare() {
	default_prepare
	autoreconf -f -i
}

build() {
	cd "$builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-static \
		--enable-shared \
		--disable-gnulib-tests
	make
	make tests
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/lib/charset.alias
	# Upstream packaging mistake, this should never have been installed
	rm -f "$pkgdir"/usr/bin/dump

	local lens
	for lens in acf awall; do
		install -m 644 "$srcdir"/$lens.aug "$pkgdir"/usr/share/augeas/lenses
	done
}

tests() {
	pkgdesc="Tests for Augeas lenses"

	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/
	mv "$pkgdir"/usr/share/augeas/lenses \
		"$subpkgdir"/usr/share/augeas/
}

static() {
	pkgdesc="Static libraries for Augeas"

	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}

sha512sums="1b67bb7fcd9b560d3fe4a5c753d5e778db73caaab6e50367afd123eec107b65b73096913ac7d5170e85f5b63ff3522b2a6932b130e207ab22560dfc6e267b8a1  augeas-1.11.0.tar.gz
9768878b2f8710436ef1eba7868c22b5eff1d2d549434bf76aced72ebdb4af4f769ea638dedf42ac9b617aaa53d1a767ed6b18868dd0bb3cf72cb3889f6d933a  fix-test.patch
74d728abdf4d3eebdeb3823c1d2588c214fd52734c8855fe3ddbfb6465d31c88d093df356e42effdd3dbdff1a62c52894c7aa840bd6ea8df4995c4f3aa53e919  acf.aug
fe83e70ddeced87fea4c4dbdfb90b7497bc5fd01b6b097f0f49c52894b4dc1d93cf217ae7aa98abeaba0a9f8e8e18a1d426b6c203b318afde9cd5164cbe604b1  awall.aug"