fix ppp defaultroute issues (based on patch from #1386, fixes #1181)
[openwrt.git] / package / openswan / Makefile
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
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=openswan
13 PKG_VERSION:=2.4.7
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:=70f22e8adc39e07a165f75eccb7cd079
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/openswan/Default
27 TITLE:=Openswan
28 DESCRIPTION:=\
29 Openswan is an IPsec implementation for Linux.
30 URL:=http://www.openswan.org/
31 endef
32
33 define Package/openswan
34 $(call Package/openswan/Default)
35 SECTION:=net
36 CATEGORY:=Network
37 DEPENDS:=+kmod-openswan +libgmp
38 TITLE+= (daemon)
39 DESCRIPTION+=\\\
40 \\\
41 This package contains the Openswan user-land daemon.
42 URL:=http://www.openswan.org/
43 endef
44
45 define KernelPackage/openswan
46 SUBMENU:=Network Support
47 $(call Package/openswan/Default)
48 TITLE+= (kernel module)
49 DESCRIPTION+=\\\
50 \\\
51 This package contains the Openswan kernel module.
52 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
53 FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX)
54 endef
55
56 PKG_MAKE_OPTS:= \
57 LINUX_RELEASE="$(LINUX_RELEASE)" \
58 KERNELSRC="$(LINUX_DIR)" \
59 ARCH="$(LINUX_KARCH)" \
60 CROSS_COMPILE="$(TARGET_CROSS)" \
61 USERCOMPILE="$(TARGET_CFLAGS) -I./linux/include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib" \
62 IPSECDIR="/usr/lib/ipsec" \
63 INC_USRLOCAL="/usr" \
64
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 $(TARGET_CONFIGURE_OPTS) \
68 $(PKG_MAKE_OPTS) \
69 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
70 DESTDIR="$(PKG_INSTALL_DIR)" \
71 programs module install
72 endef
73
74 define Package/openswan/install
75 $(CP) $(PKG_INSTALL_DIR)/* $(1)
76 $(INSTALL_DIR) $(1)/etc/init.d
77 $(CP) ./files/ipsec.init $(1)/etc/init.d/ipsec
78 rm -rf $(1)/usr/share
79 rm -rf $(1)/usr/man
80 rm -rf $(1)/var
81 rm -rf $(1)/etc/rc.d
82 find $(1) -name \*.old | xargs rm -rf
83 endef
84
85 $(eval $(call BuildPackage,openswan))
86 $(eval $(call KernelPackage,openswan))
This page took 0.039967 seconds and 5 git commands to generate.