Added more essential NAS modules for NSLU2, NAS100d and DSMG600RevA profiles
[openwrt.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 DESCRIPTION:=\
25 Openswan is an IPsec implementation for Linux.
26 URL:=http://www.openswan.org/
27 endef
28
29 define Package/openswan
30 $(call Package/openswan/Default)
31 SECTION:=net
32 CATEGORY:=Network
33 DEPENDS:=@LINUX_2_4 +kmod-openswan +libgmp +ip
34 TITLE+= (daemon)
35 DESCRIPTION+=\\\
36 \\\
37 This package contains the Openswan user-land daemon.
38 URL:=http://www.openswan.org/
39 endef
40
41 define KernelPackage/openswan
42 SUBMENU:=Network Support
43 $(call Package/openswan/Default)
44 DEPENDS:=@LINUX_2_4
45 TITLE+= (kernel module)
46 DESCRIPTION+=\\\
47 \\\
48 This package contains the Openswan kernel module.
49 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
50 FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
51 endef
52
53 PKG_MAKE_OPTS:= \
54 LINUX_RELEASE="$(LINUX_RELEASE)" \
55 KERNELSRC="$(LINUX_DIR)" \
56 ARCH="$(LINUX_KARCH)" \
57 CROSS_COMPILE="$(TARGET_CROSS)" \
58 USERCOMPILE="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
59 IPSECDIR="/usr/lib/ipsec" \
60 INC_USRLOCAL="/usr" \
61
62 define Build/Compile
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 $(TARGET_CONFIGURE_OPTS) \
65 $(PKG_MAKE_OPTS) \
66 LDFLAGS="$(TARGET_LDFLAGS)" \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 programs module install
69 endef
70
71 define Package/openswan/install
72 $(CP) $(PKG_INSTALL_DIR)/* $(1)
73 $(INSTALL_DIR) $(1)/etc/init.d
74 $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec
75 rm -rf $(1)/usr/share
76 rm -rf $(1)/usr/man
77 rm -rf $(1)/var
78 rm -rf $(1)/etc/rc.d
79 find $(1) -name \*.old | xargs rm -rf
80 endef
81
82 $(eval $(call BuildPackage,openswan))
83 $(eval $(call KernelPackage,openswan))
This page took 0.039771 seconds and 5 git commands to generate.