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.

110 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=libreswan
  8. PKG_VERSION:=3.29
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://download.libreswan.org/
  12. PKG_HASH:=d60e4160f43272b6307b697a13f79f56b5ec2bca61d83097ddadd8586a58ab3e
  13. PKG_LICENSE:=GPL-2.0
  14. PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/libreswan/Default
  19. TITLE:=Libreswan
  20. URL:=https://libreswan.org/
  21. endef
  22. define Package/libreswan/Default/description
  23. Libreswan is a free software implementation of the most widely supported and
  24. standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
  25. ("IKE"). These standards are produced and maintained by the Internet
  26. Engineering Task Force ("IETF").
  27. endef
  28. define Package/libreswan
  29. $(call Package/libreswan/Default)
  30. SUBMENU:=VPN
  31. SECTION:=net
  32. CATEGORY:=Network
  33. DEPENDS:= +IPV6:kmod-ip6-vti +IPV6:kmod-ipsec6 +ip-full +iptables-mod-ipsec \
  34. +kmod-crypto-aead +kmod-crypto-authenc +kmod-crypto-gcm \
  35. +kmod-crypto-hash +kmod-crypto-rng +kmod-ip-vti +kmod-ipsec \
  36. +kmod-ipsec4 +kmod-ipt-ipsec +libevent2 +libevent2-pthreads \
  37. +libldns +librt +libunbound-heavy +nss-utils +nspr
  38. PROVIDES:=openswan
  39. CONFLICTS:=strongswan
  40. TITLE+= IPsec Server
  41. endef
  42. define Package/libreswan/description
  43. $(call Package/libreswan/Default/description)
  44. Libreswan is a free software implementation of the most widely supported and
  45. standardized VPN protocol based on ("IPsec") and the Internet Key Exchange
  46. ("IKE"). These standards are produced and maintained by the Internet
  47. Engineering Task Force ("IETF").
  48. endef
  49. define Package/libreswan/conffiles
  50. /etc/ipsec.d
  51. /etc/ipsec.conf
  52. /etc/ipsec.secrets
  53. endef
  54. MAKE_FLAGS+= \
  55. WERROR_CFLAGS=" " \
  56. USE_LINUX_AUDIT=false \
  57. USE_LABELED_IPSEC=false \
  58. USE_NM=false \
  59. USE_LIBCURL=false \
  60. USE_GLIBC_KERN_FLIP_HEADERS=true \
  61. USE_XAUTHPAM=false \
  62. USE_FIPSCHECK=false \
  63. USE_LIBCAP_NG=false \
  64. USE_SYSTEMD_WATCHDOG=false \
  65. USE_SECCOMP=false\
  66. INC_USRLOCAL="/usr" \
  67. FINALRUNDIR="/var/run/pluto" \
  68. ARCH="$(LINUX_KARCH)" \
  69. define Build/Prepare
  70. $(call Build/Prepare/Default)
  71. $(SED) 's,include $$$$(top_srcdir)/mk/manpages.mk,,g' \
  72. $(PKG_BUILD_DIR)/mk/program.mk
  73. endef
  74. define Build/Compile
  75. $(call Build/Compile/Default,all)
  76. endef
  77. define Package/libreswan/install
  78. $(INSTALL_DIR) \
  79. $(1)/etc/init.d \
  80. $(1)/etc/ipsec.d/policies \
  81. $(1)/usr/libexec/ipsec \
  82. $(1)/usr/sbin
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec \
  84. $(1)/usr/sbin/ipsec
  85. $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
  86. $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf
  87. $(INSTALL_DATA) ./files/ipsec.secrets $(1)/etc/ipsec.secrets
  88. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ipsec.d/policies/* \
  89. $(1)/etc/ipsec.d/policies/
  90. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/ipsec/* \
  91. $(1)/usr/libexec/ipsec/
  92. endef
  93. $(eval $(call BuildPackage,libreswan))