| 1 | TERMUX_PKG_HOMEPAGE=https://web.mit.edu/kerberos |
| 2 | TERMUX_PKG_DESCRIPTION="The Kerberos network authentication system" |
| 3 | TERMUX_PKG_VERSION=1.15.1 |
| 4 | TERMUX_PKG_REVISION=2 |
| 5 | TERMUX_PKG_DEPENDS="libandroid-support, libandroid-glob, readline, openssl, libutil, libdb" |
| 6 | TERMUX_PKG_SRCURL="https://web.mit.edu/kerberos/dist/krb5/1.15/krb5-$TERMUX_PKG_VERSION.tar.gz" |
| 7 | TERMUX_PKG_SHA256=437c8831ddd5fde2a993fef425dedb48468109bb3d3261ef838295045a89eb45 |
| 8 | TERMUX_PKG_FOLDERNAME="krb5-$TERMUX_PKG_VERSION/src" |
| 9 | TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" |
| 10 | TERMUX_PKG_CONFFILES="etc/krb5.conf var/krb5kdc/kdc.conf" |
| 11 | TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-readline |
| 12 | --without-system-verto |
| 13 | --with-netlib=-lc |
| 14 | --enable-dns-for-realm |
| 15 | --sbindir=$TERMUX_PREFIX/bin |
| 16 | --with-size-optimizations |
| 17 | --with-system-db |
| 18 | DEFCCNAME=$TERMUX_PREFIX/tmp/krb5cc_%{uid} |
| 19 | DEFKTNAME=$TERMUX_PREFIX/etc/krb5.keytab |
| 20 | DEFCKTNAME=$TERMUX_PREFIX/var/krb5/user/%{euid}/client.keytab |
| 21 | " |
| 22 | |
| 23 | termux_step_pre_configure () { |
| 24 | # cannot test these when cross compiling |
| 25 | export krb5_cv_attr_constructor_destructor='yes,yes' |
| 26 | export ac_cv_func_regcomp='yes' |
| 27 | export ac_cv_printf_positional='yes' |
| 28 | |
| 29 | # bionic doesn't have getpass |
| 30 | cp "$TERMUX_PKG_BUILDER_DIR/netbsd_getpass.c" "$TERMUX_PKG_SRCDIR/clients/kpasswd/" |
| 31 | |
| 32 | LDFLAGS="$LDFLAGS -landroid-glob -llog" |
| 33 | } |
| 34 | |
| 35 | termux_step_post_make_install () { |
| 36 | # Enable logging to STDERR by default |
| 37 | echo -e "\tdefault = STDERR" >> $TERMUX_PKG_SRCDIR/config-files/krb5.conf |
| 38 | |
| 39 | # Sample KDC config file |
| 40 | install -dm 700 $TERMUX_PREFIX/var/krb5kdc |
| 41 | install -pm 600 $TERMUX_PKG_SRCDIR/config-files/kdc.conf $TERMUX_PREFIX/var/krb5kdc/kdc.conf |
| 42 | |
| 43 | # Default configuration file |
| 44 | install -pm 600 $TERMUX_PKG_SRCDIR/config-files/krb5.conf $TERMUX_PREFIX/etc/krb5.conf |
| 45 | |
| 46 | install -dm 700 $TERMUX_PREFIX/share/aclocal |
| 47 | install -m 600 $TERMUX_PKG_SRCDIR/util/ac_check_krb5.m4 $TERMUX_PREFIX/share/aclocal |
| 48 | } |