2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
17 PKG_SOURCE_URL
:=http
://download.strongswan.org
/
18 PKG_MD5SUM
:=57427f5b48123851a73b10d78dd4f8d6
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/strongswan
/Default
26 strongSwan is an IPsec implementation for Linux.
27 URL
:=http
://www.strongswan.org
/
30 define Package
/strongswan
31 $(call Package
/strongswan
/Default
)
34 DEPENDS
:=+kmod-strongswan
+libgmp @LINUX_2_4
38 This package contains the strongSwan user-land daemon.
39 URL
:=http
://www.strongswan.org
/
42 define KernelPackage
/strongswan
43 SUBMENU
:=Network Support
44 $(call Package
/strongswan
/Default
)
45 TITLE
+= (kernel module
)
49 This package contains the strongSwan kernel module.
50 FILES
:=$(PKG_BUILD_DIR
)/linux
/net
/ipsec
/ipsec.
$(LINUX_KMOD_SUFFIX
)
51 AUTOLOAD
:=$(call AutoLoad
,50,ipsec
)
55 LINUX_RELEASE
="$(LINUX_RELEASE)" \
56 KERNELSRC
="$(LINUX_DIR)" \
57 ARCH
="$(LINUX_KARCH)" \
58 CROSS_COMPILE
="$(TARGET_CROSS)" \
59 USERCOMPILE
="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
60 IPSECDIR
="/usr/lib/ipsec" \
64 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
65 $(TARGET_CONFIGURE_OPTS
) \
67 LDFLAGS
="$(TARGET_LDFLAGS)" \
68 DESTDIR
="$(PKG_INSTALL_DIR)" \
69 programs module
install
72 define Package
/strongswan
/install
73 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
74 $(INSTALL_DIR
) $(1)/etc
/init.d
75 $(INSTALL_DIR
) $(1)/etc
/config
76 $(INSTALL_DIR
) $(1)/etc
/cron.tick
77 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
78 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/button
79 $(INSTALL_BIN
) .
/files
/ipsec.init
$(1)/etc
/init.d
/ipsec
80 $(INSTALL_BIN
) .
/files
/ipsec.cron
$(1)/etc
/cron.tick
/ipsec-wakeup
81 $(INSTALL_BIN
) .
/files
/ipsec.iface
$(1)/etc
/hotplug.d
/iface
/65-ipsec
82 $(INSTALL_BIN
) .
/files
/ipsec.button
$(1)/etc
/hotplug.d
/button
/65-ipsec
83 $(INSTALL_DATA
) .
/files
/ipsec.config
$(1)/etc
/config
/ipsec
84 $(INSTALL_DATA
) .
/files
/ipsec.conf
$(1)/etc
/ipsec.conf
89 find
$(1) -name \
*.old | xargs
rm -rf
92 $(eval
$(call BuildPackage
,strongswan
))
93 $(eval
$(call KernelPackage
,strongswan
))