core/krb5/PKGBUILD
2013-07-18 22:44:58 +00:00

86 lines
2.8 KiB
Bash

#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer inkane@chakra-project.org
# contributor abveritas[at]chakra-project[dot]org>
pkgname=krb5
pkgver=1.11.3
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.conf' 'var/lib/krb5kdc/kdc.conf')
source=("http://web.mit.edu/kerberos/dist/${pkgname}/1.11/${pkgname}-${pkgver}-signed.tar"
'krb5-kadmind.service'
'krb5-config_LDFLAGS.patch'
'krb5-kdc.service'
'krb5-kpropd.service'
'krb5-kpropd@.service'
'krb5-kpropd.socket')
md5sums=('56f0ae274b285320b8a597cb89442449'
'd2c898d376ebe5c62b873da7cab0f7e7'
'656e242de9b5ada1edf398983db51eef'
'f0245d33083337f95654f4caf1d32f57'
'3dddf2f79ef74c4e736711e41228ee91'
'babefac221331f7131a29faac33cc5bc'
'5b9cee689e4f8085d39ef4e05f1ddd9a')
options=('!emptydirs')
build() {
tar zxvf ${pkgname}-${pkgver}.tar.gz
cd "${srcdir}/${pkgname}-${pkgver}/src"
# 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
rm lib/krb5/krb/deltat.c
# fix for the bug described at https://bugs.archlinux.org/task/25384
sed -i "/KRB5ROOT=/s/\/local//" util/ac_check_krb5.m4
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 \
--with-ldap \
--without-system-verto
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}/src"
make DESTDIR="${pkgdir}" EXAMPLEDIR="/usr/share/doc/${pkgname}/examples" install
# Sample KDC config file
install -dm 755 "${pkgdir}"/var/lib/krb5kdc
install -pm 644 config-files/kdc.conf "${pkgdir}"/var/lib/krb5kdc/kdc.conf
install -m 644 plugins/kdb/ldap/libkdb_ldap/kerberos.{ldif,schema} "${pkgdir}"/usr/share/doc/${pkgname}/examples
# Default configuration file
install -dm 755 "${pkgdir}"/etc
install -pm 644 config-files/krb5.conf "${pkgdir}"/etc/krb5.conf
install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/NOTICE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
# 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
}