Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  34. CONFIGURE_OPTS:= --with-hdbdir=/etc/heimdal \
  35. --disable-otp \
  36. --disable-ndbm-db \
  37. --libdir=/usr/lib/heimdal \
  38. --libexecdir=/usr/sbin \
  39. --with-openssl=${STAGING_TARGET_DIR}/usr \
  40. --with-readline=${STAGING_TARGET_DIR}/usr \
  41. --with-ipv6 \
  42. --sysconfdir=/etc/heimdal
  43. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_BDB),y)
  44. CONFIGURE_ARGS+= --with-berkeley-db
  45. else
  46. CONFIGURE_ARGS+= --without-berkeley-db
  47. endif
  48. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_LDAP),y)
  49. CONFIGURE_ARGS+= --with-openldap=yes
  50. CONFIGURE_ARGS+= --with-openldap-include=${STAGING_TARGET_DIR}/usr
  51. CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_TARGET_DIR}/usr
  52. else
  53. CONFIGURE_ARGS+= --without-openldap
  54. endif
  55. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_PKINIT),y)
  56. CONFIGURE_OPTS+= --enable-pk-init
  57. else
  58. CONFIGURE_OPTS+= --disable-pk-init \
  59. --disable-kx509
  60. endif
  61. TARGET_CFLAGS+= -I${STAGING_TARGET_DIR}/usr/include/et -pthread
  62. CONFIGURE_ARGS+= ${CONFIGURE_OPTS} --with-cross-tools=${STAGING_HOST_DIR}/bin
  63. CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes
  64. post-extract:
  65. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  66. ./configure --prefix=$(STAGING_HOST_DIR) \
  67. --disable-pk-init \
  68. --without-openldap \
  69. --disable-sqlite-cache \
  70. --disable-otp \
  71. );
  72. ${MAKE} -C ${WRKBUILD}/include
  73. ${MAKE} -C ${WRKBUILD}/lib/roken
  74. ${MAKE} -C ${WRKBUILD}/lib/vers
  75. ${MAKE} -C ${WRKBUILD}/lib/editline
  76. ${MAKE} -C ${WRKBUILD}/lib/com_err compile_et$(EXEEXT) LDFLAGS="-all-static"
  77. ${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile$(EXEEXT) LDFLAGS="-all-static"
  78. ${MAKE} -C ${WRKBUILD}/lib/sl slc$(EXEEXT) LDFLAGS="-all-static"
  79. ${MAKE} -C ${WRKBUILD}/lib/roken install LDFLAGS="-all-static"
  80. ${MAKE} -C ${WRKBUILD}/lib/asn1 install LDFLAGS="-all-static"
  81. ${MAKE} -C ${WRKBUILD}/lib/sl install LDFLAGS="-all-static"
  82. $(CP) $(STAGING_HOST_DIR)/libexec/heimdal/{slc,asn1_compile} \
  83. $(STAGING_HOST_DIR)/bin
  84. ${MAKE} -C ${WRKBUILD}/lib/sl clean
  85. ${MAKE} -C ${WRKBUILD}/lib/asn1 clean
  86. ${MAKE} -C ${WRKBUILD}/lib/roken clean
  87. ${MAKE} -C ${WRKBUILD} clean
  88. post-install:
  89. ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y)
  90. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  91. ${INSTALL_DATA} ${WRKBUILD}/lib/hdb/hdb.schema \
  92. ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  93. endif
  94. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  95. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/sbin
  96. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  97. ${CP} ${WRKINST}/usr/lib/heimdal/libkdc.so* \
  98. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  99. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5srv.so* \
  100. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  101. ${CP} ${WRKINST}/usr/lib/heimdal/libhdb.so* \
  102. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  103. ${INSTALL_DATA} ./files/{krb5.conf,kdc.conf,kadmind.acl} \
  104. ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  105. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kdc \
  106. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  107. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmind \
  108. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  109. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kpasswdd \
  110. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  111. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kstash \
  112. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  113. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ktutil \
  114. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  115. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmin \
  116. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  117. # heimdal libs
  118. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  119. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
  120. ${CP} ${WRKINST}/usr/lib/heimdal/libhx509.so* \
  121. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  122. endif
  123. ${CP} ${WRKINST}/usr/lib/heimdal/libheimntlm.so* \
  124. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  125. ${CP} ${WRKINST}/usr/lib/heimdal/libwind.so* \
  126. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  127. ${CP} ${WRKINST}/usr/lib/heimdal/libgssapi.so* \
  128. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  129. ${CP} ${WRKINST}/usr/lib/heimdal/libkafs.so* \
  130. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  131. ${CP} ${WRKINST}/usr/lib/heimdal/libkrb5.so* \
  132. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  133. ${CP} ${WRKINST}/usr/lib/heimdal/libasn1.so* \
  134. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  135. ${CP} ${WRKINST}/usr/lib/heimdal/libroken.so* \
  136. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  137. # heimdal client libs
  138. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  139. ${CP} ${WRKINST}/usr/lib/heimdal/libeditline.so* \
  140. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  141. ${CP} ${WRKINST}/usr/lib/heimdal/libsl.so* \
  142. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  143. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5clnt.so* \
  144. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  145. include ${TOPDIR}/mk/pkg-bottom.mk