Makefile 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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.2.1
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 6e5028077e2a6b101a4a72801ba71b9e
  8. PKG_DESCR:= Kerberos 5 server
  9. PKG_SECTION:= crypto
  10. PKG_DEPENDS:= libheimdal libheimdal-client libncurses libcom-err
  11. PKG_BUILDDEP:= openssl ncurses e2fsprogs
  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:= PKINIT
  21. PKGFD_PKINIT:= Enable PK-INIT
  22. PKG_CHOICES:= 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:= libdb
  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-ipv6 \
  39. --sysconfdir=/etc/heimdal
  40. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_BDB),y)
  41. CONFIGURE_ARGS+= --enable-berkeley-db
  42. else
  43. CONFIGURE_ARGS+= --disable-berkeley-db
  44. endif
  45. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_LDAP),y)
  46. CONFIGURE_ARGS+= --with-openldap=yes
  47. CONFIGURE_ARGS+= --with-openldap-include=${STAGING_DIR}/usr
  48. CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_DIR}/usr
  49. else
  50. CONFIGURE_ARGS+= --without-openldap
  51. endif
  52. ifeq ($(ADK_PACKAGE_HEIMDAL_PKINIT),y)
  53. CONFIGURE_OPTS+= --enable-pk-init
  54. else
  55. CONFIGURE_OPTS+= --disable-pk-init
  56. endif
  57. TCFLAGS+= -I${STAGING_DIR}/usr/include/et -pthread
  58. CONFIGURE_ARGS+= ${CONFIGURE_OPTS}
  59. CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes
  60. ifeq ($(ADK_HOST_CYGWIN),y)
  61. EXEEXT:= .exe
  62. endif
  63. pre-configure:
  64. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  65. ./configure ${CONFIGURE_OPTS} \
  66. );
  67. ${MAKE} -C ${WRKBUILD}/lib/roken
  68. ${MAKE} -C ${WRKBUILD}/lib/vers
  69. ${MAKE} -C ${WRKBUILD}/lib/editline
  70. ${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile$(EXEEXT)
  71. ${MAKE} -C ${WRKBUILD}/lib/sl slc$(EXEEXT)
  72. ${INSTALL_BIN} ${WRKBUILD}/lib/asn1/asn1_compile$(EXEEXT) \
  73. ${STAGING_TOOLS}/bin
  74. ${INSTALL_BIN} ${WRKBUILD}/lib/sl/slc$(EXEEXT) \
  75. ${STAGING_TOOLS}/bin
  76. ${MAKE} -C ${WRKBUILD}/lib/asn1 clean
  77. ${MAKE} -C ${WRKBUILD}/lib/roken clean
  78. ${MAKE} -C ${WRKBUILD} clean
  79. post-install:
  80. ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y)
  81. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  82. ${INSTALL_DATA} ${WRKBUILD}/lib/hdb/hdb.schema \
  83. ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  84. endif
  85. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  86. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/sbin
  87. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  88. ${CP} ${WRKINST}/usr/lib/heimdal/libkdc.so* \
  89. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  90. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5srv.so* \
  91. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  92. ${CP} ${WRKINST}/usr/lib/heimdal/libhdb.so* \
  93. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  94. ${INSTALL_DATA} ./files/{krb5.conf,kdc.conf,kadmind.acl} \
  95. ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  96. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kdc \
  97. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  98. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmind \
  99. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  100. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kpasswdd \
  101. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  102. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kstash \
  103. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  104. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ktutil \
  105. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  106. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmin \
  107. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  108. # heimdal libs
  109. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  110. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
  111. ${CP} ${WRKINST}/usr/lib/heimdal/libhx509.so* \
  112. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  113. endif
  114. ${CP} ${WRKINST}/usr/lib/heimdal/libheimntlm.so* \
  115. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  116. ${CP} ${WRKINST}/usr/lib/heimdal/libwind.so* \
  117. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  118. ${CP} ${WRKINST}/usr/lib/heimdal/libgssapi.so* \
  119. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  120. ${CP} ${WRKINST}/usr/lib/heimdal/libkafs.so* \
  121. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  122. ${CP} ${WRKINST}/usr/lib/heimdal/libkrb5.so* \
  123. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  124. ${CP} ${WRKINST}/usr/lib/heimdal/libasn1.so* \
  125. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  126. ${CP} ${WRKINST}/usr/lib/heimdal/libroken.so* \
  127. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  128. # heimdal client libs
  129. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  130. ${CP} ${WRKINST}/usr/lib/heimdal/libeditline.so* \
  131. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  132. ${CP} ${WRKINST}/usr/lib/heimdal/libsl.so* \
  133. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  134. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5clnt.so* \
  135. ${IDIR_LIBHEIMDAL_CLIENT}/usr/lib/heimdal
  136. include ${TOPDIR}/mk/pkg-bottom.mk