source: packages/net/openswan/Makefile @ 31389

Last change on this file since 31389 was 31389, checked in by jow, 4 years ago

[packages] openswan: update to v2.6.38, fixes compilation against Linux v3.3.x (#11316)

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
1#
2# Copyright (C) 2006-2012 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.38
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=http://www.openswan.org/download
17PKG_MD5SUM:=13073eb5314b83a31be88e4117e8bbcd
18
19PKG_BUILD_PARALLEL:=1
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/openswan/Default
25  TITLE:=Openswan
26  URL:=http://www.openswan.org/
27endef
28
29define Package/openswan/Default/description
30 Openswan is an IPsec implementation for Linux.
31endef
32
33define Package/openswan
34$(call Package/openswan/Default)
35  SUBMENU:=VPN
36  SECTION:=net
37  CATEGORY:=Network
38  TITLE+= (daemon)
39  DEPENDS+= +libgmp +ip
40endef
41
42define Package/openswan/description
43$(call Package/openswan/Default/description)
44 This package contains the Openswan user-land daemon.
45endef
46
47define KernelPackage/openswan
48$(call Package/openswan/Default)
49  SUBMENU:=Network Support
50  TITLE+= (kernel module)
51  DEPENDS+=+IPV6:kmod-ipv6
52  FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
53endef
54
55define KernelPackage/openswan/description
56$(call Package/openswan/Default/description)
57 This package contains the Openswan kernel module.
58endef
59
60TARGET_CPPFLAGS += -I$(LINUX_DIR)/include -D__EXPORTED_HEADERS__
61
62OPENSWAN_MAKEFLAGS:= \
63        -C $(PKG_BUILD_DIR) \
64        $(TARGET_CONFIGURE_OPTS) \
65        LINUX_RELEASE="$(LINUX_RELEASE)" \
66        KERNELSRC="$(LINUX_DIR)" \
67        ARCH="$(LINUX_KARCH)" \
68        CROSS_COMPILE="$(TARGET_CROSS)" \
69        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)" \
70        IPSECDIR="/usr/lib/ipsec" \
71        INC_USRLOCAL="/usr" \
72        INC_RCDEFAULT="/etc/init.d" \
73        MODPROBE="/sbin/insmod" \
74        LDFLAGS="$(TARGET_LDFLAGS)" \
75        DESTDIR="$(PKG_INSTALL_DIR)"
76
77define Build/Compile
78        $(MAKE) $(PKG_JOBS) $(OPENSWAN_MAKEFLAGS) programs
79        $(MAKE) $(PKG_JOBS) $(OPENSWAN_MAKEFLAGS) module
80endef
81
82define Build/Install
83        $(MAKE) $(OPENSWAN_MAKEFLAGS) install
84endef
85
86define Package/openswan/conffiles
87/etc/ipsec.conf
88/etc/ipsec.secrets
89/etc/config/ipsec
90endef
91
92define Package/openswan/install
93        $(CP) $(PKG_INSTALL_DIR)/* $(1)
94        $(INSTALL_DIR) $(1)/etc/init.d
95        $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec
96        $(CP) ./files/ipsec.conf $(1)/etc/ipsec.conf
97        $(CP) ./files/ipsec.secrets $(1)/etc/ipsec.secrets
98        $(INSTALL_DIR) $(1)/etc/config
99        $(INSTALL_CONF) ./files/ipsec.config $(1)/etc/config/ipsec
100        rm -rf $(1)/usr/share
101        rm -rf $(1)/usr/man
102        rm -rf $(1)/var
103        rm -rf $(1)/etc/rc.d
104        find $(1) -name \*.old | xargs rm -rf
105        $(INSTALL_DIR) $(1)/lib/upgrade/keep.d
106        $(INSTALL_DATA) files/ipsec.upgrade $(1)/lib/upgrade/keep.d/ipsec
107endef
108
109$(eval $(call BuildPackage,openswan))
110$(eval $(call KernelPackage,openswan))
Note: See TracBrowser for help on using the repository browser.