69 lines
2.2 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../heimdal/heimdal.conf
# Copyright (C) 2007 - 2012 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
if [ $prefix_auto = 1 ]; then
prefix=opt/heimdal
set_confopt
fi
localstatedir=/var/heimdal
# we patch cf/pthreads.m4
autogen=1
if atstage native; then
if pkginstalled -f openssl; then
pkgprefix -t openssl
var_append extraconfopt ' ' "--with-openssl=$( pkgprefix sysconfdir openssl )"
# do not install hcrypto related manpages
var_append patchfiles ' ' "$confdir/*no-hcrypto-manpages.diff"
fi
if [ "$SDECFG_PKG_HEIMDAL_LDAP" = "1" ] && pkginstalled -f openldap; then
pkgprefix -t openldap
var_append extraconfopt ' ' "--with-openldap=/$( pkgprefix openldap )"
[ "$SDECFG_PKG_OPENLDAP_CLIENTONLY" = "0" ] && \
hook_add postmake 5 "cp -v `match_source_file -p schema` \
$(pkgprefix sysconfdir openldap)/schema/"
fi
fi
# use system sqlite if available
if pkginstalled -f sqlite; then
pkgprefix -t sqlite
var_append extraconfopt ' ' "--with-sqlite3=$( pkgprefix -r sqlite )"
fi
# use system readline if available which also avoids the installation of the
# included libeditline
if pkginstalled -f readline; then
pkgprefix -t readline
var_append extraconfopt ' ' "--with-readline=$( pkgprefix -r readline )"
fi
var_append extraconfopt ' ' "--enable-shared"
var_append extraconfopt ' ' "--libexecdir=$sbindir"
pkg_heimdal_preconf() {
sed -i -e "s/#undef HAVE_RES_NSEARCH//" lib/roken/resolve.c
}
hook_add preconf 5 "pkg_heimdal_preconf"
# install sample krb5.conf
hook_add postmake 6 "cp -v krb5.conf $sysconfdir/krb5.conf-dist"
# do not install catpages
var_append makeinstopt ' ' "INSTALL_CATPAGES=no"