c1fe597a8cda22f44aa55c86cf94ea183390a6ec
[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.4
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=@SF/ipsec-tools
18 PKG_MD5SUM:=d0242a943c82c0cbf28005966ff35e21
19 PKG_CAT:=bzcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/kernel.mk
25
26 define Package/ipsec-tools
27 SECTION:=base
28 CATEGORY:=Network
29 DEPENDS:=@LINUX_2_6 +libopenssl
30 TITLE:=IPsec management tools
31 DESCRIPTION:=IPsec management tools
32 URL:=http://ipsec-tools.sourceforge.net/
33 endef
34
35 define Build/Configure
36 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
37 touch configure.ac; \
38 touch aclocal.m4; \
39 touch Makefile.in; \
40 touch config.h.in; \
41 touch configure; \
42 $(TARGET_CONFIGURE_OPTS) \
43 CFLAGS="$(TARGET_CFLAGS)" \
44 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
45 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
46 ./configure \
47 --target=$(GNU_TARGET_NAME) \
48 --host=$(GNU_TARGET_NAME) \
49 --build=$(GNU_HOST_NAME) \
50 --program-prefix="" \
51 --program-suffix="" \
52 --prefix=/usr \
53 --exec-prefix=/usr \
54 --bindir=/usr/bin \
55 --datadir=/usr/share \
56 --includedir=/usr/include \
57 --infodir=/usr/share/info \
58 --libdir=/usr/lib \
59 --libexecdir=/usr/lib \
60 --localstatedir=/var \
61 --mandir=/usr/share/man \
62 --sbindir=/usr/sbin \
63 --sysconfdir=/etc \
64 $(DISABLE_LARGEFILE) \
65 $(DISABLE_NLS) \
66 --enable-shared \
67 --enable-static \
68 --disable-rpath \
69 --with-gnu-ld \
70 --with-kernel-headers="$(LINUX_DIR)/include" \
71 --without-readline \
72 --with-openssl="$(STAGING_DIR)/usr" \
73 --without-libradius \
74 --without-libpam \
75 );
76 endef
77
78 define Build/Compile
79 $(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" all install)
80 endef
81
82 define Package/ipsec-tools/install
83 install -d -m0755 $(1)/etc
84 install -m0600 $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/
85 install -d -m0755 $(1)/usr/lib/
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/
88 install -d -m0755 $(1)/usr/sbin
89 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/plainrsa-gen $(1)/usr/sbin/
90 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoon $(1)/usr/sbin/
91 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/racoonctl $(1)/usr/sbin/
92 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/setkey $(1)/usr/sbin/
93 endef
94
95 $(eval $(call BuildPackage,ipsec-tools))
This page took 0.051866 seconds and 3 git commands to generate.