aboutsummaryrefslogtreecommitdiffstats
path: root/main/ldb/APKBUILD
blob: d45bae4eca2e2e06e41727a3551f3be7002750aa (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ldb
pkgver=1.1.31
pkgrel=2
pkgdesc="A schema-less, ldap like, API and database"
url="http://ldb.samba.org/"
arch="all"
license="LGPLv3+"
makedepends="$depends_dev tevent-dev py-tevent tdb-dev py-tdb talloc-dev
	python2-dev popt-dev cmocka-dev"
subpackages="$pkgname-dev py-$pkgname:_py $pkgname-tools"
source="http://samba.org/ftp/ldb/ldb-$pkgver.tar.gz"

builddir="$srcdir"/ldb-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-rpath \
		--bundled-libraries=NONE \
		--builtin-libraries=replace \
		--with-modulesdir=/usr/lib/ldb/modules
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

_py() {
	pkgdesc="Python binding for the ldb library"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libpyldb*.so.* "$subpkgdir"/usr/lib/
}

tools() {
	pkgdesc="Tools to manage LDB files"
	mkdir -p "$subpkgdir"/usr/lib/ldb
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
	mv "$pkgdir"/usr/lib/ldb/libldb-cmdline.* "$subpkgdir"/usr/lib/ldb/
}

sha512sums="49ccd57000cbcc6d828160f4457236b28853d766d641841471f61226156b6103fe563c43c950577b038ea3c0a54506bca94c640d3d5f912a3b8af95eb9ef2824  ldb-1.1.31.tar.gz"