summaryrefslogtreecommitdiff
path: root/package/strongswan/Makefile
blob: 1a5bdd441df13f4e1837b66889fd00b1a9da938a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(ADK_TOPDIR)/rules.mk

PKG_NAME:=		strongswan
PKG_VERSION:=		5.4.0
PKG_RELEASE:=		1
PKG_HASH:=		b284f95125e17bb4450075dddc066f5f291068cbfc0a639bc2dd3de48c5984cf
PKG_DESCR:=		ipsec vpn software
PKG_SECTION:=		net/security
PKG_NEEDS:=		threads
PKG_URL:=		http://strongswan.org/index.htm
PKG_SITES:=		http://download.strongswan.org/

DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz

PKG_CHOICES_STRONGSWAN:=WITH_LIBRESSL WITH_GNUTLS WITH_OPENSSL WITH_GMP
PKGCD_WITH_GMP:=	use gmp for crypto
PKGCS_WITH_GMP:=	libgmp
PKGCB_WITH_GMP:=	gmp
PKGCD_WITH_OPENSSL:=	use openssl for crypto
PKGCS_WITH_OPENSSL:=	libopenssl
PKGCB_WITH_OPENSSL:=	openssl
PKGCD_WITH_LIBRESSL:=	use libressl for crypto
PKGCS_WITH_LIBRESSL:=	libressl
PKGCB_WITH_LIBRESSL:=	libressl
PKGCD_WITH_GNUTLS:=	use gnutls for crypto
PKGCS_WITH_GNUTLS:=	libgnutls
PKGCB_WITH_GNUTLS:=	gnutls

include $(ADK_TOPDIR)/mk/package.mk

$(eval $(call PKG_template,STRONGSWAN,strongswan,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_OPENSSL},y)
CONFIGURE_ARGS+=	--enable-openssl \
			--disable-gcrypt \
			--disable-gmp
endif
ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_LIBRESSL},y)
CONFIGURE_ARGS+=	--enable-openssl \
			--disable-gcrypt \
			--disable-gmp
endif
ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GNUTLS},y)
CONFIGURE_ARGS+=	--enable-gcrypt \
			--disable-openssl \
			--disable-gmp
endif
ifeq (${ADK_PACKAGE_STRONGSWAN_WITH_GMP},y)
CONFIGURE_ARGS+=	--enable-gmp \
			--disable-openssl \
			--disable-gcrypt
endif

CONFIGURE_ARGS+=	--disable-tools \
			--disable-fips-prf \
			--with-group=root \
			--enable-kernel-pfkey

TARGET_LDFLAGS+=        -Wl,-rpath -Wl,/usr/lib/ipsec

strongswan-install:
	$(INSTALL_DIR) $(IDIR_STRONGSWAN)/etc
	$(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/sbin
	$(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/libexec/ipsec
	$(INSTALL_DIR) $(IDIR_STRONGSWAN)/usr/lib/ipsec/plugins
	touch $(IDIR_STRONGSWAN)/etc/ipsec.secrets
	$(CP) $(WRKINST)/usr/lib/ipsec/plugins/*.so \
		$(IDIR_STRONGSWAN)/usr/lib/ipsec/plugins
	$(CP) $(WRKINST)/etc/* $(IDIR_STRONGSWAN)/etc
	$(CP) $(WRKINST)/usr/libexec/ipsec/* \
		$(IDIR_STRONGSWAN)/usr/libexec/ipsec
	$(INSTALL_BIN) $(WRKINST)/usr/sbin/ipsec \
		$(IDIR_STRONGSWAN)/usr/sbin
	$(CP) $(WRKINST)/usr/lib/ipsec/libvici*.so* \
		$(IDIR_STRONGSWAN)/usr/lib/ipsec/
	$(CP) $(WRKINST)/usr/lib/ipsec/libcharon*.so* \
		$(IDIR_STRONGSWAN)/usr/lib/ipsec/
	$(CP) $(WRKINST)/usr/lib/ipsec/libstrongswan*.so* \
		$(IDIR_STRONGSWAN)/usr/lib/ipsec/

include ${ADK_TOPDIR}/mk/pkg-bottom.mk