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