aboutsummaryrefslogtreecommitdiffstats
path: root/main/ldb/APKBUILD
blob: 6c9b7d472bb5cce6cfc8d7484323c16df1cb09fd (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ldb
pkgver=2.2.3
pkgrel=0
pkgdesc="A schema-less, ldap like, API and database"
url="https://ldb.samba.org/"
arch="all"
license="LGPL-3.0-or-later"
makedepends="libtirpc-dev tevent-dev py3-tevent tdb-dev py3-tdb talloc-dev
	python3-dev popt-dev cmocka-dev docbook-xsl lmdb-dev"
subpackages="$pkgname-dev py3-$pkgname:_py3 $pkgname-tools $pkgname-doc"
source="https://www.samba.org/ftp/pub/ldb/ldb-$pkgver.tar.gz
	disable-compile-error-test.patch
	skip-failing-tests.patch
	"

# secfixes:
#   1.3.5-r0:
#     - CVE-2018-1140

_waf=buildtools/bin/waf

case "$CARCH" in
	ppc64le) options="$options !check" ;;
	armhf|armv7|x86) export DEB_HOST_ARCH_BITS=32 ;;
esac

build() {
	"$_waf" configure \
		--prefix=/usr \
		--disable-rpath \
		--disable-rpath-install \
		--builtin-libraries=replace \
		--bundled-libraries=NONE \
		--with-modulesdir=/usr/lib/ldb/modules
	"$_waf" build
}

check() {
	"$_waf" test
}

package() {
	DESTDIR="$pkgdir" "$_waf" install
}

_py3() {
	pkgdesc="Python 3 binding for the ldb library"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libpyldb-util.cpython* "$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="
0fdda9e033cbd04d6b50c76ecf044068353d2abf50c5c9d9c804b8b9e70f6d85bf925ac984a38c2b7a159a384bfc94e5232b05a32cdbc9299dc43930d1b6a985  ldb-2.2.3.tar.gz
ed55d5151bbcaf5c0a1b70a1f44b461a501ad94ce02ee97e3ea10c560ce3656a190510697bbd3c5b6f70a74519bf7c0a91210bcb415ffd97d9440045e10a02e8  disable-compile-error-test.patch
08e6a0b075dc40c8d1c9ac12fcf72c0601d3ec128a56915be88336754b876580d52f64e94bf9157e82810a9afe2eb6cdb7be0e999fd88a5e70e70dd71ce1dab5  skip-failing-tests.patch
"