add a default for PKG_BUILD_DIR and PKG_INSTALL_DIR (will use KERNEL_BUILD_DIR if...
[openwrt.git] / package / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ipsec-tools
12 PKG_VERSION:=0.6.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/ipsec-tools
17 PKG_MD5SUM:=e908f3cf367e31c7902df5ab16fbe5c3
18 PKG_CAT:=bzcat
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/kernel.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-natt
41
42 define Build/Configure
43 (cd $(PKG_BUILD_DIR); touch \
44 configure.ac \
45 aclocal.m4 \
46 Makefile.in \
47 config.h.in \
48 configure \
49 );
50 $(call Build/Configure/Default)
51 endef
52
53 # override CFLAGS holding "-Werror" that break builds on compile warnings
54 define Build/Compile
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 DESTDIR="$(PKG_INSTALL_DIR)" \
57 CFLAGS="$(TARGET_CFLAGS)" \
58 all install
59 endef
60
61 define Package/ipsec-tools/install
62 $(INSTALL_DIR) $(1)/etc
63 $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/
64 $(INSTALL_DIR) $(1)/usr/lib/
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
69 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
70 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
71 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
72 endef
73
74 $(eval $(call BuildPackage,ipsec-tools))
This page took 0.042909 seconds and 5 git commands to generate.