You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
2.8 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. # 2014 Noah Meyerhans <frodo@morgul.net>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. include $(INCLUDE_DIR)/kernel.mk
  10. PKG_NAME:=ipsec-tools
  11. PKG_VERSION:=0.8.2
  12. PKG_RELEASE:=9
  13. PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>, \
  14. Vitaly Protsko <villy@sft.ru>
  15. PKG_LICENSE := BSD-3-Clause
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  17. PKG_SOURCE_URL:=@SF/ipsec-tools
  18. PKG_HASH:=8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. PKG_FIXUP:=autoreconf
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/ipsec-tools
  24. SECTION:=net
  25. CATEGORY:=Network
  26. SUBMENU:=VPN
  27. DEPENDS:=+libopenssl +kmod-ipsec
  28. TITLE:=IPsec management tools
  29. URL:=http://ipsec-tools.sourceforge.net/
  30. MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
  31. endef
  32. CONFIGURE_ARGS += \
  33. --enable-shared \
  34. --enable-static \
  35. --with-kernel-headers="$(LINUX_DIR)/include" \
  36. --without-readline \
  37. --with-openssl="$(STAGING_DIR)/usr" \
  38. --without-libradius \
  39. --without-libpam \
  40. --enable-dpd \
  41. --enable-hybrid \
  42. --enable-security-context=no \
  43. --enable-natt \
  44. --enable-adminport \
  45. --enable-frag \
  46. $(call autoconf_bool,CONFIG_IPV6,ipv6)
  47. # override CFLAGS holding "-Werror" that break builds on compile warnings
  48. MAKE_FLAGS+=\
  49. CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)"
  50. define Build/Prepare
  51. $(call Build/Prepare/Default)
  52. chmod -R u+w $(PKG_BUILD_DIR)
  53. endef
  54. define Build/Configure
  55. (cd $(PKG_BUILD_DIR); touch \
  56. configure.ac \
  57. aclocal.m4 \
  58. Makefile.in \
  59. config.h.in \
  60. configure \
  61. );
  62. $(call Build/Configure/Default)
  63. ifndef CONFIG_SHADOW_PASSWORDS
  64. echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
  65. endif
  66. endef
  67. define Package/ipsec-tools/install
  68. $(INSTALL_DIR) $(1)/etc/racoon
  69. $(INSTALL_CONF) ./files/functions.sh $(1)/etc/racoon/
  70. $(INSTALL_BIN) ./files/p1client-up $(1)/etc/racoon/
  71. $(INSTALL_BIN) ./files/p1client-down $(1)/etc/racoon/
  72. $(INSTALL_BIN) ./files/vpnctl $(1)/etc/racoon/
  73. $(INSTALL_DIR) $(1)/etc/init.d
  74. $(INSTALL_BIN) ./files/racoon.init $(1)/etc/init.d/racoon
  75. $(INSTALL_DIR) $(1)/etc/config
  76. $(INSTALL_CONF) ./files/racoon $(1)/etc/config/
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
  80. $(INSTALL_DIR) $(1)/usr/sbin
  81. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
  84. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
  85. endef
  86. define Package/ipsec-tools/conffiles
  87. /etc/config/racoon
  88. endef
  89. $(eval $(call BuildPackage,ipsec-tools))