summaryrefslogtreecommitdiff
path: root/package/heimdal/Makefile
blob: 3ae793bc0677f8f4d5f42cb408c3ac8a42ee4b09 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# 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:=		heimdal
PKG_VERSION:=		1.2.1
PKG_RELEASE:=		1
PKG_MD5SUM:=		6e5028077e2a6b101a4a72801ba71b9e
PKG_DESCR:=		Kerberos 5 server
PKG_SECTION:=		net
PKG_DEPENDS:=		heimdal-libs heimdal-client-libs libncurses
PKG_URL:=		http://www.h5l.org
PKG_SITES:=		http://www.h5l.org/dist/src/

PKG_DESCR_1:=		Kerberos 5 server libraries
PKG_SECTION_1:=		libs

PKG_DESCR_2:=		Kerberos 5 client libraries
PKG_SECTION_2:=		libs

include $(TOPDIR)/mk/package.mk

ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_BDB),y)
PKG_DEPENDS+=		libdb
endif

ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_LDAP),y)
PKG_DEPENDS+=		libopenldap
endif

$(eval $(call PKG_template,HEIMDAL_SERVER,heimdal-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,HEIMDAL_LIBS,heimdal-libs,$(PKG_VERSION)-${PKG_RELEASE},,${PKG_DESCR_1},${PKG_SECTION_1}))
$(eval $(call PKG_template,HEIMDAL_CLIENT_LIBS,heimdal-client-libs,$(PKG_VERSION)-${PKG_RELEASE},,${PKG_DESCR_2},${PKG_SECTION_2}))

CONFIGURE_OPTS:=	--with-hdbdir=/etc/heimdal \
			--disable-otp \
			--disable-ndbm-db \
			--libexecdir=/usr/sbin \
			--sysconfdir=/etc/heimdal

ifeq ($(ADK_IPV6),y)
CONFIGURE_OPTS+=	--with-ipv6
else
CONFIGURE_OPTS+=	--without-ipv6
endif

ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_BDB),y)
CONFIGURE_ARGS+=	--enable-berkeley-db
else
CONFIGURE_ARGS+=        --disable-berkeley-db
endif

ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_LDAP),y)
CONFIGURE_ARGS+=	--with-openldap=yes
CONFIGURE_ARGS+=	--with-openldap-include=${STAGING_DIR}/usr
CONFIGURE_ARGS+=	--with-openldap-lib=${STAGING_DIR}/usr
else
CONFIGURE_ARGS+=        --without-openldap
endif

ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
CONFIGURE_OPTS+=	--enable-pk-init
else
CONFIGURE_OPTS+=	--disable-pk-init
endif

TCFLAGS+=              -pthread
CONFIGURE_STYLE=	gnu
CONFIGURE_ARGS+=	${CONFIGURE_OPTS}
CONFIGURE_ENV+=		ac_cv_func_getaddrinfo_numserv=yes
BUILD_STYLE=		auto
INSTALL_STYLE=		auto confprog

pre-configure:
	(cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
		CFLAGS="-static" \
		./configure ${CONFIGURE_OPTS} \
	);
	${MAKE} -C ${WRKBUILD}/lib/roken
	${MAKE} -C ${WRKBUILD}/lib/vers
	${MAKE} -C ${WRKBUILD}/lib/editline
	${MAKE} -C ${WRKBUILD}/lib/com_err compile_et
	${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile
	${MAKE} -C ${WRKBUILD}/lib/sl slc
	${INSTALL_BIN} ${WRKBUILD}/lib/com_err/compile_et \
		${STAGING_TOOLS}/bin
	${INSTALL_BIN} ${WRKBUILD}/lib/asn1/asn1_compile \
		${STAGING_TOOLS}/bin
	${INSTALL_BIN} ${WRKBUILD}/lib/sl/slc \
		${STAGING_TOOLS}/bin
	${MAKE} -C ${WRKBUILD}/lib/com_err clean
	${MAKE} -C ${WRKBUILD} clean

post-install:
ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y)
	${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
	${INSTALL_DATA} ${WRKBUILD}/lib/hdb/hdb.schema \
		${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
endif
	${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/heimdal
	${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/sbin
	${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/lib
	${CP} ${WRKINST}/usr/lib/libkdc.so* ${IDIR_HEIMDAL_SERVER}/usr/lib
	${CP} ${WRKINST}/usr/lib/libkadm5srv.so* ${IDIR_HEIMDAL_SERVER}/usr/lib
	${CP} ${WRKINST}/usr/lib/libhdb.so* ${IDIR_HEIMDAL_SERVER}/usr/lib
	${INSTALL_DATA} ./files/krb5.conf ${IDIR_HEIMDAL_SERVER}/etc/heimdal
	${INSTALL_DATA} ./files/kdc.conf ${IDIR_HEIMDAL_SERVER}/etc/heimdal
	${INSTALL_DATA} ./files/kadmind.acl ${IDIR_HEIMDAL_SERVER}/etc/heimdal
	${INSTALL_BIN} ${WRKINST}/usr/sbin/kdc ${IDIR_HEIMDAL_SERVER}/usr/sbin/
	${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmind ${IDIR_HEIMDAL_SERVER}/usr/sbin/
	${INSTALL_BIN} ${WRKINST}/usr/sbin/kpasswdd ${IDIR_HEIMDAL_SERVER}/usr/sbin/
	${INSTALL_BIN} ${WRKINST}/usr/sbin/kstash ${IDIR_HEIMDAL_SERVER}/usr/sbin/
	${INSTALL_BIN} ${WRKINST}/usr/sbin/ktutil ${IDIR_HEIMDAL_SERVER}/usr/sbin/
	${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmin ${IDIR_HEIMDAL_SERVER}/usr/sbin/
	# heimdal libs
	${INSTALL_DIR} ${IDIR_HEIMDAL_LIBS}/usr/lib
ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
	${CP} ${WRKINST}/usr/lib/libhx509.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
endif
	${CP} ${WRKINST}/usr/lib/libheimntlm.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libwind.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libgssapi.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libkafs.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libkrb5.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libcom_err.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libasn1.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libroken.so* ${IDIR_HEIMDAL_LIBS}/usr/lib
	# heimdal client libs
	${INSTALL_DIR} ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libeditline.so* ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libsl.so* ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib
	${CP} ${WRKINST}/usr/lib/libkadm5clnt.so* ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib

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