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

# source: james
TARBALL=logmein-hamachi-${PKGVER}-x64.tgz
MD5SUM=83659db8524682a75348cdc4cdc21915
SRC_URL=https://secure.logmein.com/labs/logmein-hamachi-2.1.0.139-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: 
hamachi: 
hamachi: 
hamachi: https://secure.logmein.com/products/hamachi/default.aspx
"

### 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
}
