source: trunk/package/openswan/Makefile @ 7073

Last change on this file since 7073 was 7073, checked in by hcg, 10 years ago

Added dependency to package IP required by Openswan

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
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
9include $(TOPDIR)/rules.mk
10include $(INCLUDE_DIR)/kernel.mk
11
12PKG_NAME:=openswan
13PKG_VERSION:=2.4.7
14PKG_RELEASE:=1
15
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17PKG_SOURCE_URL:=http://www.openswan.org/download
18PKG_MD5SUM:=70f22e8adc39e07a165f75eccb7cd079
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/openswan/Default
23  TITLE:=Openswan
24  DESCRIPTION:=\
25        Openswan is an IPsec implementation for Linux.
26  URL:=http://www.openswan.org/
27endef
28
29define Package/openswan
30  $(call Package/openswan/Default)
31  SECTION:=net
32  CATEGORY:=Network
33  DEPENDS:=+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/
39endef
40
41define KernelPackage/openswan
42  SUBMENU:=Network Support
43  $(call Package/openswan/Default)
44  TITLE+= (kernel module)
45  DESCRIPTION+=\\\
46        \\\
47        This package contains the Openswan kernel module.
48  VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
49  FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
50endef
51
52PKG_MAKE_OPTS:= \
53                LINUX_RELEASE="$(LINUX_RELEASE)" \
54                KERNELSRC="$(LINUX_DIR)" \
55                ARCH="$(LINUX_KARCH)" \
56                CROSS_COMPILE="$(TARGET_CROSS)" \
57                USERCOMPILE="$(TARGET_CFLAGS) -I./linux/include $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" \
58                IPSECDIR="/usr/lib/ipsec" \
59                INC_USRLOCAL="/usr" \
60
61define Build/Compile
62        $(MAKE) -C $(PKG_BUILD_DIR) \
63                $(TARGET_CONFIGURE_OPTS) \
64                $(PKG_MAKE_OPTS) \
65                LDFLAGS="$(TARGET_LDFLAGS)" \
66                DESTDIR="$(PKG_INSTALL_DIR)" \
67                programs module install
68endef
69
70define Package/openswan/install
71        $(CP) $(PKG_INSTALL_DIR)/* $(1)
72        $(INSTALL_DIR) $(1)/etc/init.d
73        $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec
74        rm -rf $(1)/usr/share
75        rm -rf $(1)/usr/man
76        rm -rf $(1)/var
77        rm -rf $(1)/etc/rc.d
78        find $(1) -name \*.old | xargs rm -rf
79endef
80
81$(eval $(call BuildPackage,openswan))
82$(eval $(call KernelPackage,openswan))
Note: See TracBrowser for help on using the repository browser.