# Maintainer: Brian Bidulock # Contributo: Jianhui Z # Contributo: Tau Tsao # Contributor: Tomasz Zok # Contributor: techryda # Contributor: Mathias R. pkgname=xrdp pkgver=0.9.21.1 pkgrel=3 pkgdesc="An open source remote desktop protocol (RDP) server" url="https://github.com/neutrinolabs/xrdp" arch=(i686 x86_64 armv6h armv7l aarch64) license=('Apache') makedepends=('nasm') depends=('libxrandr' 'fuse' 'libfdk-aac' 'ffmpeg' 'imlib2') checkdepends=('check') backup=('etc/xrdp/sesman.ini' 'etc/xrdp/xrdp.ini' 'etc/xrdp/cert.pem' 'etc/xrdp/key.pem' 'etc/xrdp/startwm.sh') install="${pkgname}.install" source=("https://github.com/neutrinolabs/xrdp/releases/download/v${pkgver}/xrdp-${pkgver}.tar.gz" "arch-config.diff") sha256sums=('7c6c42dce7d3201efe4481e0d388e00094bf8f15224ddad9e47b402a672e08e3' 'f3bbae53c435bd477507ab3dc1e296ccaa0bde6e7fca5afcb1ad93c81f0262d1') prepare() { cd "${pkgname}-${pkgver}" patch -Np2 -b -z .orig <../arch-config.diff ./bootstrap } build() { cd "${pkgname}-${pkgver}" ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --sbindir=/usr/bin \ --with-systemdsystemunitdir=/usr/lib/systemd/system \ --enable-jpeg \ --enable-tjpeg \ --enable-fuse \ --enable-fdkaac \ --enable-opus \ --enable-rfxcodec \ --enable-mp3lame \ --enable-pixman \ --enable-painter \ --enable-vsock \ --enable-ipv6 \ --enable-pam-config=arch \ --enable-rdpsndaudin \ --with-imlib2 # Fight unused direct deps sed -i -e "s| -shared | $LDFLAGS\0 |g" -e "s| if test \"\$export_dynamic\" = yes && test -n \"\$export_dynamic_flag_spec\"; then| func_append compile_command \" $LDFLAGS\"\n func_append finalize_command \" $LDFLAGS\"\n\0|" libtool make } check () { cd "${pkgname}-${pkgver}" make check } package() { cd "${pkgname}-${pkgver}" make DESTDIR="$pkgdir" install rm -f "$pkgdir"/etc/xrdp/rsakeys.ini install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING }