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

# source: james
TARBALL=logmein-hamachi-${PKGVER}-x64.tgz
MD5SUM=c2f33caa5c6963a1e8e58d1c3d5580bd
SRC_URL=https://www.vpn.net/installers/logmein-hamachi-$PKGVER-x64.tgz
BUNDLE=

SLACKREQ='' # 
SLACKDESC="hamachi: hamachi $PKGVER (Hosted VPN client)  
hamachi:  
hamachi: LogMeIn Hamachi is a hosted VPN service that lets you securely extend 
hamachi: LAN-like networks to distributed teams, mobile workers and your gamer 
hamachi: friends alike. In minutes. This package contains the command-line 
hamachi: client. This is a binary tarball re-packaged from LogMeIn.  
hamachi: 
hamachi: https://www.vpn.net/
hamachi: 
hamachi: 
hamachi: 
"

### default pkg_download
### default pkg_package
### build
pkg_build() {
	cd /tmp/*hamachi*
	mkdir -p /opt/logmein-hamachi/bin
	cp CHANGES LICENSE README Release_notes.rtf /opt/logmein-hamachi
	cp dnsdown dnsup hamachid /opt/logmein-hamachi/bin
	ln -sf /opt/logmein-hamachi/bin/hamachid /usr/bin/hamachi
	ln -sf /opt/logmein-hamachi/bin/hamachid /usr/bin/hamachid
	
	# startup script
	sed -i -e 's|^PATH=.*|PATH=/usr/sbin:/usr/bin:/sbin:/bin|;
	           s|^NAME=.*|NAME=99-logmein-hamachi|' hamachi-init
	chmod -x hamachi-init # disable by default
	mkdir -p /etc/init.d
	cp hamachi-init /etc/init.d/99-logmein-hamachi

	pkg_build_slackdesc
}
