Fix compilation for 2.4 kernels (#1836)
[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$
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
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/strongswan/Default
23 TITLE:=strongSwan
24 DEPENDS:=@LINUX_2_4
25 DESCRIPTION:=\
26 strongSwan is an IPsec implementation for Linux.
27 URL:=http://www.strongswan.org/
28 endef
29
30 define Package/strongswan
31 $(call Package/strongswan/Default)
32 SECTION:=net
33 CATEGORY:=Network
34 DEPENDS:=+kmod-strongswan +libgmp @LINUX_2_4
35 TITLE+= (daemon)
36 DESCRIPTION+=\\\
37 \\\
38 This package contains the strongSwan user-land daemon.
39 URL:=http://www.strongswan.org/
40 endef
41
42 define KernelPackage/strongswan
43 SUBMENU:=Network Support
44 $(call Package/strongswan/Default)
45 TITLE+= (kernel module)
46 DEPENDS:=@LINUX_2_4
47 DESCRIPTION+=\\\
48 \\\
49 This package contains the strongSwan kernel module.
50 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
51 FILES:=$(PKG_BUILD_DIR)/linux/net/ipsec/ipsec.$(LINUX_KMOD_SUFFIX)
52 AUTOLOAD:=$(call AutoLoad,50,ipsec)
53 endef
54
55 PKG_MAKE_OPTS:= \
56 LINUX_RELEASE="$(LINUX_RELEASE)" \
57 KERNELSRC="$(LINUX_DIR)" \
58 ARCH="$(LINUX_KARCH)" \
59 CROSS_COMPILE="$(TARGET_CROSS)" \
60 USERCOMPILE="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
61 IPSECDIR="/usr/lib/ipsec" \
62 INC_USRLOCAL="/usr" \
63
64 define Build/Compile
65 $(MAKE) -C $(PKG_BUILD_DIR) \
66 $(TARGET_CONFIGURE_OPTS) \
67 $(PKG_MAKE_OPTS) \
68 LDFLAGS="$(TARGET_LDFLAGS)" \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 programs module install
71 endef
72
73 define Package/strongswan/install
74 $(CP) $(PKG_INSTALL_DIR)/* $(1)
75 $(INSTALL_DIR) $(1)/etc/init.d
76 $(INSTALL_DIR) $(1)/etc/config
77 $(INSTALL_DIR) $(1)/etc/cron.tick
78 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
79 $(INSTALL_DIR) $(1)/etc/hotplug.d/button
80 $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
81 $(INSTALL_BIN) ./files/ipsec.cron $(1)/etc/cron.tick/ipsec-wakeup
82 $(INSTALL_BIN) ./files/ipsec.iface $(1)/etc/hotplug.d/iface/65-ipsec
83 $(INSTALL_BIN) ./files/ipsec.button $(1)/etc/hotplug.d/button/65-ipsec
84 $(INSTALL_DATA) ./files/ipsec.config $(1)/etc/config/ipsec
85 $(INSTALL_DATA) ./files/ipsec.conf $(1)/etc/ipsec.conf
86 rm -rf $(1)/usr/share
87 rm -rf $(1)/usr/man
88 rm -rf $(1)/var
89 rm -rf $(1)/etc/rc.d
90 find $(1) -name \*.old | xargs rm -rf
91 endef
92
93 $(eval $(call BuildPackage,strongswan))
94 $(eval $(call KernelPackage,strongswan))
This page took 0.046403 seconds and 5 git commands to generate.