### this file is sourced not run
PKGVER=0.9.14.dev
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=x11vnc-0.9.14-dev.tar.gz
MD5SUM=823ad4a93100f11a74c8c8fd46695b2f
SRC_URL=http://x11vnc.sourceforge.net/dev/$TARBALL
BUNDLE=

SLACKREQ=libX11
SLACKDESC='x11vnc: x11vnc 0.9.14 (VNC server for real display)  
x11vnc:  
x11vnc: x11vnc allows one to view remotely and interact with real X displays 
x11vnc: (i.e. a display corresponding to a physical monitor, keyboard, and 
x11vnc: mouse) with any VNC viewer.  
x11vnc: 
x11vnc: 
x11vnc: 
x11vnc: 
x11vnc: 
x11vnc: 
'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	sed -i -e 's|Icon=.*|Icon=/usr/share/pixmaps/midi-icons/pc2pc48.png|' \
	       -e 's|%%HOME/.x11vnc.log.%%VNCDISPLAY|"%HOME/.x11vnc.log.%VNCDISPLAY"|' \
	       /usr/share/applications/x11vnc.desktop &&
	       
	# install helper so it can run without wish (tcl/tk)
	ORIG_EXEC="$(sed '/Exec=/!d; s/Exec=//' /usr/share/applications/x11vnc.desktop)" &&
	sed -i -e "s|@@EXEC|$ORIG_EXEC|" /tmp/pkg/x11vnc-helper &&
	install -m755 /tmp/pkg/x11vnc-helper /usr/bin &&
	sed -i -e '/Exec=/d' /usr/share/applications/x11vnc.desktop &&
	echo "Exec=x11vnc-helper" >> /usr/share/applications/x11vnc.desktop
}



