upgpkg: maxima 5.46.0-9 (sbcl rebuild)
[arch-packages.git] / 389-ds-base / trunk / PKGBUILD
blobc98c44f8995b563039e79f851ad4ab042720f428
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.3.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' 'db5.3'
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         https://github.com/vashirov/389-ds-base/commit/67adb7e3d1c3bbb0ba77d7d3fe0e9643a84af1c.patch
25         389-ds-base.sysusers
26         389-ds-base.tmpfiles)
27 sha512sums=('9bbbc74a420f1240991adb0fdb3ea386526a6a642cae72a33c75566b08f5191c3581ad63cb245600ad117e95f8f2b373ec457832819c37ebed1b9c1d6ef7581d'
28             '7b845629e74b48f0bb951d883a849d64baf842836b64930268d85b18ff86d6e1004673086116fb2fff31c424480b8e05148886d037ef5382be7ed68f156be427'
29             '8689b60f13517e6541e1faa62e61781654a8e4678990d14a3fe0cfe4673697cdde1c46763fdc7ef6203e4026286fa004c73b2857fd7fecff69483e6d1e8e6d68'
30             '69ed8b8f3bdbf9098088b0c92c41a238f16d14ba9f86ebc2b5debe5f001b4d8e235f7cff4731d72b30b5ac70486b0f4300b99646aa3926a3fa59515a64f16402')
32 prepare() {
33   cd "${pkgname}-${pkgname}-${pkgver}"
35   patch -Np1 -i "$srcdir"/67adb7e3d1c3bbb0ba77d7d3fe0e9643a84af1c.patch
37   ./autogen.sh
40 build() {
41   cd "${pkgname}-${pkgname}-${pkgver}"
43   # Build 389-ds-base
44   ./configure \
45     --prefix=/usr \
46     --sysconfdir=/etc \
47     --sbindir=/usr/bin \
48     --localstatedir=/var \
49     --libexecdir=/usr/lib/${pkgname} \
50     --with-tmpfiles-d=/usr/lib/tmpfiles.d \
51     --with-db-inc=/usr/include/db5.3 \
52     --with-systemd \
53     --with-systemdsystemunitdir=/usr/lib/systemd/system \
54     --with-systemdsystemconfdir=/etc/systemd/system \
55     --with-journald \
56     --with-openldap \
57     --enable-autobind \
58     --enable-cmocka \
59     --enable-rust \
60     --with-libldap_r=no
61   make
63   # Build lib389
64   cd src/lib389
65   COLUMNS=80 python setup.py build
67   # Build cockpit plugin
68   cd ../cockpit/389-console
69   npm install
70   npm run build
71   mv dist cockpit_dist
74 check() {
75   cd "${pkgname}-${pkgname}-${pkgver}"
76   make check
79 package() {
80   cd "${pkgname}-${pkgname}-${pkgver}"
81   # make DESTDIR="${pkgdir}/" install
82   make -j1 DESTDIR="${pkgdir}/" install
84   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
86   # Upstream expects lib389 and 389-ds-base to be shipped in the same package more or less
87   # so that's why it's not a split package.
88   cd src/lib389
89   python setup.py install --skip-build -O1 --root="${pkgdir}"
90   mv "${pkgdir}"/usr/sbin/* "${pkgdir}"/usr/bin/
91   rmdir "${pkgdir}"/usr/sbin
93   install -Dm644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
94   install -Dm644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"