Updated Dnsmasq to 2.42 (#3498)
[openwrt.git] / package / openswan / Makefile
1 #
2 # Copyright (C) 2006-2008 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.10
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:=2b36785342c74d524d8d86bde89a445f
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/openswan/Default
23 TITLE:=Openswan
24 URL:=http://www.openswan.org/
25 DEPENDS:=@BROKEN
26 endef
27
28 define Package/openswan/Default/description
29 Openswan is an IPsec implementation for Linux.
30 endef
31
32 define Package/openswan
33 $(call Package/openswan/Default)
34 SECTION:=net
35 CATEGORY:=Network
36 DEPENDS+= +kmod-openswan +libgmp +ip
37 TITLE+= (daemon)
38 URL:=http://www.openswan.org/
39 endef
40
41 define Package/openswan/description
42 $(call Package/openswan/Default/description)
43 This package contains the Openswan user-land daemon.
44 endef
45
46 define KernelPackage/openswan
47 $(call Package/openswan/Default)
48 SUBMENU:=Network Support
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 TARGET_CPPFLAGS = \
59 -I$(STAGING_DIR)/usr/include \
60 -I$(LINUX_DIR)/include
61
62 TARGET_LDFLAGS = \
63 -L$(STAGING_DIR)/usr/lib
64
65 OPENSWAN_MAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
66 $(TARGET_CONFIGURE_OPTS) \
67 LINUX_RELEASE="$(LINUX_RELEASE)" \
68 KERNELSRC="$(LINUX_DIR)" \
69 ARCH="$(LINUX_KARCH)" \
70 CROSS_COMPILE="$(TARGET_CROSS)" \
71 USERCOMPILE="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
72 IPSECDIR="/usr/lib/ipsec" \
73 INC_USRLOCAL="/usr" \
74 INC_RCDEFAULT="/etc/init.d" \
75 MODPROBE="/sbin/insmod" \
76 LDFLAGS="$(TARGET_LDFLAGS)" \
77 DESTDIR="$(PKG_INSTALL_DIR)"
78
79 define Build/Compile
80 $(OPENSWAN_MAKE) \
81 programs module install
82 endef
83
84 define Package/openswan/install
85 $(CP) $(PKG_INSTALL_DIR)/* $(1)
86 $(INSTALL_DIR) $(1)/etc/init.d
87 $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec
88 rm -rf $(1)/usr/share
89 rm -rf $(1)/usr/man
90 rm -rf $(1)/var
91 rm -rf $(1)/etc/rc.d
92 find $(1) -name \*.old | xargs rm -rf
93 endef
94
95 $(eval $(call BuildPackage,openswan))
96 $(eval $(call KernelPackage,openswan))
This page took 0.042046 seconds and 5 git commands to generate.