archrelease: copy trunk to staging-x86_64
[arch-packages.git] / krb5 / repos / core-x86_64 / PKGBUILD
blob05dac5eab5993775001781e46ae47f887dff98d5
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 pkgname=krb5
4 _pkgvermajor=1.20
5 pkgver=1.20.1
6 pkgrel=1
7 pkgdesc='The Kerberos network authentication system'
8 url='https://web.mit.edu/kerberos/'
9 arch=('x86_64')
10 license=('custom')
11 depends=('glibc' 'e2fsprogs' 'libldap' 'keyutils' 'libverto-module-base'
12          libkeyutils.so libss.so libcom_err.so libverto.so)
13 makedepends=('perl')
14 provides=(
15   libgssapi_krb5.so
16   libgssrpc.so
17   libk5crypto.so
18   libkadm5clnt_mit.so
19   libkadm5srv_mit.so
20   libkdb5.so
21   libkdb_ldap.so
22   libkrad.so
23   libkrb5.so
24   libkrb5support.so
26 backup=(
27   'etc/krb5.conf'
28   'var/lib/krb5kdc/kdc.conf'
30 options=('!emptydirs')
31 source=(https://web.mit.edu/kerberos/dist/krb5/${_pkgvermajor}/${pkgname}-${pkgver}.tar.gz{,.asc}
32         0001-krb5-config_LDFLAGS.patch::https://github.com/krb5/krb5/commit/0bfd22feb6493f34fdc894daaf680c3a2f2e7784.patch
33         krb5-kadmind.service
34         krb5-kdc.service
35         krb5-kpropd.service
36         krb5-kpropd@.service
37         krb5-kpropd.socket)
38 sha512sums=('6f57479f13f107cd84f30de5c758eb6b9fc59171329c13e5da6073b806755f8d163eb7bd84767ea861ad6458ea0c9eeb00ee044d3bcad01ef136e9888564b6a2'
39             'SKIP'
40             '446809824a703d8c9d395e020953abd89126cf559ceee33b4671cb90f85a3ed2a0d85f9aea6ee6355e6c49b4ffe3874cbabdeb63d4b580e440fe25ba8ffec360'
41             'ae1fa980e8e30a83dfef7fe233be70a9ec530ebaffc344a0e7eba61e7de4c800421b45cf203f1e526cc8351754038d6539184b30aa049a567e2a9e80f0d39841'
42             'b137ff0154f9af4891e9e78cec692af47ecfd92ca9ce6e00b40ef137d942ba04e8caf483fc5d464b9559ad4a5c4e75ec57b6eab7fc35181115ca1606c0b316c1'
43             'b57bbe55c19c92a04cd3e8ad569adcc5aedd4246075b2e6dbcc363e523853332a3e7650be85098b91e495799f8b728ea550495ab303f46ccd9298a2260120b2f'
44             'a31ed42e988fed892dd3f1ca1942c3cd4bf391d894c9cebe5e91f52797392261e129727590ae06e2f727bb7b0f8d73a7aa35e8b983d6bad77f22a099091ee944'
45             '4e7ae175425e0787a1d5ff959471a88bf5af4cd6e213dc6d4048902fab7547c1186a082370b523f9549f5096acfab1fb03b4839e42bd80dc539130ae4bb3ea55')
46 validpgpkeys=('2C732B1C0DBEF678AB3AF606A32F17FD0055C305'  # Tom Yu <tlyu@mit.edu>
47               'C4493CB739F4A89F9852CBC20CBA08575F8372DF') # Greg Hudson <ghudson@mit.edu>
49 prepare() {
50   cd ${pkgname}-${pkgver}
52   # https://github.com/krb5/krb5/commit/0bfd22feb6493f34fdc894daaf680c3a2f2e7784
53   # https://krbdev.mit.edu/rt/Ticket/Display.html?id=9057
54   patch -Np1 < "${srcdir}"/0001-krb5-config_LDFLAGS.patch
56   # FS#25384
57   sed -i "/KRB5ROOT=/s/\/local//" src/util/ac_check_krb5.m4
60 build() {
61    cd ${pkgname}-${pkgver}/src
62    export CFLAGS+=" -fPIC -fno-strict-aliasing -fstack-protector-all"
63    export CPPFLAGS+=" -I/usr/include/et"
64    ./configure --prefix=/usr \
65                --sbindir=/usr/bin \
66                --sysconfdir=/etc \
67                --localstatedir=/var/lib \
68                --enable-shared \
69                --with-system-et \
70                --with-system-ss \
71                --disable-rpath \
72                --without-tcl \
73                --enable-dns-for-realm \
74                --with-ldap \
75                --with-system-verto
76    make
79 package() {
80    cd ${pkgname}-${pkgver}/src
81    make DESTDIR="${pkgdir}" EXAMPLEDIR=/usr/share/doc/${pkgname}/examples install
83    # Fix FS#29889
84    install -m 644 plugins/kdb/ldap/libkdb_ldap/kerberos.{ldif,schema} \
85      "${pkgdir}/usr/share/doc/${pkgname}/examples"
87    install -Dpm 644 config-files/krb5.conf -t "${pkgdir}/etc"
88    install -Dpm 644 config-files/kdc.conf -t "${pkgdir}/var/lib/krb5kdc"
90    install -Dm 644 util/ac_check_krb5.m4 -t "${pkgdir}/usr/share/aclocal"
92    install -Dm 644 "${srcdir}"/${pkgname}-${pkgver}/NOTICE \
93      "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
95    # systemd stuff
96    install -Dm 644 "${srcdir}"/krb5-{kadmind.service,kdc.service,kpropd.service,kpropd@.service,kpropd.socket} \
97       -t "${pkgdir}/usr/lib/systemd/system"
101 # vim: ts=2 sw=2 et: