source: packages/net/openswan/Makefile @ 22693

Last change on this file since 22693 was 22693, checked in by nico, 6 years ago

[packages] openswan: update to 2.6.28 (closes: #7544, #7725, #7782)

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 2.3 KB
Line 
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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=openswan
12PKG_VERSION:=2.6.28
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=http://www.openswan.org/download
17PKG_MD5SUM:=37f2ad2664dd89e6ad96ae82f6378166
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/openswan/Default
22  TITLE:=Openswan
23  URL:=http://www.openswan.org/
24  DEPENDS:=@LINUX_2_6
25endef
26
27define Package/openswan/Default/description
28 Openswan is an IPsec implementation for Linux.
29endef
30
31define Package/openswan
32$(call Package/openswan/Default)
33  SUBMENU:=VPN
34  SECTION:=net
35  CATEGORY:=Network
36  TITLE+= (daemon)
37  DEPENDS+= +kmod-openswan +libgmp +ip
38endef
39
40define Package/openswan/description
41$(call Package/openswan/Default/description)
42 This package contains the Openswan user-land daemon.
43endef
44
45define 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)
50endef
51
52define KernelPackage/openswan/description
53$(call Package/openswan/Default/description)
54 This package contains the Openswan kernel module.
55endef
56
57TARGET_CPPFLAGS += -I$(LINUX_DIR)/include
58
59OPENSWAN_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
73define Build/Compile
74        $(OPENSWAN_MAKE) \
75                programs module install
76endef
77
78define 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
87endef
88
89$(eval $(call BuildPackage,openswan))
90$(eval $(call KernelPackage,openswan))
Note: See TracBrowser for help on using the repository browser.