source: packages/net/openswan/Makefile @ 28739

Last change on this file since 28739 was 28739, checked in by nico, 5 years ago

packages/openswan: update to 2.6.37

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