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.

100 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2006-2011 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:=2
  13. PKG_MAINTAINER := "Noah Meyerhans <frodo@morgul.net>"
  14. PKG_LICENSE := BSD-3-Clause
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  16. PKG_SOURCE_URL:=@SF/ipsec-tools
  17. PKG_MD5SUM:=d53ec14a0a3ece64e09e5e34b3350b41
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. PKG_FIXUP:=autoreconf
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/ipsec-tools
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=VPN
  26. DEPENDS:=+libopenssl +kmod-ipsec
  27. TITLE:=IPsec management tools
  28. URL:=http://ipsec-tools.sourceforge.net/
  29. MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
  30. endef
  31. CONFIGURE_ARGS += \
  32. --enable-shared \
  33. --enable-static \
  34. --with-kernel-headers="$(LINUX_DIR)/include" \
  35. --without-readline \
  36. --with-openssl="$(STAGING_DIR)/usr" \
  37. --without-libradius \
  38. --without-libpam \
  39. --enable-dpd \
  40. --enable-hybrid \
  41. --enable-security-context=no \
  42. --enable-natt \
  43. --enable-adminport \
  44. --enable-frag \
  45. $(call autoconf_bool,CONFIG_IPV6,ipv6)
  46. # override CFLAGS holding "-Werror" that break builds on compile warnings
  47. MAKE_FLAGS+=\
  48. CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)"
  49. define Build/Prepare
  50. $(call Build/Prepare/Default)
  51. chmod -R u+w $(PKG_BUILD_DIR)
  52. endef
  53. define Build/Configure
  54. (cd $(PKG_BUILD_DIR); touch \
  55. configure.ac \
  56. aclocal.m4 \
  57. Makefile.in \
  58. config.h.in \
  59. configure \
  60. );
  61. $(call Build/Configure/Default)
  62. ifndef CONFIG_SHADOW_PASSWORDS
  63. echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
  64. endif
  65. endef
  66. define Package/ipsec-tools/install
  67. $(INSTALL_DIR) $(1)/etc
  68. $(INSTALL_CONF) ./files/racoon.conf $(1)/etc/racoon.conf
  69. $(INSTALL_DIR) $(1)/etc/racoon
  70. $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/psk.txt $(1)/etc/racoon/
  71. $(INSTALL_DIR) $(1)/etc/init.d
  72. $(INSTALL_BIN) ./files/racoon.init $(1)/etc/init.d/racoon
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
  76. $(INSTALL_DIR) $(1)/usr/sbin
  77. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
  78. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
  79. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
  81. endef
  82. define Package/ipsec-tools/conffiles
  83. /etc/racoon.conf
  84. /etc/racoon/psk.txt
  85. endef
  86. $(eval $(call BuildPackage,ipsec-tools))