fix iptables extension issue with mac os x builds
[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
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/openswan/Default
23 TITLE:=Openswan
24 DESCRIPTION:=\
25 Openswan is an IPsec implementation for Linux.
26 URL:=http://www.openswan.org/
27 endef
28
29 define Package/openswan
30 $(call Package/openswan/Default)
31 SECTION:=net
32 CATEGORY:=Network
33 DEPENDS:=+kmod-openswan +libgmp
34 TITLE+= (daemon)
35 DESCRIPTION+=\\\
36 \\\
37 This package contains the Openswan user-land daemon.
38 URL:=http://www.openswan.org/
39 endef
40
41 define 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)
50 endef
51
52 PKG_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
61 define 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
68 endef
69
70 define 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
79 endef
80
81 $(eval $(call BuildPackage,openswan))
82 $(eval $(call KernelPackage,openswan))
This page took 0.052442 seconds and 5 git commands to generate.