2 # Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_SOURCE_URL
:=https
://download.libreswan.org
/
15 PKG_HASH
:=26396f4826a682735772a4689a7ce9ae2d409d166a4b72836fc55d14bad356ff
17 PKG_MAINTAINER
:=Lucian Cristian
<lucian.cristian@gmail.com
>
18 PKG_LICENSE
:=GPL-2.0
-or-later
19 PKG_LICENSE_FILES
:=COPYING LICENSE
20 PKG_CPE_ID
:=cpe
:/a
:libreswan
:libreswan
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/libreswan
/Default
29 URL
:=https
://libreswan.org
/
32 define Package
/libreswan
/Default
/description
33 Libreswan is a free software implementation of the most widely supported and
34 standardized VPN protocol based on
("IPsec") and the Internet Key Exchange
35 ("IKE"). These standards are produced and maintained by the Internet
36 Engineering Task Force
("IETF").
39 define Package
/libreswan
40 $(call Package
/libreswan
/Default
)
44 DEPENDS
:= +IPV6
:kmod-ip6-vti
+IPV6
:kmod-ipsec6
+ip-full
+iptables-mod-ipsec \
45 +kmod-crypto-aead
+kmod-crypto-authenc
+kmod-crypto-gcm \
46 +kmod-crypto-hash
+kmod-crypto-rng
+kmod-ip-vti
+kmod-ipsec \
47 +kmod-ipsec4
+kmod-ipt-ipsec
+kmod-xfrm-interface
+libevent2
+libevent2-pthreads \
48 +libldns
+librt
+libunbound
+nss-utils
+nspr
+libcap-ng
54 define Package
/libreswan
/description
55 $(call Package
/libreswan
/Default
/description
)
56 Libreswan is a free software implementation of the most widely supported and
57 standardized VPN protocol based on
("IPsec") and the Internet Key Exchange
58 ("IKE"). These standards are produced and maintained by the Internet
59 Engineering Task Force
("IETF").
62 define Package
/libreswan
/conffiles
67 TARGET_LDFLAGS
+= -Wl
,--gc-sections
,--as-needed
68 TARGET_CFLAGS
+= -flto
72 NSS_REQ_AVA_COPY
=false \
73 USE_LINUX_AUDIT
=false \
74 USE_LABELED_IPSEC
=false \
78 USE_GLIBC_KERN_FLIP_HEADERS
=true \
81 USE_SYSTEMD_WATCHDOG
=false \
83 USE_XFRM_INTERFACE_IFLA_HEADER
=false \
85 FINALRUNDIR
="/var/run/pluto" \
86 FINALNSSDIR
="/etc/ipsec.d" \
90 ARCH
="$(LINUX_KARCH)" \
93 $(call Build
/Prepare
/Default
)
94 $(SED
) 's,include $$$$(top_srcdir)/mk/manpages.mk,,g' \
95 $(PKG_BUILD_DIR
)/mk
/program.mk
99 $(call Build
/Compile
/Default
,all)
102 define Package
/libreswan
/install
105 $(1)/etc
/ipsec.d
/policies \
106 $(1)/usr
/libexec
/ipsec \
109 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipsec \
111 $(INSTALL_BIN
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
112 $(INSTALL_DATA
) .
/files
/ipsec.conf
$(1)/etc
/ipsec.conf
113 $(INSTALL_DATA
) .
/files
/ipsec.secrets
$(1)/etc
/ipsec.secrets
114 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/ipsec.d
/policies
/* \
115 $(1)/etc
/ipsec.d
/policies
/
116 $(CP
) $(PKG_INSTALL_DIR
)/usr
/libexec
/ipsec
/* \
117 $(1)/usr
/libexec
/ipsec
/
120 $(eval
$(call BuildPackage
,libreswan
))