archrelease: copy trunk to community-any
[ArchLinux/community.git] / sssd / repos / community-x86_64 / PKGBUILD
blob48819bed81c6c5ef1f7a61ff8f1a5f68a3fe3ecf
1 # Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
2 # Maintainer: Mantas M. <grawity@gmail.com>
4 pkgname=sssd
5 pkgver=2.9.0
6 pkgrel=1
7 pkgdesc="System Security Services Daemon"
8 arch=('x86_64')
9 url="https://github.com/SSSD/sssd"
10 license=('GPL3')
11 depends=(
12   'bind'          # for nsupdate
13   'c-ares'
14   'cyrus-sasl-gssapi'
15   'ding-libs'
16   'libnl'
17   'libunistring'
18   'smbclient'     # for libndr-nbt
19   'nfsidmap'
20   'jansson'
21   'jose'
22   'libtevent.so'
23   'libldb.so'
24   'curl'
25   'pcre2'
27 makedepends=(
28   'docbook-xsl'
29   'doxygen'
30   'python'
31   'samba'         # for libndr-nbt headers
32   'systemd'
33   'tevent'
34   'ldb'
35   'bc'
37 checkdepends=(
38   'check'
39   'cmocka'
40   'libfaketime'
41   'openssh'
42   'softhsm'
44 options=('!lto')
45 backup=('etc/logrotate.d/sssd')
46 source=("https://github.com/SSSD/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"{,.asc}
47         "https://patch-diff.githubusercontent.com/raw/SSSD/sssd/pull/6724/file-watch-realpath.patch")
48 sha512sums=('cf65572cfa6468c4b3edc3a33a48ab6d58979917901662eb8b2d8fc5931494be81da13295246500a3a315b71d0395594c9a565014e5875f3cdde50da096f253d'
49             'SKIP'
50             '778b448ab80cac2f225802746b1db53656ba7bde4deaca9596f0509ff4fb057a82812c43f7c7e5b70afcc7622ff61081f48a511d270376abb144f382c2d11ad0')
51 validpgpkeys=('C13CD07FFB2DB1408E457A3CD3D21B2910CF6759')
53 prepare() {
54   cd "$srcdir/$pkgname-$pkgver"
55   for f in "${source[@]}"; do
56     f=$(basename "$f")
57     if [[ $f == *.patch ]]; then
58       patch -p1 < "$srcdir/$f"
59     fi
60   done
62   sed -i 's#/var/run/#/run/#' src/examples/logrotate
64   # Fix issue with autoconf 2.70+
65   sed '/AM_PROG_CC_C_O/ i AC_PROG_CPP' -i configure.ac
67   # dbus policy files in /usr/share/dbus-1
68   sed -i 's/^dbuspolicydir = $(sysconfdir)/dbuspolicydir = $(datadir)/' Makefile.in
70   # fix search path for libsofthsm2.so
71   # see: https://github.com/SSSD/sssd/issues/5329
72   sed -i 's#/usr/lib64/pkcs11/libsofthsm2.so ##' src/external/test_ca.m4
74   # remove flaky network test
75   sed '/fail_over-tests/d' -i Makefile.am
76   autoreconf -fiv
79 build() {
80   cd "$srcdir/$pkgname-$pkgver"
81   ./configure \
82     --prefix=/usr                                 \
83     --sbindir=/usr/bin                            \
84     --sysconfdir=/etc                             \
85     --localstatedir=/var                          \
86     --libexecdir=/usr/lib/sssd                    \
87     --datadir=/usr/share                          \
88     --enable-pammoddir=/usr/lib/security          \
89     --enable-pac-responder                        \
90     --with-initscript=systemd                     \
91     --with-os=fedora                              \
92     --with-pid-path=/run                          \
93     --without-python2-bindings                    \
94     --with-python3-bindings                       \
95     --with-syslog=journald                        \
96     --without-selinux                             \
97     --without-semanage                            \
98     --with-systemdunitdir=/usr/lib/systemd/system \
99     ;
100   sed -i '/\<HAVE_KRB5_SET_TRACE_CALLBACK\>/d' config.h
101   make
104 check() {
105   cd "$srcdir/$pkgname-$pkgver"
106   make check
109 package() {
110   cd "$srcdir/$pkgname-$pkgver"
111   make -j1 DESTDIR="$pkgdir/" install
112   rm -rf "$pkgdir"/etc/rc.d
113   rm -rf "$pkgdir"/lib
114   rm -rf "$pkgdir"/run
115   rm -f "$pkgdir"/usr/lib/ldb/modules/ldb/memberof.la
116   find "$pkgdir"/usr -depth -type d \
117     -exec rmdir --ignore-fail-on-non-empty {} \;
119   install -Dm0644 src/examples/logrotate "$pkgdir/etc/logrotate.d/sssd"
121   cd "$srcdir"
122   rm -rf "$pkgdir/etc/systemd" # remove the drop-in
125 # vim: ts=2:sw=2:et:nowrap