archrelease: copy trunk to extra-x86_64
[arch-packages.git] / 389-ds-base / trunk / PKGBUILD
blobcc36ecebdf959a19c1392de6f251e2df1a65546a
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Javier Torres <javitonino [at] gmail [dot] com>
3 # Contributor: Jameson Pugh <imntreal@gmail.com>
4 # Contributor: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
6 pkgname=389-ds-base
7 pkgver=2.2.2
8 pkgdesc="389 Directory Server (base)"
9 pkgrel=1
10 arch=(x86_64)
11 url="http://port389.org/"
12 license=('GPL')
13 provides=('libsvrcore.so')
14 replaces=('python-lib389')
15 backup=(etc/dirsrv/config/certmap.conf
16         etc/dirsrv/config/ldap-agent.conf
17         etc/dirsrv/config/slapd-collations.conf
18         etc/dirsrv/config/template-initconfig)
19 depends=('cracklib' 'libevent' 'nspr' 'nss' 'net-snmp' 'pam' 'openldap' 'icu'
20          'python-argcomplete' 'python-dateutil' 'python-ldap' 'python-packaging' 'lmdb')
21 makedepends=('cargo' 'rsync' 'doxygen' 'cmocka' 'python-setuptools' 'python-argparse-manpage'
22              'npm' 'nodejs-lts-fermium' 'systemd')
23 source=(https://github.com/389ds/389-ds-base/archive/389-ds-base-${pkgver}.tar.gz
24         389-ds-base.sysusers
25         389-ds-base.tmpfiles)
26 sha512sums=('80ed64efe023521ec8829f03e7d99770bf5d7e6ce5f2c91c1802249ec200a1cf4cb4876f0faa3b70368eda0ecdeeb7a3daba667ab66e15d2ed29cdbc757a929a'
27             '8689b60f13517e6541e1faa62e61781654a8e4678990d14a3fe0cfe4673697cdde1c46763fdc7ef6203e4026286fa004c73b2857fd7fecff69483e6d1e8e6d68'
28             '69ed8b8f3bdbf9098088b0c92c41a238f16d14ba9f86ebc2b5debe5f001b4d8e235f7cff4731d72b30b5ac70486b0f4300b99646aa3926a3fa59515a64f16402')
30 prepare() {
31   cd "${pkgname}-${pkgname}-${pkgver}"
33   # Required until https://github.com/389ds/389-ds-base/issues/5043 is fixed:
34   # sed -i "/deny(warnings)/d" src/librnsslapd/src/lib.rs
36   ./autogen.sh
39 build() {
40   cd "${pkgname}-${pkgname}-${pkgver}"
42   # Build 389-ds-base
43   ./configure \
44     --prefix=/usr \
45     --sysconfdir=/etc \
46     --sbindir=/usr/bin \
47     --localstatedir=/var \
48     --libexecdir=/usr/lib/${pkgname} \
49     --with-tmpfiles-d=/usr/lib/tmpfiles.d \
50     --with-systemd \
51     --with-systemdsystemunitdir=/usr/lib/systemd/system \
52     --with-systemdsystemconfdir=/etc/systemd/system \
53     --with-journald \
54     --with-openldap \
55     --enable-autobind \
56     --enable-cmocka \
57     --enable-rust \
58     --with-libldap_r=no
59   make
61   # Build lib389
62   cd src/lib389
63   COLUMNS=80 python setup.py build
65   # Build cockpit plugin
66   cd ../cockpit/389-console
67   npm install
68   npm run build
69   mv dist cockpit_dist
72 check() {
73   cd "${pkgname}-${pkgname}-${pkgver}"
74   make check
77 package() {
78   cd "${pkgname}-${pkgname}-${pkgver}"
79   # make DESTDIR="${pkgdir}/" install
80   make -j1 DESTDIR="${pkgdir}/" install
82   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
84   # Upstream expects lib389 and 389-ds-base to be shipped in the same package more or less
85   # so that's why it's not a split package.
86   cd src/lib389
87   python setup.py install --skip-build -O1 --root="${pkgdir}"
88   mv "${pkgdir}"/usr/sbin/* "${pkgdir}"/usr/bin/
89   rmdir "${pkgdir}"/usr/sbin
91   install -Dm644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
92   install -Dm644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"