1
0

Makefile 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= heimdal
  5. PKG_VERSION:= 1.4
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 31d08bbf47a77827fe97ef3f52b4c9c4
  8. PKG_DESCR:= Kerberos 5 server
  9. PKG_SECTION:= crypto
  10. PKG_BUILDDEP:= openssl ncurses e2fsprogs readline
  11. PKG_DEPENDS:= libheimdal libheimdal-client libncurses libcom-err libreadline
  12. PKG_URL:= http://www.h5l.org/
  13. PKG_SITES:= http://www.h5l.org/dist/src/
  14. PKG_NOPARALLEL:= 1
  15. PKG_SUBPKGS:= HEIMDAL LIBHEIMDAL LIBHEIMDAL_CLIENT
  16. PKGSD_LIBHEIMDAL:= Kerberos 5 server libraries
  17. PKGSC_LIBHEIMDAL:= libs
  18. PKGSD_LIBHEIMDAL_CLIENT:= Kerberos 5 client libraries
  19. PKGSC_LIBHEIMDAL_CLIENT:= libs
  20. PKG_FLAVOURS_HEIMDAL_SERVER:= WITH_PKINIT
  21. PKGFD_WITH_PKINIT: Enable PK-INIT
  22. PKG_CHOICES_HEIMDAL_SERVER:= WITH_LDAP WITH_BDB
  23. PKGCD_WITH_LDAP:= use OpenLDAP as database backend
  24. PKGCS_WITH_LDAP:= libopenldap
  25. PKGCB_WITH_LDAP:= openldap
  26. PKGCD_WITH_BDB:= use Berkeley DB as database backend
  27. PKGCS_WITH_BDB:= libdb
  28. PKGCB_WITH_BDB:= db
  29. include $(TOPDIR)/mk/package.mk
  30. $(eval $(call PKG_template,HEIMDAL_SERVER,heimdal-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  31. $(eval $(call PKG_template,LIBHEIMDAL,libheimdal,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL},${PKGSC_LIBHEIMDAL}))
  32. $(eval $(call PKG_template,LIBHEIMDAL_CLIENT,libheimdal-client,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL_CLIENT},${PKGSC_LIBHEIMDAL_CLIENT}))
  33. CONFIGURE_OPTS:= --with-hdbdir=/etc/heimdal \
  34. --disable-otp \
  35. --disable-ndbm-db \
  36. --libdir=/usr/lib/heimdal \
  37. --libexecdir=/usr/sbin \
  38. --with-openssl=${STAGING_TARGET_DIR}/usr \
  39. --with-readline=${STAGING_TARGET_DIR}/usr \
  40. --with-ipv6 \
  41. --sysconfdir=/etc/heimdal
  42. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_BDB),y)
  43. CONFIGURE_ARGS+= --with-berkeley-db
  44. else
  45. CONFIGURE_ARGS+= --without-berkeley-db
  46. endif
  47. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_LDAP),y)
  48. CONFIGURE_ARGS+= --with-openldap=yes
  49. CONFIGURE_ARGS+= --with-openldap-include=${STAGING_TARGET_DIR}/usr
  50. CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_TARGET_DIR}/usr
  51. else
  52. CONFIGURE_ARGS+= --without-openldap
  53. endif
  54. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_PKINIT),y)
  55. CONFIGURE_OPTS+= --enable-pk-init
  56. else
  57. CONFIGURE_OPTS+= --disable-pk-init \
  58. --disable-kx509
  59. endif
  60. TARGET_CFLAGS+= -I${STAGING_TARGET_DIR}/usr/include/et -pthread
  61. CONFIGURE_ARGS+= ${CONFIGURE_OPTS} --with-cross-tools=${STAGING_HOST_DIR}/bin
  62. CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes
  63. post-extract:
  64. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  65. ./configure --prefix=$(STAGING_HOST_DIR) \
  66. --disable-pk-init \
  67. --without-openldap \
  68. --disable-sqlite-cache \
  69. --disable-otp \
  70. );
  71. ${MAKE} -C ${WRKBUILD}/include
  72. ${MAKE} -C ${WRKBUILD}/lib/roken
  73. ${MAKE} -C ${WRKBUILD}/lib/vers
  74. ${MAKE} -C ${WRKBUILD}/lib/editline
  75. ${MAKE} -C ${WRKBUILD}/lib/com_err compile_et$(EXEEXT) LDFLAGS="-all-static"
  76. ${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile$(EXEEXT) LDFLAGS="-all-static"
  77. ${MAKE} -C ${WRKBUILD}/lib/sl slc$(EXEEXT) LDFLAGS="-all-static"
  78. ${MAKE} -C ${WRKBUILD}/lib/roken install LDFLAGS="-all-static"
  79. ${MAKE} -C ${WRKBUILD}/lib/asn1 install LDFLAGS="-all-static"
  80. ${MAKE} -C ${WRKBUILD}/lib/sl install LDFLAGS="-all-static"
  81. $(CP) $(STAGING_HOST_DIR)/libexec/heimdal/{slc,asn1_compile} \
  82. $(STAGING_HOST_DIR)/bin
  83. ${MAKE} -C ${WRKBUILD}/lib/sl clean
  84. ${MAKE} -C ${WRKBUILD}/lib/asn1 clean
  85. ${MAKE} -C ${WRKBUILD}/lib/roken clean
  86. ${MAKE} -C ${WRKBUILD} clean
  87. post-install:
  88. ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y)
  89. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  90. ${INSTALL_DATA} ${WRKBUILD}/lib/hdb/hdb.schema \
  91. ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  92. endif
  93. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  94. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/sbin
  95. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  96. ${CP} ${WRKINST}/usr/lib/heimdal/libkdc.so* \
  97. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  98. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5srv.so* \
  99. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  100. ${CP} ${WRKINST}/usr/lib/heimdal/libhdb.so* \
  101. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  102. ${INSTALL_DATA} ./files/{krb5.conf,kdc.conf,kadmind.acl} \
  103. ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  104. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kdc \
  105. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  106. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmind \
  107. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  108. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kpasswdd \
  109. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  110. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kstash \
  111. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  112. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ktutil \
  113. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  114. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmin \
  115. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  116. # heimdal libs
  117. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  118. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
  119. ${CP} ${WRKINST}/usr/lib/heimdal/libhx509.so* \
  120. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  121. endif
  122. ${CP} ${WRKINST}/usr/lib/heimdal/libheimntlm.so* \
  123. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  124. ${CP} ${WRKINST}/usr/lib/heimdal/libwind.so* \
  125. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  126. ${CP} ${WRKINST}/usr/lib/heimdal/libgssapi.so* \
  127. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  128. ${CP} ${WRKINST}/usr/lib/heimdal/libkafs.so* \
  129. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  130. ${CP} ${WRKINST}/usr/lib/heimdal/libkrb5.so* \
  131. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  132. ${CP} ${WRKINST}/usr/lib/heimdal/libasn1.so* \
  133. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  134. ${CP} ${WRKINST}/usr/lib/heimdal/libroken.so* \
  135. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  136. # heimdal client libs
  137. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  138. ${CP} ${WRKINST}/usr/lib/heimdal/libeditline.so* \
  139. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  140. ${CP} ${WRKINST}/usr/lib/heimdal/libsl.so* \
  141. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  142. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5clnt.so* \
  143. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  144. include ${TOPDIR}/mk/pkg-bottom.mk