add missing dependency
[openwrt/svn-archive/archive.git] / package / openswan / 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:=openswan
13 PKG_VERSION:=2.4.8
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.openswan.org/download
18 PKG_MD5SUM:=918cc56ccf8e5d14cd2047e47450b34a
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/openswan/Default
23 TITLE:=Openswan
24 URL:=http://www.openswan.org/
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:=@LINUX_2_4 +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 DEPENDS:=@LINUX_2_4
49 TITLE+= (kernel module)
50 FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
51 endef
52
53 define KernelPackage/openswan/description
54 $(call Package/openswan/Default/description)
55 This package contains the Openswan kernel module.
56 endef
57
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 $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
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="$(TARGET_LDFLAGS)" \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
74 programs module install
75 endef
76
77 define Package/openswan/install
78 $(CP) $(PKG_INSTALL_DIR)/* $(1)
79 $(INSTALL_DIR) $(1)/etc/init.d
80 $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec
81 rm -rf $(1)/usr/share
82 rm -rf $(1)/usr/man
83 rm -rf $(1)/var
84 rm -rf $(1)/etc/rc.d
85 find $(1) -name \*.old | xargs rm -rf
86 endef
87
88 $(eval $(call BuildPackage,openswan))
89 $(eval $(call KernelPackage,openswan))