upgrade the ixp4xx ethernet driver to v0.3.1, split the Gateway 7001 support to two...
[openwrt.git] / package / strongswan / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=strongswan
13 PKG_VERSION:=2.8.2
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://download.strongswan.org/
18 PKG_MD5SUM:=57427f5b48123851a73b10d78dd4f8d6
19 PKG_CAT:=bzcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/strongswan/Default
27 TITLE:=strongSwan
28 DEPENDS:=@LINUX_2_4
29 DESCRIPTION:=\
30 strongSwan is an IPsec implementation for Linux.
31 URL:=http://www.strongswan.org/
32 endef
33
34 define Package/strongswan
35 $(call Package/strongswan/Default)
36 SECTION:=net
37 CATEGORY:=Network
38 DEPENDS:=+kmod-strongswan +libgmp @LINUX_2_4
39 TITLE+= (daemon)
40 DESCRIPTION+=\\\
41 \\\
42 This package contains the strongSwan user-land daemon.
43 URL:=http://www.strongswan.org/
44 endef
45
46 define KernelPackage/strongswan
47 SUBMENU:=Network Support
48 $(call Package/strongswan/Default)
49 TITLE+= (kernel module)
50 DEPENDS:=@LINUX_2_4
51 DESCRIPTION+=\\\
52 \\\
53 This package contains the strongSwan kernel module.
54 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
55 FILES:=$(PKG_BUILD_DIR)/linux/net/ipsec/ipsec.$(LINUX_KMOD_SUFFIX)
56 AUTOLOAD:=$(call AutoLoad,50,ipsec)
57 endef
58
59 PKG_MAKE_OPTS:= \
60 LINUX_RELEASE="$(LINUX_RELEASE)" \
61 KERNELSRC="$(LINUX_DIR)" \
62 ARCH="$(LINUX_KARCH)" \
63 CROSS_COMPILE="$(TARGET_CROSS)" \
64 USERCOMPILE="$(TARGET_CFLAGS) -I./linux/include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
65 IPSECDIR="/usr/lib/ipsec" \
66 INC_USRLOCAL="/usr" \
67
68 define Build/Compile
69 $(MAKE) -C $(PKG_BUILD_DIR) \
70 $(TARGET_CONFIGURE_OPTS) \
71 $(PKG_MAKE_OPTS) \
72 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
74 programs module install
75 endef
76
77 define Package/strongswan/install
78 $(CP) $(PKG_INSTALL_DIR)/* $(1)
79 $(INSTALL_DIR) $(1)/etc/init.d
80 $(INSTALL_DIR) $(1)/etc/config
81 $(INSTALL_DIR) $(1)/etc/cron.tick
82 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
83 $(INSTALL_DIR) $(1)/etc/hotplug.d/button
84 $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
85 $(INSTALL_BIN) ./files/ipsec.cron $(1)/etc/cron.tick/ipsec-wakeup
86 $(INSTALL_BIN) ./files/ipsec.iface $(1)/etc/hotplug.d/iface/65-ipsec
87 $(INSTALL_BIN) ./files/ipsec.button $(1)/etc/hotplug.d/button/65-ipsec
88 $(INSTALL_DATA) ./files/ipsec.config $(1)/etc/config/ipsec
89 $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf
90 rm -rf $(1)/usr/share
91 rm -rf $(1)/usr/man
92 rm -rf $(1)/var
93 rm -rf $(1)/etc/rc.d
94 find $(1) -name \*.old | xargs rm -rf
95 endef
96
97 $(eval $(call BuildPackage,strongswan))
98 $(eval $(call KernelPackage,strongswan))
This page took 0.044936 seconds and 5 git commands to generate.