diff --git a/packages/krb5/build.sh b/packages/krb5/build.sh index d69a1f3a6..52655e1f6 100644 --- a/packages/krb5/build.sh +++ b/packages/krb5/build.sh @@ -1,12 +1,20 @@ TERMUX_PKG_HOMEPAGE=https://web.mit.edu/kerberos TERMUX_PKG_DESCRIPTION="The Kerberos network authentication system" TERMUX_PKG_VERSION=1.15.1 -TERMUX_PKG_DEPENDS="libandroid-support, libandroid-glob, readline, c-ares, openssl, libutil" +TERMUX_PKG_REVISION=1 +TERMUX_PKG_DEPENDS="libandroid-support, libandroid-glob, readline, openssl, libutil, libdb" TERMUX_PKG_SRCURL="https://web.mit.edu/kerberos/dist/krb5/1.15/krb5-$TERMUX_PKG_VERSION.tar.gz" TERMUX_PKG_SHA256=437c8831ddd5fde2a993fef425dedb48468109bb3d3261ef838295045a89eb45 TERMUX_PKG_FOLDERNAME="krb5-$TERMUX_PKG_VERSION/src" TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" -TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --with-readline --with-netlib=-lcares --without-system-verto" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-readline +--without-system-verto +--with-netlib=-lc +--enable-dns-for-realm +--sbindir=$TERMUX_PREFIX/bin +--with-size-optimizations +--with-system-db +" termux_step_pre_configure () { # cannot test these when cross compiling @@ -19,3 +27,15 @@ termux_step_pre_configure () { LDFLAGS="$LDFLAGS -landroid-glob -llog" } + +termux_step_post_make_install () { + # Sample KDC config file + install -dm 700 $TERMUX_PREFIX/var/krb5kdc + install -pm 600 $TERMUX_PKG_SRCDIR/config-files/kdc.conf $TERMUX_PREFIX/var/krb5kdc/kdc.conf + + # Default configuration file + install -pm 600 $TERMUX_PKG_SRCDIR/config-files/krb5.conf $TERMUX_PREFIX/etc/krb5.conf + + install -dm 700 $TERMUX_PREFIX/share/aclocal + install -m 600 $TERMUX_PKG_SRCDIR/util/ac_check_krb5.m4 $TERMUX_PREFIX/share/aclocal +} diff --git a/packages/krb5/config-files-kdc.conf.patch b/packages/krb5/config-files-kdc.conf.patch new file mode 100644 index 000000000..24059b295 --- /dev/null +++ b/packages/krb5/config-files-kdc.conf.patch @@ -0,0 +1,24 @@ +--- ./config-files/kdc.conf 2017-03-03 03:36:02.000000000 +0530 ++++ ../kdc.conf 2017-04-02 20:29:55.296108766 +0530 +@@ -1,14 +1,14 @@ + [kdcdefaults] +- kdc_listen = 88 +- kdc_tcp_listen = 88 ++ kdc_listen = 1088 ++ kdc_tcp_listen = 1088 + + [realms] + ATHENA.MIT.EDU = { +- database_name = /usr/local/var/krb5kdc/principal +- acl_file = /usr/local/var/krb5kdc/kadm5.acl +- key_stash_file = /usr/local/var/krb5kdc/.k5.ATHENA.MIT.EDU +- kdc_listen = 88 +- kdc_tcp_listen = 88 ++ database_name = @TERMUX_PREFIX@/var/krb5kdc/principal ++ acl_file = @TERMUX_PREFIX@/var/krb5kdc/kadm5.acl ++ key_stash_file = @TERMUX_PREFIX@/var/krb5kdc/.k5.ATHENA.MIT.EDU ++ kdc_listen = 1088 ++ kdc_tcp_listen = 1088 + max_life = 10h 0m 0s + max_renewable_life = 7d 0h 0m 0s + } diff --git a/packages/krb5/krb5-config_LDFLAGS.patch b/packages/krb5/krb5-config_LDFLAGS.patch new file mode 100644 index 000000000..e57167667 --- /dev/null +++ b/packages/krb5/krb5-config_LDFLAGS.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/show_bug.cgi?id=448778 +--- ./build-tools/krb5-config.in 2012-12-18 02:47:04.000000000 +0000 ++++ ./build-tools/krb5-config.in 2012-12-28 07:13:16.582693363 +0000 +@@ -217,7 +217,7 @@ + -e 's#\$(PROG_RPATH)#'$libdir'#' \ + -e 's#\$(PROG_LIBPATH)#'$libdirarg'#' \ + -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \ +- -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \ ++ -e 's#\$(LDFLAGS)##' \ + -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \ + -e 's#\$(CFLAGS)##'` + diff --git a/packages/krb5/plugins-kdb-db2.patch b/packages/krb5/plugins-kdb-db2.patch new file mode 100644 index 000000000..5c2a79d79 --- /dev/null +++ b/packages/krb5/plugins-kdb-db2.patch @@ -0,0 +1,44 @@ +--- ./plugins/kdb/db2/policy_db.h 2017-03-03 03:36:02.000000000 +0530 ++++ ../policy_db.h 2017-04-02 09:46:43.244368060 +0530 +@@ -30,7 +30,7 @@ + where we find u_int32_t. */ + #include + #include +-#include ++#include + #include "adb_err.h" + #include + +--- ./plugins/kdb/db2/adb_openclose.c 2017-03-03 03:36:02.000000000 +0530 ++++ ../adb_openclose.c 2017-04-02 09:50:13.854729855 +0530 +@@ -11,7 +11,7 @@ + #include + #include "policy_db.h" + #include +-#include ++#include + + struct _locklist { + osa_adb_lock_ent lockinfo; +--- ./plugins/kdb/db2/db2_exp.c 2017-03-03 03:36:02.000000000 +0530 ++++ ../db2_exp.c 2017-04-02 09:51:07.528042151 +0530 +@@ -38,7 +38,7 @@ + #include + #endif + +-#include ++#include + #include + #include + #include +--- ./plugins/kdb/db2/kdb_db2.c 2017-03-03 03:36:02.000000000 +0530 ++++ ../kdb_db2.c 2017-04-02 09:52:14.924568844 +0530 +@@ -57,7 +57,7 @@ + #include + #endif + +-#include ++#include + #include + #include + #include diff --git a/packages/libdb/build.sh b/packages/libdb/build.sh index 4c95b1132..ed1b955ea 100644 --- a/packages/libdb/build.sh +++ b/packages/libdb/build.sh @@ -2,11 +2,13 @@ TERMUX_PKG_HOMEPAGE=https://www.oracle.com/database/berkeley-db TERMUX_PKG_DESCRIPTION="The Berkeley DB embedded database system (library)" TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" TERMUX_PKG_VERSION=6.2.23 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=http://download.oracle.com/berkeley-db/db-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=47612c8991aa9ac2f6be721267c8d3cdccf5ac83105df8e50809daea24e95dc7 TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --enable-hash --enable-smallbuild +--enable-compat185 db_cv_atomic=gcc-builtin " TERMUX_PKG_RM_AFTER_INSTALL="docs"