PKGBUILD 2.84 KB
Newer Older
1 2 3
#
# Core Packages for Chakra, part of chakra-project.org
#
Fabian's avatar
Fabian committed
4 5
# maintainer inkane@chakra-project.org
# contributor abveritas[at]chakra-project[dot]org>
6 7

pkgname=krb5
Fabian's avatar
Fabian committed
8
pkgver=1.11.3
Fabian's avatar
Fabian committed
9
pkgrel=2
10 11 12 13 14 15 16 17
pkgdesc="The Kerberos network authentication system"
arch=('i686' 'x86_64')
url="http://web.mit.edu/kerberos/"
license=('custom')
depends=('e2fsprogs' 'libldap' 'keyutils')
makedepends=('perl')
provides=('heimdal')
replaces=('heimdal')
Phil's avatar
Phil committed
18
conflicts=('heimdal')
philm's avatar
philm committed
19
backup=('etc/krb5.conf' 'var/lib/krb5kdc/kdc.conf')
Fabian's avatar
Fabian committed
20
source=("http://web.mit.edu/kerberos/dist/${pkgname}/1.11/${pkgname}-${pkgver}-signed.tar"
21
        'krb5-kadmind.service'
Fabian's avatar
Fabian committed
22
        'krb5-config_LDFLAGS.patch'
23 24 25 26
        'krb5-kdc.service'
	'krb5-kpropd.service'
	'krb5-kpropd@.service'
	'krb5-kpropd.socket')
Fabian's avatar
Fabian committed
27
md5sums=('56f0ae274b285320b8a597cb89442449'
28
         'd2c898d376ebe5c62b873da7cab0f7e7'
Fabian's avatar
Fabian committed
29
         '656e242de9b5ada1edf398983db51eef'
30 31 32 33
         'f0245d33083337f95654f4caf1d32f57'
         '3dddf2f79ef74c4e736711e41228ee91'
         'babefac221331f7131a29faac33cc5bc'
         '5b9cee689e4f8085d39ef4e05f1ddd9a')
34 35 36 37 38
options=('!emptydirs')

build() {
   tar zxvf ${pkgname}-${pkgver}.tar.gz
   cd "${srcdir}/${pkgname}-${pkgver}/src"
39
   
Fabian's avatar
Fabian committed
40 41 42 43
   # cf https://bugs.gentoo.org/show_bug.cgi?id=448778
   # fix issue with krb5-conf --libs returning wrong output
   patch -Np2 -i "${srcdir}"/krb5-config_LDFLAGS.patch

44 45
   rm lib/krb5/krb/deltat.c

Fabian's avatar
Fabian committed
46
   # fix for the bug described at https://bugs.archlinux.org/task/25384
47
   sed -i "/KRB5ROOT=/s/\/local//" util/ac_check_krb5.m4
48 49 50 51 52 53 54 55 56 57 58 59

   export CFLAGS+=" -fPIC -fno-strict-aliasing -fstack-protector-all"
   export CPPFLAGS+=" -I/usr/include/et"
   ./configure --prefix=/usr \
               --mandir=/usr/share/man \
               --localstatedir=/var/lib \
               --enable-shared \
               --with-system-et \
               --with-system-ss \
               --disable-rpath \
               --without-tcl \
               --enable-dns-for-realm \
60 61
               --with-ldap \
               --without-system-verto
62 63 64 65 66 67 68
   make
}

package() {
   cd "${srcdir}/${pkgname}-${pkgver}/src"
   make DESTDIR="${pkgdir}" EXAMPLEDIR="/usr/share/doc/${pkgname}/examples" install

philm's avatar
philm committed
69 70 71
   # Sample KDC config file
   install -dm 755 "${pkgdir}"/var/lib/krb5kdc
   install -pm 644 config-files/kdc.conf "${pkgdir}"/var/lib/krb5kdc/kdc.conf
72 73
   
   install -m 644 plugins/kdb/ldap/libkdb_ldap/kerberos.{ldif,schema} "${pkgdir}"/usr/share/doc/${pkgname}/examples
philm's avatar
philm committed
74 75 76 77

   # Default configuration file
   install -dm 755 "${pkgdir}"/etc
   install -pm 644 config-files/krb5.conf "${pkgdir}"/etc/krb5.conf
78 79

   install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/NOTICE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
Samir's avatar
Samir committed
80 81 82 83 84 85

   # install systemd units
   install -dm 755 "${pkgdir}"/usr/lib/systemd/system
   install -m 644 ../../krb5-{kadmind.service,kdc.service,kpropd.service,kpropd@.service,kpropd.socket} \
      "${pkgdir}"/usr/lib/systemd/system
}