Makefile 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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:= 1
  7. PKG_MD5SUM:= 31d08bbf47a77827fe97ef3f52b4c9c4
  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_HOST_DEPENDS:= !darwin
  16. PKG_SUBPKGS:= HEIMDAL LIBHEIMDAL LIBHEIMDAL_CLIENT
  17. PKGSD_LIBHEIMDAL:= Kerberos 5 server libraries
  18. PKGSC_LIBHEIMDAL:= libs
  19. PKGSD_LIBHEIMDAL_CLIENT:= Kerberos 5 client libraries
  20. PKGSC_LIBHEIMDAL_CLIENT:= libs
  21. PKG_FLAVOURS:= PKINIT
  22. PKGFD_PKINIT:= Enable PK-INIT
  23. PKG_CHOICES:= WITH_LDAP WITH_BDB
  24. PKGCD_WITH_LDAP:= use OpenLDAP as database backend
  25. PKGCS_WITH_LDAP:= libopenldap
  26. PKGCB_WITH_LDAP:= openldap
  27. PKGCD_WITH_BDB:= use Berkeley DB as database backend
  28. PKGCS_WITH_BDB:= libdb
  29. PKGCB_WITH_BDB:= libdb
  30. include $(TOPDIR)/mk/package.mk
  31. $(eval $(call PKG_template,HEIMDAL_SERVER,heimdal-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  32. $(eval $(call PKG_template,LIBHEIMDAL,libheimdal,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL},${PKGSC_LIBHEIMDAL}))
  33. $(eval $(call PKG_template,LIBHEIMDAL_CLIENT,libheimdal-client,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL_CLIENT},${PKGSC_LIBHEIMDAL_CLIENT}))
  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-ipv6 \
  40. --sysconfdir=/etc/heimdal
  41. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_BDB),y)
  42. CONFIGURE_ARGS+= --enable-berkeley-db
  43. else
  44. CONFIGURE_ARGS+= --disable-berkeley-db
  45. endif
  46. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_LDAP),y)
  47. CONFIGURE_ARGS+= --with-openldap=yes
  48. CONFIGURE_ARGS+= --with-openldap-include=${STAGING_DIR}/usr
  49. CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_DIR}/usr
  50. else
  51. CONFIGURE_ARGS+= --without-openldap
  52. endif
  53. ifeq ($(ADK_PACKAGE_HEIMDAL_PKINIT),y)
  54. CONFIGURE_OPTS+= --enable-pk-init
  55. else
  56. CONFIGURE_OPTS+= --disable-pk-init
  57. endif
  58. TCFLAGS+= -I${STAGING_DIR}/usr/include/et -pthread
  59. CONFIGURE_ARGS+= ${CONFIGURE_OPTS} --with-cross-tools=${STAGING_TOOLS}/bin
  60. CONFIGURE_ENV+= cross_compiling=yes \
  61. ac_cv_func_getaddrinfo_numserv=yes
  62. ifeq ($(ADK_HOST_CYGWIN),y)
  63. EXEEXT:= .exe
  64. endif
  65. pre-configure:
  66. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  67. ./configure --prefix=$(STAGING_TOOLS) \
  68. --disable-pk-init \
  69. --without-openldap \
  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/asn1 asn1_compile$(EXEEXT)
  77. ${MAKE} -C ${WRKBUILD}/lib/sl slc$(EXEEXT)
  78. ${INSTALL_BIN} ${WRKBUILD}/lib/roken/make-roken$(EXEEXT) \
  79. ${STAGING_TOOLS}/bin
  80. ${INSTALL_BIN} ${WRKBUILD}/lib/sl/slc$(EXEEXT) \
  81. ${STAGING_TOOLS}/bin
  82. ${MAKE} -C ${WRKBUILD}/lib/roken install
  83. ${MAKE} -C ${WRKBUILD}/lib/asn1 install
  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