summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 882d85d4069b9b903b249de5fdd7b616a6598915 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Maintainer: Michael Lowman <michael.d.lowman@gmail.com>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Mantas M. <grawity@gmail.com>

pkgname=sssd-git
_gitname='sssd'
pkgver=2.3.0.r8.g3ea6e61cd
pkgrel=1
pkgdesc="System Security Services Daemon"
arch=('x86_64')
url="https://github.com/SSSD/sssd"
license=('GPL3')
depends=(
  'bind'          # for nsupdate
  'c-ares'
  'cyrus-sasl-gssapi'
  'ding-libs'
  'libnl'
  'libunistring'
  'nss'
  'smbclient'     # for libndr-nbt
  'nfsidmap'
  'jansson'
)
makedepends=(
  'docbook-xsl'
  'doxygen'
  'python'
  'python2'
  'samba'         # for libndr-nbt headers
  'systemd'
)
provides=('sssd')
conflicts=('sssd')
source=('git+https://github.com/SSSD/sssd')
sha512sums=('SKIP')

pkgver() {
  cd "$_gitname"
  git describe --tag | sed 's/^sssd-//;s/_/./g;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/$_gitname"
  for f in "${source[@]}"; do
    if [[ $f == *.patch ]]; then
      msg2 "Applying $f"
      patch -p1 < "$srcdir/$f"
    fi
  done

  autoreconf -if

  # dbus policy files in /usr/share/dbus-1
  sed -i -e 's/^dbuspolicydir = $(sysconfdir)/dbuspolicydir = $(datadir)/' Makefile.in
}

build() {
  cd "$srcdir/$_gitname"
  ./configure \
    --prefix=/usr                                 \
    --sbindir=/usr/bin                            \
    --sysconfdir=/etc                             \
    --localstatedir=/var                          \
    --libexecdir=/usr/lib/sssd                    \
    --datadir=/usr/share                          \
    --enable-pammoddir=/usr/lib/security          \
    --with-initscript=systemd                     \
    --with-os=fedora                              \
    --with-pid-path=/run                          \
    --with-python3-bindings                       \
    --with-python2-bindings                       \
    --with-syslog=journald                        \
    --without-selinux                             \
    --without-semanage                            \
    --with-systemdunitdir=/usr/lib/systemd/system \
    ;
  sed -i '/\<HAVE_KRB5_SET_TRACE_CALLBACK\>/d' config.h
  make
}

package() {
  cd "$srcdir/$_gitname"
  make -j1 DESTDIR="$pkgdir/" install
  rm -rf "$pkgdir"/etc/rc.d
  rm -rf "$pkgdir"/lib
  rm -rf "$pkgdir"/run
  rm -f "$pkgdir"/usr/lib/ldb/modules/ldb/memberof.la
  find "$pkgdir"/usr -depth -type d \
    -exec rmdir --ignore-fail-on-non-empty {} \;

  cd "$srcdir"
  rm -rf "$pkgdir/etc/systemd" # remove the drop-in
}

# vim: ts=2:sw=2:et:nowrap