[package] add GRE support to ipsec-tools, so that opennhrp can work (#6926)
[openwrt/svn-archive/archive.git] / net / ipsec-tools / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=ipsec-tools
12 PKG_VERSION:=0.7.3
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/ipsec-tools
17 PKG_MD5SUM:=821bd84e8d4ad5a93bf594b8b3d66e1e
18
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/ipsec-tools
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=@LINUX_2_6 +libopenssl
27 TITLE:=IPsec management tools
28 URL:=http://ipsec-tools.sourceforge.net/
29 endef
30
31 CONFIGURE_ARGS += \
32 --enable-shared \
33 --enable-static \
34 --with-kernel-headers="$(LINUX_DIR)/include" \
35 --without-readline \
36 --with-openssl="$(STAGING_DIR)/usr" \
37 --without-libradius \
38 --without-libpam \
39 --enable-dpd \
40 --enable-hybrid \
41 --enable-security-context=no \
42 --enable-natt \
43 --enable-adminport
44
45 define Build/Prepare
46 $(call Build/Prepare/Default)
47 chmod -R u+w $(PKG_BUILD_DIR)
48 endef
49
50 define Build/Configure
51 (cd $(PKG_BUILD_DIR); touch \
52 configure.ac \
53 aclocal.m4 \
54 Makefile.in \
55 config.h.in \
56 configure \
57 );
58 $(call Build/Configure/Default)
59 echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
60 endef
61
62 # override CFLAGS holding "-Werror" that break builds on compile warnings
63
64 define Package/ipsec-tools/install
65 $(INSTALL_DIR) $(1)/etc
66 $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/
67 $(SED) 's|@sysconfdir_x@|/etc|g' $(1)/etc/racoon.conf
68 $(INSTALL_DIR) $(1)/etc/racoon
69 $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/psk.txt $(1)/etc/racoon/
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
72 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
73 $(INSTALL_DIR) $(1)/usr/sbin
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
77 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
78 endef
79
80 define Package/ipsec-tools/conffiles
81 /etc/racoon.conf
82 /etc/racoon/psk.txt
83 endef
84
85 $(eval $(call BuildPackage,ipsec-tools))