1
0

Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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:=5
  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/racoon
  68. $(INSTALL_CONF) ./files/functions.sh $(1)/etc/racoon/
  69. $(INSTALL_BIN) ./files/p1client-up $(1)/etc/racoon/
  70. $(INSTALL_BIN) ./files/p1client-down $(1)/etc/racoon/
  71. $(INSTALL_BIN) ./files/vpnctl $(1)/etc/racoon/
  72. $(INSTALL_DIR) $(1)/etc/init.d
  73. $(INSTALL_BIN) ./files/racoon.init $(1)/etc/init.d/racoon
  74. $(INSTALL_DIR) $(1)/etc/config
  75. $(INSTALL_CONF) ./files/racoon $(1)/etc/config/
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
  79. $(INSTALL_DIR) $(1)/usr/sbin
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
  81. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
  84. endef
  85. define Package/ipsec-tools/conffiles
  86. /etc/config/racoon
  87. endef
  88. $(eval $(call BuildPackage,ipsec-tools))