### this file is sourced not run
PKGVER=2015.03
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=n2n_v1-2015.03.tar.bz2
MD5SUM=166eb0a4e85734a3d3b59832b60ac1f5
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$TARBALL
BUNDLE=

SLACKREQ= # ifconfig etc
SLACKDESC='n2n-v1: n2n-v1 2015.03 (Simple peer-to-peer VPN)
n2n-v1: 
n2n-v1: n2n is a layer-two peer-to-peer virtual private network (VPN) which 
n2n-v1: allows users to exploit features typical of P2P applications at 
n2n-v1: network instead of application level. This means that users can gain 
n2n-v1: native IP visibility (e.g. two PCs belonging to the same n2n network 
n2n-v1: can ping each other) and be reachable with the same network IP 
n2n-v1: address regardless of the network where they currently belong. This 
n2n-v1: is version 1 of n2n.
n2n-v1: 
n2n-v1: http://www.ntop.org/products/n2n/
'
SLACKCON=n2n-v2

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/n2n* &&
	
	# build
	make $MAKEFLAGS DEBUG= && make install DESTDIR=/tmp/xxx &&
	
	# rename and install
	mkdir -p /usr/bin /usr/sbin /usr/share/man/{man1,man8} /usr/share/doc/n2n_v1 &&
	install -m 755 /tmp/xxx/usr/sbin/edge /usr/sbin/n2n-edge &&
	install -m 755 /tmp/xxx/usr/bin/supernode /usr/bin/n2n-supernode &&
	install -m 644 edge.8 /usr/share/man/man8/n2n-edge.8 &&
	install -m 644 supernode.1 /usr/share/man/man1/n2n-supernode.1 &&
	
	install -m 644 HACKING /usr/share/doc/n2n_v1 &&
	install -m 644 README /usr/share/doc/n2n_v1 &&
	
	pkg_build_slackdesc
}
