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
:=216444c3a2ede7bed5820648856fa5d9cc8fc4b4122bd4a1129d1a5954d9227d
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
+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 \
84 FINALRUNDIR
="/var/run/pluto" \
85 FINALNSSDIR
="/etc/ipsec.d" \
87 ARCH
="$(LINUX_KARCH)" \
90 $(call Build
/Prepare
/Default
)
91 $(SED
) 's,include $$$$(top_srcdir)/mk/manpages.mk,,g' \
92 $(PKG_BUILD_DIR
)/mk
/program.mk
96 $(call Build
/Compile
/Default
,all)
99 define Package
/libreswan
/install
102 $(1)/etc
/ipsec.d
/policies \
103 $(1)/usr
/libexec
/ipsec \
106 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/ipsec \
108 $(INSTALL_BIN
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
109 $(INSTALL_DATA
) .
/files
/ipsec.conf
$(1)/etc
/ipsec.conf
110 $(INSTALL_DATA
) .
/files
/ipsec.secrets
$(1)/etc
/ipsec.secrets
111 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/ipsec.d
/policies
/* \
112 $(1)/etc
/ipsec.d
/policies
/
113 $(CP
) $(PKG_INSTALL_DIR
)/usr
/libexec
/ipsec
/* \
114 $(1)/usr
/libexec
/ipsec
/
117 $(eval
$(call BuildPackage
,libreswan
))