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

# source: james
TARBALL=turbovnc-$PKGVER.tar.gz
MD5SUM=9d04b26d40664d0d8072e8b1828f69c4
SRC_URL=http://downloads.sourceforge.net/turbovnc/$TARBALL
BUNDLE=

SLACKREQ=libjpeg-turbo
SLACKDESC="turbovnc: turbovnc $PKGVER (TurboVNC Server)
turbovnc: 
turbovnc: TurboVNC is a derivative of VNC (Virtual Network Computing) that is 
turbovnc: tuned to provide peak performance for full-screen video and 3D.
turbovnc: 
turbovnc: This package only provides the server component.
turbovnc: 
turbovnc: https://turbovnc.org/
turbovnc: 
turbovnc: 
turbovnc: 
"
SLACKCONF=tigervnc

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	# we can only build the server. 
	# vncviewer is java and we cannot build it at this time.
	CMAKEFLAGS="$CMAKEFLAGS -DTVNC_BUILDJAVA=0 -DTVNC_USEPAM=0" &&
	pkg_build_cmake && 
	pkg_build_slackdesc &&

	# clean rubbish
	rm -rf /usr/bin/{vncviewer,checkshmpixmaps} /usr/share/doc \
		/usr/share/man/man1/{vncviewer,Xserver}.1 &&
	chmod -x /etc/init.d/tvncserver # disable autostart
}


