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

# source: james
TARBALL=rdesktop-$PKGVER.tar.gz
MD5SUM=06483121ce067b537342687dd6a909d8
SRC_URL=https://github.com/rdesktop/rdesktop/releases/download/v1.8.3/$TARBALL
BUNDLE=

SLACKREQ='openssl libsamplerate libgssglue libvncserver'
SLACKDESC="rdesktop: rdesktop $PKGVER (Windows Remote Desktop Services client)  
rdesktop:  
rdesktop: rdesktop is an open source client for Windows Remote Desktop 
rdesktop: Services, capable of natively speaking Remote Desktop Protocol (RDP) 
rdesktop: in order to present the user'\''s Windows desktop. rdesktop is known to 
rdesktop: work with Windows versions such as NT 4 Terminal Server, 2000, XP, 
rdesktop: 2003, 2003 R2, Vista, 2008, 7, 2008 R2, and 2012.
rdesktop: 
rdesktop: 
rdesktop: 
rdesktop:
"
SLACKSUG='krb5'

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/rdesktop* &&
	# apply interesting debian patches
	tar -xf ../pkg/rdesktop_1.8.3-2.debian.tar.xz &&
	for p in \
		01_paging.patch \
		02-Fix-OpenSSL-1.1-compability-issues.patch \
		20_update_manpage.dpatch
	do
		patch -Np1 -i debian/patches/$p || return 1
	done
}


### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-smartcard --with-ipv6 --with-sound=alsa"
	pkg_build_autoconf && pkg_build_slackdesc
}


