Makefile 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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.5.2
  6. PKG_RELEASE:= 4
  7. PKG_MD5SUM:= bb23d9dbdafd395d816f7abc598481a1
  8. PKG_DESCR:= Kerberos 5 server
  9. PKG_SECTION:= crypto
  10. PKG_BUILDDEP:= openssl ncurses e2fsprogs readline bison-host
  11. PKG_DEPENDS:= libheimdal libncurses libcom-err libreadline libopenssl
  12. PKG_URL:= http://www.h5l.org/
  13. PKG_SITES:= http://www.h5l.org/dist/src/
  14. PKG_NOPARALLEL:= 1
  15. PKG_LIBNAME:= libheimdal
  16. PKG_OPTS:= dev
  17. PKG_HOST_DEPENDS:= !darwin
  18. PKG_SUBPKGS:= HEIMDAL_SERVER LIBHEIMDAL
  19. PKGSD_LIBHEIMDAL:= Kerberos 5 libraries
  20. PKGSC_LIBHEIMDAL:= libs
  21. PKG_FLAVOURS_HEIMDAL_SERVER:= WITH_PKINIT
  22. PKGFD_WITH_PKINIT: Enable PK-INIT
  23. PKG_CHOICES_HEIMDAL_SERVER:= 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:= db
  30. ifeq ($(ADK_STATIC),y)
  31. PKG_OPTS+= libmix
  32. endif
  33. include $(TOPDIR)/mk/package.mk
  34. $(eval $(call PKG_template,HEIMDAL_SERVER,heimdal-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  35. $(eval $(call PKG_template,LIBHEIMDAL,libheimdal,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL},${PKGSC_LIBHEIMDAL},${PKG_OPTS}))
  36. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  37. TARGET_LDFLAGS+= -ltinfo
  38. CONFIGURE_OPTS:= --with-hdbdir=/etc/heimdal \
  39. --disable-otp \
  40. --disable-ndbm-db \
  41. --libdir=/usr/lib/heimdal \
  42. --libexecdir=/usr/sbin \
  43. --includedir=/usr/include/heimdal \
  44. --without-sqlite3 \
  45. --without-libedit \
  46. --disable-sqlite-cache \
  47. --with-openssl=${STAGING_TARGET_DIR}/usr \
  48. --with-readline=${STAGING_TARGET_DIR}/usr \
  49. --with-ipv6 \
  50. --sysconfdir=/etc/heimdal
  51. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_BDB),y)
  52. CONFIGURE_ARGS+= --with-berkeley-db
  53. else
  54. CONFIGURE_ARGS+= --without-berkeley-db
  55. endif
  56. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_LDAP),y)
  57. CONFIGURE_ARGS+= --with-openldap=yes
  58. CONFIGURE_ARGS+= --with-openldap-include=${STAGING_TARGET_DIR}/usr
  59. CONFIGURE_ARGS+= --with-openldap-lib=${STAGING_TARGET_DIR}/usr
  60. else
  61. CONFIGURE_ARGS+= --without-openldap
  62. endif
  63. ifeq ($(ADK_PACKAGE_HEIMDAL_SERVER_WITH_PKINIT),y)
  64. CONFIGURE_OPTS+= --enable-pk-init
  65. else
  66. CONFIGURE_OPTS+= --disable-pk-init \
  67. --disable-kx509
  68. endif
  69. TARGET_CFLAGS+= -I${STAGING_TARGET_DIR}/usr/include/et -pthread
  70. CONFIGURE_ARGS+= ${CONFIGURE_OPTS} --with-cross-tools=${STAGING_HOST_DIR}/bin
  71. CONFIGURE_ENV+= ac_cv_func_getaddrinfo_numserv=yes
  72. post-extract:
  73. (cd $(WRKBUILD);patch -p1 < $(TOPDIR)/package/heimdal/files/patch-lib_asn1_Makefile.in)
  74. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  75. ./configure --prefix=$(STAGING_HOST_DIR) \
  76. --disable-pk-init \
  77. --without-openldap \
  78. --disable-sqlite-cache \
  79. --disable-otp \
  80. );
  81. ${MAKE} -C ${WRKBUILD}/include
  82. ${MAKE} -C ${WRKBUILD}/lib/roken
  83. ${MAKE} -C ${WRKBUILD}/lib/vers
  84. ${MAKE} -C ${WRKBUILD}/lib/libedit
  85. ${MAKE} -C ${WRKBUILD}/lib/com_err compile_et$(EXEEXT) LDFLAGS="-all-static"
  86. ${MAKE} -C ${WRKBUILD}/lib/asn1 asn1_compile$(EXEEXT) LDFLAGS="-all-static"
  87. ${MAKE} -C ${WRKBUILD}/lib/sl slc$(EXEEXT) LDFLAGS="-all-static"
  88. ${MAKE} -C ${WRKBUILD}/lib/roken install LDFLAGS="-all-static"
  89. ${MAKE} -C ${WRKBUILD}/lib/asn1 install LDFLAGS="-all-static"
  90. ${MAKE} -C ${WRKBUILD}/lib/sl install LDFLAGS="-all-static"
  91. $(CP) $(STAGING_HOST_DIR)/libexec/heimdal/{slc,asn1_compile} \
  92. $(STAGING_HOST_DIR)/bin
  93. ${MAKE} -C ${WRKBUILD}/lib/sl clean
  94. ${MAKE} -C ${WRKBUILD}/lib/asn1 clean
  95. ${MAKE} -C ${WRKBUILD}/lib/roken clean
  96. ${MAKE} -C ${WRKBUILD} clean
  97. heimdal-server-install:
  98. ifeq (${ADK_COMPILE_HEIMDAL_WITH_DB_LDAP},y)
  99. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  100. ${INSTALL_DATA} ${WRKBUILD}/lib/hdb/hdb.schema \
  101. ${IDIR_HEIMDAL_SERVER}/etc/openldap/schema
  102. endif
  103. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  104. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/sbin
  105. ${INSTALL_DIR} ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  106. ${CP} ${WRKINST}/usr/lib/heimdal/libkdc.so* \
  107. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  108. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5srv.so* \
  109. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  110. ${CP} ${WRKINST}/usr/lib/heimdal/libhdb.so* \
  111. ${IDIR_HEIMDAL_SERVER}/usr/lib/heimdal
  112. ${INSTALL_DATA} ./files/{krb5.conf,kdc.conf,kadmind.acl} \
  113. ${IDIR_HEIMDAL_SERVER}/etc/heimdal
  114. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kdc \
  115. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  116. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmind \
  117. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  118. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kpasswdd \
  119. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  120. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kstash \
  121. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  122. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ktutil \
  123. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  124. ${INSTALL_BIN} ${WRKINST}/usr/sbin/kadmin \
  125. ${IDIR_HEIMDAL_SERVER}/usr/sbin/
  126. libheimdal-install:
  127. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  128. ifeq ($(ADK_COMPILE_HEIMDAL_WITH_PKINIT),y)
  129. ${CP} ${WRKINST}/usr/lib/heimdal/libhx509.so* \
  130. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  131. endif
  132. ${CP} ${WRKINST}/usr/lib/heimdal/libheimsqlite.so* \
  133. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  134. ${CP} ${WRKINST}/usr/lib/heimdal/libheimbase.so* \
  135. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  136. ${CP} ${WRKINST}/usr/lib/heimdal/libheimntlm.so* \
  137. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  138. ${CP} ${WRKINST}/usr/lib/heimdal/libwind.so* \
  139. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  140. ${CP} ${WRKINST}/usr/lib/heimdal/libgssapi.so* \
  141. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  142. ${CP} ${WRKINST}/usr/lib/heimdal/libkafs.so* \
  143. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  144. ${CP} ${WRKINST}/usr/lib/heimdal/libkrb5.so* \
  145. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  146. ${CP} ${WRKINST}/usr/lib/heimdal/libasn1.so* \
  147. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  148. ${CP} ${WRKINST}/usr/lib/heimdal/libroken.so* \
  149. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  150. ${INSTALL_DIR} ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  151. ${CP} ${WRKINST}/usr/lib/heimdal/libsl.so* \
  152. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  153. ${CP} ${WRKINST}/usr/lib/heimdal/libkadm5clnt.so* \
  154. ${IDIR_LIBHEIMDAL}/usr/lib/heimdal
  155. include ${TOPDIR}/mk/pkg-bottom.mk