blob: 780636b48aa08962ca621f429ec060510e068a2f (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ldb
pkgver=1.3.3
pkgrel=0
pkgdesc="A schema-less, ldap like, API and database"
url="http://ldb.samba.org/"
arch="all"
license="LGPL-3.0-or-later"
makedepends="libtirpc-dev tevent-dev py2-tevent tdb-dev py2-tdb talloc-dev
python2-dev python3-dev popt-dev cmocka-dev"
subpackages="$pkgname-dev py2-$pkgname:_py2 py3-$pkgname:_py3 $pkgname-tools"
source="https://www.samba.org/ftp/pub/ldb/$pkgname-$pkgver.tar.gz
fix-memory-leak-on-module-context.patch
disable-python-tests.patch"
builddir="$srcdir/$pkgname-$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 \
--extra-python=/usr/bin/python3
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
}
_py2() {
pkgdesc="Python 2 binding for the ldb library"
provides="py-ldb=$pkgver-r$pkgrel" # for backward compatibility
replaces="py-ldb" # for backward compatibility
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/python2* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libpyldb-util.so.* "$subpkgdir"/usr/lib/
}
_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="ad272a1fd82d5138d9a056c1d81cfcd6167886719852b41447b9e6fb6acd926b137fd76e16f476d68bc0991943142ea1482666dc48155e9a1ef09f13b041c350 ldb-1.3.3.tar.gz
7524e23ff8fe378fc4e24ac9e93bfa27012a2a646c5411d419d0181ffd4192fdbb0c3b28f4e2a2e43cf93a1340eeaf526699ac16d846b616612d922abd2595aa fix-memory-leak-on-module-context.patch
4b65362539ad169997b437b4b3444693ff318892931a827e220583e6c5114472a2029e90681be942c3a3ec76db82dedc23300d82e094c8fa8e9f24814756f8f9 disable-python-tests.patch"
|