Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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:= strongswan
  5. PKG_VERSION:= 5.0.0
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 1d7bccb50f01020bb04d06e9755e0eec
  8. PKG_DESCR:= IPsec software
  9. PKG_SECTION:= net/security
  10. PKG_DEPENDS:= ip libpthread kmod-net-key kmod-xfrm-user
  11. PKG_DEPENDS+= kmod-inet-ah kmod-inet-esp
  12. PKG_DEPENDS+= kmod-inet-xfrm-mode-tunnel kmod-inet-xfrm-mode-transport
  13. PKG_DEPENDS+= kmod-crypto-sha1 kmod-crypto-md5
  14. PKG_DEPENDS+= kmod-crypto-null kmod-crypto-des kmod-crypto-aes
  15. PKG_DEPENDS+= kmod-crypto-hmac kmod-crypto-cbc kmod-crypto-authenc
  16. PKG_URL:= http://strongswan.org/index.htm
  17. PKG_SITES:= http://download.strongswan.org/
  18. PKG_CHOICES_STRONGSWAN:=WITH_GMP WITH_OPENSSL WITH_GNUTLS
  19. PKGCD_WITH_GMP:= use GMP for crypto
  20. PKGCS_WITH_GMP:= libgmp
  21. PKGCB_WITH_GMP:= gmp
  22. PKGCD_WITH_OPENSSL:= use OpenSSL for crypto
  23. PKGCS_WITH_OPENSSL:= libopenssl
  24. PKGCB_WITH_OPENSSL:= openssl
  25. PKGCD_WITH_GNUTLS:= use GnuTLS for crypto
  26. PKGCS_WITH_GNUTLS:= libgnutls
  27. PKGCB_WITH_GNUTLS:= gnutls
  28. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
  29. PKG_CFLINE_STRONGSWAN:= select ADK_PACKAGE_LIBOPENSSL_WITH_EC
  30. endif
  31. include $(TOPDIR)/mk/package.mk
  32. $(eval $(call PKG_template,STRONGSWAN,strongswan,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  33. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
  34. CONFIGURE_ARGS+= --enable-openssl \
  35. --disable-gcrypt \
  36. --disable-gmp
  37. endif
  38. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GNUTLS},y)
  39. CONFIGURE_ARGS+= --enable-gcrypt \
  40. --disable-openssl \
  41. --disable-gmp
  42. endif
  43. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GMP},y)
  44. CONFIGURE_ARGS+= --enable-gmp \
  45. --disable-openssl \
  46. --disable-gcrypt
  47. endif
  48. CONFIGURE_ARGS+= --disable-tools \
  49. --disable-fips-prf \
  50. --with-group=root \
  51. --enable-kernel-pfkey
  52. TARGET_LDFLAGS+= -Wl,-rpath -Wl,/usr/lib/ipsec
  53. strongswan-install:
  54. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/etc
  55. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/sbin
  56. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  57. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/lib/ipsec/plugins
  58. touch $(IDIR_STRONGSWAN)/etc/ipsec.secrets
  59. $(CP) $(WRKINST)/usr/lib/ipsec/plugins/*.so \
  60. $(IDIR_STRONGSWAN)/usr/lib/ipsec/plugins
  61. $(CP) $(WRKINST)/etc/* $(IDIR_STRONGSWAN)/etc
  62. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/charon \
  63. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  64. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/starter \
  65. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  66. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/_updown \
  67. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  68. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/_copyright \
  69. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  70. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/stroke \
  71. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  72. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/_updown_espmark \
  73. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  74. $(INSTALL_BIN) $(WRKINST)/usr/sbin/ipsec \
  75. $(IDIR_STRONGSWAN)/usr/sbin
  76. $(CP) $(WRKINST)/usr/lib/ipsec/libcharon*.so* \
  77. $(IDIR_STRONGSWAN)/usr/lib/ipsec/
  78. $(CP) $(WRKINST)/usr/lib/ipsec/libhydra*.so* \
  79. $(IDIR_STRONGSWAN)/usr/lib/ipsec/
  80. $(CP) $(WRKINST)/usr/lib/ipsec/libstrongswan*.so* \
  81. $(IDIR_STRONGSWAN)/usr/lib/ipsec/
  82. include ${TOPDIR}/mk/pkg-bottom.mk