Makefile 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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:= 1
  7. PKG_MD5SUM:= 6e5028077e2a6b101a4a72801ba71b9e
  8. PKG_DESCR:= Kerberos 5 server
  9. PKG_SECTION:= net
  10. PKG_DEPENDS:= heimdal-libs heimdal-client-libs libncurses libcom-err
  11. PKG_BUILDDEP+= openssl ncurses e2fsprogs
  12. ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_BDB},y)
  13. PKG_BUILDDEP+= libdb
  14. endif
  15. ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y)
  16. PKG_BUILDDEP+= openldap
  17. endif
  18. PKG_URL:= http://www.h5l.org
  19. PKG_SITES:= http://www.h5l.org/dist/src/
  20. PKG_DESCR_1:= Kerberos 5 server libraries
  21. PKG_SECTION_1:= libs
  22. PKG_DESCR_2:= Kerberos 5 client libraries
  23. PKG_SECTION_2:= libs
  24. PKG_FLAVOURS:= PKINIT
  25. PKGFD_PKINIT:= Enable PK-INIT
  26. include $(TOPDIR)/mk/package.mk
  27. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_BDB),y)
  28. PKG_DEPENDS+= libdb
  29. endif
  30. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_LDAP),y)
  31. PKG_DEPENDS+= libopenldap
  32. endif
  33. $(eval $(call PKG_template,HEIMDAL_SERVER,heimdal-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  34. $(eval $(call PKG_template,HEIMDAL_LIBS,heimdal-libs,$(PKG_VERSION)-${PKG_RELEASE},,${PKG_DESCR_1},${PKG_SECTION_1}))
  35. $(eval $(call PKG_template,HEIMDAL_CLIENT_LIBS,heimdal-client-libs,$(PKG_VERSION)-${PKG_RELEASE},,${PKG_DESCR_2},${PKG_SECTION_2}))
  36. CONFIGURE_OPTS:= --with-hdbdir=/etc/heimdal \
  37. --disable-otp \
  38. --disable-ndbm-db \
  39. --libdir=/usr/lib/heimdal \
  40. --libexecdir=/usr/sbin \
  41. --with-ipv6 \
  42. --sysconfdir=/etc/heimdal
  43. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_BDB),y)
  44. CONFIGURE_ARGS+= --enable-berkeley-db
  45. else
  46. CONFIGURE_ARGS+= --disable-berkeley-db
  47. endif
  48. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_DB_LDAP),y)
  49. CONFIGURE_ARGS+= --with-openldap=yes
  50. CONFIGURE_ARGS+= --with-openldap-include=${STAGING_DIR}/usr
  51. CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_DIR}/usr
  52. else
  53. CONFIGURE_ARGS+= --without-openldap
  54. endif
  55. ifeq ($(ADK_PACKAGE_HEIMDAL_PKINIT),y)
  56. CONFIGURE_OPTS+= --enable-pk-init
  57. else
  58. CONFIGURE_OPTS+= --disable-pk-init
  59. endif
  60. TCFLAGS+= -I${STAGING_DIR}/usr/include/et -pthread
  61. CONFIGURE_STYLE:= gnu
  62. CONFIGURE_ARGS+= ${CONFIGURE_OPTS}
  63. CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes
  64. BUILD_STYLE:= auto
  65. INSTALL_STYLE:= auto
  66. pre-configure:
  67. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  68. CFLAGS="-static" \
  69. ./configure ${CONFIGURE_OPTS} \
  70. );
  71. ${MAKE} -C ${WRKBUILD}/lib/roken
  72. ${MAKE} -C ${WRKBUILD}/lib/vers
  73. ${MAKE} -C ${WRKBUILD}/lib/editline
  74. ${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile
  75. ${MAKE} -C ${WRKBUILD}/lib/sl slc
  76. ${INSTALL_BIN} ${WRKBUILD}/lib/asn1/asn1_compile \
  77. ${STAGING_TOOLS}/bin
  78. ${INSTALL_BIN} ${WRKBUILD}/lib/sl/slc \
  79. ${STAGING_TOOLS}/bin
  80. ${MAKE} -C ${WRKBUILD} clean
  81. post-install:
  82. ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y)
  83. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  84. ${INSTALL_DATA} ${WRKBUILD}/lib/hdb/hdb.schema \
  85. ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  86. endif
  87. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  88. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/sbin
  89. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  90. ${CP} ${WRKINST}/usr/lib/heimdal/libkdc.so* ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  91. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5srv.so* ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  92. ${CP} ${WRKINST}/usr/lib/heimdal/libhdb.so* ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  93. ${INSTALL_DATA} ./files/krb5.conf ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  94. ${INSTALL_DATA} ./files/kdc.conf ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  95. ${INSTALL_DATA} ./files/kadmind.acl ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  96. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kdc ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  97. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmind ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  98. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kpasswdd ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  99. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kstash ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  100. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ktutil ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  101. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmin ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  102. # heimdal libs
  103. ${INSTALL_DIR} ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  104. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
  105. ${CP} ${WRKINST}/usr/lib/heimdal/libhx509.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  106. endif
  107. ${CP} ${WRKINST}/usr/lib/heimdal/libheimntlm.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  108. ${CP} ${WRKINST}/usr/lib/heimdal/libwind.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  109. ${CP} ${WRKINST}/usr/lib/heimdal/libgssapi.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  110. ${CP} ${WRKINST}/usr/lib/heimdal/libkafs.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  111. ${CP} ${WRKINST}/usr/lib/heimdal/libkrb5.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  112. ${CP} ${WRKINST}/usr/lib/heimdal/libasn1.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  113. ${CP} ${WRKINST}/usr/lib/heimdal/libroken.so* ${IDIR_HEIMDAL_LIBS}/usr/lib/heimdal
  114. # heimdal client libs
  115. ${INSTALL_DIR} ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib/heimdal
  116. ${CP} ${WRKINST}/usr/lib/heimdal/libeditline.so* ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib/heimdal
  117. ${CP} ${WRKINST}/usr/lib/heimdal/libsl.so* ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib/heimdal
  118. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5clnt.so* ${IDIR_HEIMDAL_CLIENT_LIBS}/usr/lib/heimdal
  119. include ${TOPDIR}/mk/pkg-bottom.mk