nuke $Id$ in /packages as well
[openwrt/svn-archive/archive.git] / net / ipsec-tools / 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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=ipsec-tools
12 PKG_VERSION:=0.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/ipsec-tools
17 PKG_MD5SUM:=c0a586924edde35264ecfe94ad1c261f
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 --enable-ipv6
43
44 define Build/Prepare
45 $(call Build/Prepare/Default)
46 chmod -R u+w $(PKG_BUILD_DIR)
47 endef
48
49 define Build/Configure
50 (cd $(PKG_BUILD_DIR); touch \
51 configure.ac \
52 aclocal.m4 \
53 Makefile.in \
54 config.h.in \
55 configure \
56 );
57 $(call Build/Configure/Default)
58 echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
59 endef
60
61 # override CFLAGS holding "-Werror" that break builds on compile warnings
62 define Build/Compile
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 DESTDIR="$(PKG_INSTALL_DIR)" \
65 CFLAGS="$(TARGET_CFLAGS)" \
66 all install
67 endef
68
69 define Package/ipsec-tools/install
70 $(INSTALL_DIR) $(1)/etc
71 $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/
72 $(SED) 's|@sysconfdir_x@|/etc|g' $(1)/etc/racoon.conf
73 $(INSTALL_DIR) $(1)/etc/racoon
74 $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/psk.txt $(1)/etc/racoon/
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
78 $(INSTALL_DIR) $(1)/usr/sbin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
82 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
83 endef
84
85 define Package/ipsec-tools/conffiles
86 /etc/racoon.conf
87 /etc/racoon/psk.txt
88 endef
89
90 $(eval $(call BuildPackage,ipsec-tools))