add n2n
[openwrt/svn-archive/archive.git] / net / n2n / Makefile
1 #
2 ## Copyright (C) 2007-2008 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
10 PKG_BRANCH:=trunk
11 PKG_SOURCE_URL:=https://svn.ntop.org/svn/ntop/trunk/n2n
12 PKG_REV:=3561
13
14 PKG_NAME:=n2n
15 PKG_VERSION:=$(PKG_REV)
16 PKG_RELEASE:=1
17
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
20 PKG_SOURCE_PROTO:=svn
21 PKG_SOURCE_VERSION:=$(PKG_REV)
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/n2n
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE:=VPN tunneling daemon
32 URL:=http://www.ntop.org/n2n/
33 SUBMENU:=VPN
34 DEPENDS:=+libpthread +kmod-tun
35 endef
36
37 define Build/Compile
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(TARGET_CFLAGS)"
41 endef
42
43 define Package/n2n/install
44 $(INSTALL_DIR) $(1)/sbin
45 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/edge $(1)/sbin/
46 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/supernode $(1)/sbin/
47 $(INSTALL_DIR) $(1)/etc/config
48 $(INSTALL_DATA) ./files/n2n.config $(1)/etc/config/n2n
49 $(INSTALL_DIR) $(1)/etc/init.d
50 $(INSTALL_BIN) ./files/n2n.init $(1)/etc/init.d/n2n
51 endef
52
53 $(eval $(call BuildPackage,n2n))