[packages] openswan: update to v2.6.24 and remove obsolete patches - fixes Linux...
[openwrt/svn-archive/archive.git] / net / openswan / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=openswan
12 PKG_VERSION:=2.6.24
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.openswan.org/download
17 PKG_MD5SUM:=1c76b6982c05392f7c360afb92699661
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/openswan/Default
22 TITLE:=Openswan
23 URL:=http://www.openswan.org/
24 DEPENDS:=@LINUX_2_6
25 endef
26
27 define Package/openswan/Default/description
28 Openswan is an IPsec implementation for Linux.
29 endef
30
31 define Package/openswan
32 $(call Package/openswan/Default)
33 SECTION:=net
34 CATEGORY:=Network
35 DEPENDS+= +kmod-openswan +libgmp +ip
36 TITLE+= (daemon)
37 URL:=http://www.openswan.org/
38 endef
39
40 define Package/openswan/description
41 $(call Package/openswan/Default/description)
42 This package contains the Openswan user-land daemon.
43 endef
44
45 define KernelPackage/openswan
46 $(call Package/openswan/Default)
47 SUBMENU:=Network Support
48 TITLE+= (kernel module)
49 FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
50 endef
51
52 define KernelPackage/openswan/description
53 $(call Package/openswan/Default/description)
54 This package contains the Openswan kernel module.
55 endef
56
57 TARGET_CPPFLAGS += -I$(LINUX_DIR)/include
58
59 OPENSWAN_MAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
60 $(TARGET_CONFIGURE_OPTS) \
61 LINUX_RELEASE="$(LINUX_RELEASE)" \
62 KERNELSRC="$(LINUX_DIR)" \
63 ARCH="$(LINUX_KARCH)" \
64 CROSS_COMPILE="$(TARGET_CROSS)" \
65 USERCOMPILE="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/ports/linux/include -I$(PKG_BUILD_DIR)/linux/include -I$(PKG_BUILD_DIR)/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
66 IPSECDIR="/usr/lib/ipsec" \
67 INC_USRLOCAL="/usr" \
68 INC_RCDEFAULT="/etc/init.d" \
69 MODPROBE="/sbin/insmod" \
70 LDFLAGS="$(TARGET_LDFLAGS)" \
71 DESTDIR="$(PKG_INSTALL_DIR)"
72
73 define Build/Compile
74 $(OPENSWAN_MAKE) \
75 programs module install
76 endef
77
78 define Package/openswan/install
79 $(CP) $(PKG_INSTALL_DIR)/* $(1)
80 $(INSTALL_DIR) $(1)/etc/init.d
81 $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec
82 rm -rf $(1)/usr/share
83 rm -rf $(1)/usr/man
84 rm -rf $(1)/var
85 rm -rf $(1)/etc/rc.d
86 find $(1) -name \*.old | xargs rm -rf
87 endef
88
89 $(eval $(call BuildPackage,openswan))
90 $(eval $(call KernelPackage,openswan))