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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
# 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.5.2
PKG_RELEASE:= 1
PKG_MD5SUM:= bb23d9dbdafd395d816f7abc598481a1
PKG_DESCR:= Kerberos 5 server
PKG_SECTION:= crypto
PKG_BUILDDEP:= openssl ncurses e2fsprogs readline
PKG_DEPENDS:= libheimdal libncurses libcom-err libreadline libopenssl
PKG_URL:= http://www.h5l.org/
PKG_SITES:= http://www.h5l.org/dist/src/
PKG_NOPARALLEL:= 1
PKG_SUBPKGS:= HEIMDAL_SERVER LIBHEIMDAL
PKGSD_LIBHEIMDAL:= Kerberos 5 libraries
PKGSC_LIBHEIMDAL:= libs
PKG_FLAVOURS_HEIMDAL_SERVER:= WITH_PKINIT
PKGFD_WITH_PKINIT: Enable PK-INIT
PKG_CHOICES_HEIMDAL_SERVER:= WITH_LDAP WITH_BDB
PKGCD_WITH_LDAP:= use OpenLDAP as database backend
PKGCS_WITH_LDAP:= libopenldap
PKGCB_WITH_LDAP:= openldap
PKGCD_WITH_BDB:= use Berkeley DB as database backend
PKGCS_WITH_BDB:= libdb
PKGCB_WITH_BDB:= db
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,HEIMDAL_SERVER,heimdal-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBHEIMDAL,libheimdal,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL},${PKGSC_LIBHEIMDAL}))
TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
CONFIGURE_OPTS:= --with-hdbdir=/etc/heimdal \
--disable-otp \
--disable-ndbm-db \
--libdir=/usr/lib/heimdal \
--libexecdir=/usr/sbin \
--without-sqlite3 \
--disable-sqlite-cache \
--with-openssl=${STAGING_TARGET_DIR}/usr \
--with-readline=${STAGING_TARGET_DIR}/usr \
--with-ipv6 \
--sysconfdir=/etc/heimdal
ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_BDB),y)
CONFIGURE_ARGS+= --with-berkeley-db
else
CONFIGURE_ARGS+= --without-berkeley-db
endif
ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_LDAP),y)
CONFIGURE_ARGS+= --with-openldap=yes
CONFIGURE_ARGS+= --with-openldap-include=${STAGING_TARGET_DIR}/usr
CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_TARGET_DIR}/usr
else
CONFIGURE_ARGS+= --without-openldap
endif
ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_PKINIT),y)
CONFIGURE_OPTS+= --enable-pk-init
else
CONFIGURE_OPTS+= --disable-pk-init \
--disable-kx509
endif
TARGET_CFLAGS+= -I${STAGING_TARGET_DIR}/usr/include/et -pthread
CONFIGURE_ARGS+= ${CONFIGURE_OPTS} --with-cross-tools=${STAGING_HOST_DIR}/bin
CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes
post-extract:
(cd $(WRKBUILD);patch -p1 < $(TOPDIR)/package/heimdal/files/patch-lib_asn1_Makefile.in)
(cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
./configure --prefix=$(STAGING_HOST_DIR) \
--disable-pk-init \
--without-openldap \
--disable-sqlite-cache \
--disable-otp \
);
${MAKE} -C ${WRKBUILD}/include
${MAKE} -C ${WRKBUILD}/lib/roken
${MAKE} -C ${WRKBUILD}/lib/vers
${MAKE} -C ${WRKBUILD}/lib/libedit
${MAKE} -C ${WRKBUILD}/lib/com_err compile_et$(EXEEXT) LDFLAGS="-all-static"
${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile$(EXEEXT) LDFLAGS="-all-static"
${MAKE} -C ${WRKBUILD}/lib/sl slc$(EXEEXT) LDFLAGS="-all-static"
${MAKE} -C ${WRKBUILD}/lib/roken install LDFLAGS="-all-static"
${MAKE} -C ${WRKBUILD}/lib/asn1 install LDFLAGS="-all-static"
${MAKE} -C ${WRKBUILD}/lib/sl install LDFLAGS="-all-static"
$(CP) $(STAGING_HOST_DIR)/libexec/heimdal/{slc,asn1_compile} \
$(STAGING_HOST_DIR)/bin
${MAKE} -C ${WRKBUILD}/lib/sl clean
${MAKE} -C ${WRKBUILD}/lib/asn1 clean
${MAKE} -C ${WRKBUILD}/lib/roken 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/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libkdc.so* \
${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libkadm5srv.so* \
${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libhdb.so* \
${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
${INSTALL_DATA} ./files/{krb5.conf,kdc.conf,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_LIBHEIMDAL}/usr/lib/heimdal
ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
${CP} ${WRKINST}/usr/lib/heimdal/libhx509.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
endif
${CP} ${WRKINST}/usr/lib/heimdal/libheimsqlite.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libheimbase.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libheimntlm.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libwind.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libgssapi.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libkafs.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libkrb5.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libasn1.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libroken.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${INSTALL_DIR} ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libheimedit.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libsl.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
${CP} ${WRKINST}/usr/lib/heimdal/libkadm5clnt.so* \
${IDIR_LIBHEIMDAL}/usr/lib/heimdal
include ${TOPDIR}/mk/pkg-bottom.mk
|