1
0

Makefile 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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.1.1
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= f624ab041c306af0f5f57c927e9ea2e4
  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. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
  19. PKG_LIBC_DEPENDS:= uclibc glibc
  20. PKG_CHOICES_STRONGSWAN:=WITH_GNUTLS WITH_OPENSSL WITH_GMP
  21. PKGCD_WITH_GMP:= use GMP for crypto
  22. PKGCS_WITH_GMP:= libgmp
  23. PKGCB_WITH_GMP:= gmp
  24. PKGCD_WITH_OPENSSL:= use OpenSSL for crypto
  25. PKGCS_WITH_OPENSSL:= libopenssl
  26. PKGCB_WITH_OPENSSL:= openssl
  27. PKGCD_WITH_GNUTLS:= use GnuTLS for crypto
  28. PKGCS_WITH_GNUTLS:= libgnutls
  29. PKGCB_WITH_GNUTLS:= gnutls
  30. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
  31. PKG_CFLINE_STRONGSWAN:= select ADK_PACKAGE_LIBOPENSSL_WITH_EC
  32. endif
  33. include $(TOPDIR)/mk/package.mk
  34. $(eval $(call PKG_template,STRONGSWAN,strongswan,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  35. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
  36. CONFIGURE_ARGS+= --enable-openssl \
  37. --disable-gcrypt \
  38. --disable-gmp
  39. endif
  40. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GNUTLS},y)
  41. CONFIGURE_ARGS+= --enable-gcrypt \
  42. --disable-openssl \
  43. --disable-gmp
  44. endif
  45. ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GMP},y)
  46. CONFIGURE_ARGS+= --enable-gmp \
  47. --disable-openssl \
  48. --disable-gcrypt
  49. endif
  50. CONFIGURE_ARGS+= --disable-tools \
  51. --disable-fips-prf \
  52. --with-group=root \
  53. --enable-kernel-pfkey
  54. TARGET_LDFLAGS+= -Wl,-rpath -Wl,/usr/lib/ipsec
  55. strongswan-install:
  56. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/etc
  57. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/sbin
  58. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  59. $(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/lib/ipsec/plugins
  60. touch $(IDIR_STRONGSWAN)/etc/ipsec.secrets
  61. $(CP) $(WRKINST)/usr/lib/ipsec/plugins/*.so \
  62. $(IDIR_STRONGSWAN)/usr/lib/ipsec/plugins
  63. $(CP) $(WRKINST)/etc/* $(IDIR_STRONGSWAN)/etc
  64. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/charon \
  65. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  66. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/starter \
  67. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  68. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/_updown \
  69. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  70. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/_copyright \
  71. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  72. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/stroke \
  73. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  74. $(INSTALL_BIN) $(WRKINST)/usr/libexec/ipsec/_updown_espmark \
  75. $(IDIR_STRONGSWAN)/usr/libexec/ipsec
  76. $(INSTALL_BIN) $(WRKINST)/usr/sbin/ipsec \
  77. $(IDIR_STRONGSWAN)/usr/sbin
  78. $(CP) $(WRKINST)/usr/lib/ipsec/libcharon*.so* \
  79. $(IDIR_STRONGSWAN)/usr/lib/ipsec/
  80. $(CP) $(WRKINST)/usr/lib/ipsec/libhydra*.so* \
  81. $(IDIR_STRONGSWAN)/usr/lib/ipsec/
  82. $(CP) $(WRKINST)/usr/lib/ipsec/libstrongswan*.so* \
  83. $(IDIR_STRONGSWAN)/usr/lib/ipsec/
  84. include ${TOPDIR}/mk/pkg-bottom.mk