2 ## Copyright (C) 2007-2008 OpenWrt.org
4 ## This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_SOURCE_URL
:=https
://svn.ntop.org
/svn
/ntop
/trunk
/n2n
12 PKG_REV
:=$(shell LC_ALL
=C svn
info ${PKG_SOURCE_URL} | sed
-ne
's/^Last Changed Rev: //p')
15 PKG_VERSION
:=$(PKG_REV
)
18 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
19 PKG_SOURCE
:=$(PKG_SOURCE_SUBDIR
).
tar.gz
21 PKG_SOURCE_VERSION
:=$(PKG_REV
)
23 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
24 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)
26 include $(INCLUDE_DIR
)/package.mk
31 TITLE
:=VPN tunneling daemon
32 URL
:=http
://www.ntop.org
/n2n
/
34 DEPENDS
:=+libpthread
+kmod-tun
38 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
39 $(TARGET_CONFIGURE_OPTS
) \
40 CFLAGS
="$(TARGET_CFLAGS)"
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
53 $(eval
$(call BuildPackage
,n2n
))