summaryrefslogtreecommitdiff
path: root/package/krb5/Makefile
blob: 0dce661cc7e47f30ea4f8db326b901118641e59b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(TOPDIR)/rules.mk

PKG_NAME:=		krb5
PKG_VERSION:=		1.9
PKG_RELEASE:=		2
PKG_MD5SUM:=		220c3dbb05a1bae1e6ad0bec4a6ac331
PKG_DESCR:=		MIT kerberos server
PKG_SECTION:=		crypto
PKG_DEPENDS:=		libkrb5 libncurses libss libcom-err
PKG_BUILDDEP:=		ncurses e2fsprogs
PKG_URL:=		http://web.mit.edu/kerberos/
PKG_SITES:=		http://web.mit.edu/kerberos/dist/krb5/${PKG_VERSION}/
PKG_NOPARALLEL:=	1

PKG_SUBPKGS:=		KRB5_SERVER LIBKRB5
PKGSD_LIBKRB5:=		MIT kerberos libraries
PKGSC_LIBKRB5:=		libs

DISTFILES:=		${PKG_NAME}-${PKG_VERSION}-signed.tar
WRKSRC=			${WRKDIST}/src

include $(TOPDIR)/mk/package.mk

$(eval $(call PKG_template,KRB5_SERVER,krb5-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBKRB5,libkrb5,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBKRB5},${PKGSC_LIBKRB5}))

TARGET_CPPFLAGS+=	-I${STAGING_TARGET_DIR}/usr/include/et
CONFIGURE_ARGS+=	--disable-static \
			--disable-profiled \
			--with-system-ss \
			--with-system-et \
			--without-tcl
CONFIGURE_ENV+=		krb5_cv_attr_constructor_destructor=yes,yes \
			ac_cv_func_regcomp=yes \
			ac_cv_printf_positional=yes \
			ac_cv_file__etc_environment=no \
			ac_cv_file__etc_TIMEZONE=no

post-extract:
	(cd ${WRKDIR}; tar xzf ${PKG_NAME}-${PKG_VERSION}.tar.gz)

pre-build:
	# fix nm call in script, we need the GNU version of nm
	$(SED) "s#@@NM@@#${NM}#" ${WRKSRC}/util/export-check.pl

post-install:
	${INSTALL_DIR} ${IDIR_KRB5_SERVER}/etc
	${INSTALL_DIR} ${IDIR_KRB5_SERVER}/etc/krb5kdc
	${INSTALL_DIR} ${IDIR_KRB5_SERVER}/usr/sbin
	${INSTALL_DIR} ${IDIR_KRB5_SERVER}/usr/lib
	${INSTALL_DIR} ${IDIR_KRB5_SERVER}/usr/lib/krb5/plugins/kdb
	${INSTALL_DATA} ./files/kdc.conf ${IDIR_KRB5_SERVER}/etc/krb5kdc
	${INSTALL_BIN} ${WRKINST}/usr/bin/{ktutil,kadmin} \
		${IDIR_KRB5_SERVER}/usr/sbin
	${INSTALL_BIN} ${WRKINST}/usr/sbin/{kdb5_util,krb5kdc,kadmind,kadmin.local} \
		${IDIR_KRB5_SERVER}/usr/sbin
	${INSTALL_DATA} ${WRKINST}/usr/lib/krb5/plugins/kdb/db2.so \
		${IDIR_KRB5_SERVER}/usr/lib/krb5/plugins/kdb
	${CP} ${WRKINST}/usr/lib/lib{gssrpc,kadm5clnt*,kadm5srv*,kdb5}.so* \
		${IDIR_KRB5_SERVER}/usr/lib

libkrb5-install:
	${INSTALL_DIR} ${IDIR_LIBKRB5}/etc
	${INSTALL_DIR} ${IDIR_LIBKRB5}/usr/lib
	${INSTALL_DATA} ./files/krb5.conf ${IDIR_LIBKRB5}/etc
	${CP} ${WRKINST}/usr/lib/lib{gssapi_krb5,k5crypto,krb5,krb5support}.so* \
		${IDIR_LIBKRB5}/usr/lib
	echo '/usr/lib/libgssapi_krb5.so		mechglue_internal_krb5_init' \
		> ${IDIR_LIBKRB5}/etc/gssapi_mech.conf

include ${TOPDIR}/mk/pkg-bottom.mk