[package] update ipsec-tools to 0.7.3 (#6252)
[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:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/ipsec-tools
17 PKG_MD5SUM:=821bd84e8d4ad5a93bf594b8b3d66e1e
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/ipsec-tools
22 SECTION:=net
23 CATEGORY:=Network
24 DEPENDS:=@LINUX_2_6 +libopenssl
25 TITLE:=IPsec management tools
26 URL:=http://ipsec-tools.sourceforge.net/
27 endef
28
29 CONFIGURE_ARGS += \
30 --enable-shared \
31 --enable-static \
32 --with-kernel-headers="$(LINUX_DIR)/include" \
33 --without-readline \
34 --with-openssl="$(STAGING_DIR)/usr" \
35 --without-libradius \
36 --without-libpam \
37 --enable-dpd \
38 --enable-hybrid \
39 --enable-security-context=no \
40 --enable-natt \
41 --enable-adminport
42
43 define Build/Prepare
44 $(call Build/Prepare/Default)
45 chmod -R u+w $(PKG_BUILD_DIR)
46 endef
47
48 define Build/Configure
49 (cd $(PKG_BUILD_DIR); touch \
50 configure.ac \
51 aclocal.m4 \
52 Makefile.in \
53 config.h.in \
54 configure \
55 );
56 $(call Build/Configure/Default)
57 echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
58 endef
59
60 # override CFLAGS holding "-Werror" that break builds on compile warnings
61 define Build/Compile
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 DESTDIR="$(PKG_INSTALL_DIR)" \
64 CFLAGS="$(TARGET_CFLAGS)" \
65 all install
66 endef
67
68 define Package/ipsec-tools/install
69 $(INSTALL_DIR) $(1)/etc
70 $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/
71 $(SED) 's|@sysconfdir_x@|/etc|g' $(1)/etc/racoon.conf
72 $(INSTALL_DIR) $(1)/etc/racoon
73 $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/psk.txt $(1)/etc/racoon/
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
82 endef
83
84 define Package/ipsec-tools/conffiles
85 /etc/racoon.conf
86 /etc/racoon/psk.txt
87 endef
88
89 $(eval $(call BuildPackage,ipsec-tools))