summaryrefslogtreecommitdiff
path: root/core/krb5/PKGBUILD
blob: 4e3dd2c4ff7d6dc11756a4836cf8a9d051c602ea (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
# $Id: PKGBUILD 122855 2011-05-06 19:36:38Z stephane $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>

pkgname=krb5
pkgver=1.9.1
pkgrel=1
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')
conflicts=('heimdal')
backup=('etc/krb5/krb5.conf' 'etc/krb5/kdc.conf')
source=(http://web.mit.edu/kerberos/dist/${pkgname}/1.9/${pkgname}-${pkgver}-signed.tar
        kadmind.rc
        krb5-kdc.rc)
sha1sums=('e23a1795a237521493da9cf3443ac8b98a90c066'
          '640e3046c6558313d2be81cf2252afc8622892b0'
          '77d2312ecd8bf12a6e72cc8fd871a8ac93b23393')
options=('!emptydirs')

build() {
   tar zxvf ${pkgname}-${pkgver}.tar.gz
   cd "${srcdir}/${pkgname}-${pkgver}/src"

   export CFLAGS+=" -fPIC -fno-strict-aliasing -fstack-protector-all"
   export CPPFLAGS+=" -I/usr/include/et"
   ./configure --prefix=/usr \
               --sysconfdir=/etc/krb5 \
               --mandir=/usr/share/man \
               --localstatedir=/var/lib \
               --enable-shared \
               --with-system-et \
               --with-system-ss \
               --disable-rpath \
               --without-tcl \
               --enable-dns-for-realm \
               --with-ldap

   make
}

check() {
   # We can't do this in the build directory.
   cd "${srcdir}/${pkgname}-${pkgver}"
   make -C src check
}

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

   install -D -m 644 config-files/kdc.conf "${pkgdir}"/etc/krb5/kdc.conf
   install -D -m 644 config-files/krb5.conf "${pkgdir}"/etc/krb5/krb5.conf

   install -d -m 755 "${pkgdir}"/etc/rc.d
   install -m 755 ../../krb5-kdc.rc "${pkgdir}"/etc/rc.d
   install -m 755 ../../kadmind.rc "${pkgdir}"/etc/rc.d

   install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/NOTICE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}