Ticket #9766: Makefile

File Makefile, 2.4 KB (added by pavel.koroteev@…, 5 years ago)

Makefile

Line 
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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=ipsec-tools
12PKG_VERSION:=0.8.0
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=@SF/ipsec-tools
17PKG_MD5SUM:=b79aae3055a51f8de5c0f1b8ca6cf619
18
19PKG_BUILD_PARALLEL:=1
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/ipsec-tools
25  SECTION:=net
26  CATEGORY:=Network
27  SUBMENU:=VPN
28  DEPENDS:=@!LINUX_2_4 +libopenssl +kmod-ipsec
29  TITLE:=IPsec management tools
30  URL:=http://ipsec-tools.sourceforge.net/
31endef
32
33CONFIGURE_ARGS += \
34        --enable-shared \
35        --enable-static \
36        --with-kernel-headers="$(LINUX_DIR)/include" \
37        --without-readline \
38        --with-openssl="$(STAGING_DIR)/usr" \
39        --without-libradius \
40        --without-libpam \
41        --enable-dpd \
42        --enable-hybrid \
43        --enable-security-context=no \
44        --enable-natt \
45        --enable-frag \
46         $(call autoconf_bool,CONFIG_IPV6,ipv6)
47
48# override CFLAGS holding "-Werror" that break builds on compile warnings
49MAKE_FLAGS+=\
50        CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)"
51
52define Build/Prepare
53        $(call Build/Prepare/Default)
54        chmod -R u+w $(PKG_BUILD_DIR)
55endef
56
57define Build/Configure
58        (cd $(PKG_BUILD_DIR); touch \
59                configure.ac \
60                aclocal.m4 \
61                Makefile.in \
62                config.h.in \
63                configure \
64        );
65        $(call Build/Configure/Default)
66        echo "#undef HAVE_SHADOW_H" >> $(PKG_BUILD_DIR)/config.h
67endef
68
69define 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/
83endef
84
85define Package/ipsec-tools/conffiles
86/etc/racoon.conf
87/etc/racoon/psk.txt
88endef
89
90$(eval $(call BuildPackage,ipsec-tools))