1
0

Makefile 6.0 KB

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