# Maintainer: Brian Bidulock # Contributo: Jianhui Z # Contributo: Tau Tsao # Contributor: Tomasz Zok # Contributor: techryda # Contributor: Mathias R. pkgname=xrdp pkgver=0.9.14 pkgrel=1 pkgdesc="An open source remote desktop protocol (RDP) server" url="https://github.com/neutrinolabs/xrdp" arch=('i686' 'x86_64' 'armv6h') license=('Apache') makedepends=('nasm') depends=('tigervnc' 'libxrandr' 'lame' 'opus' 'fuse') backup=('etc/xrdp/sesman.ini' 'etc/xrdp/xrdp.ini') install="${pkgname}.install" source=("https://github.com/neutrinolabs/xrdp/releases/download/v${pkgver}/xrdp-${pkgver}.tar.gz" "arch-config.diff" "xrdp-fix-build-0.9.14.patch::https://github.com/neutrinolabs/xrdp/commit/61b9a42fc52dd8106e44f54fe3b7e433a710ece7.patch") sha256sums=('e3a9d27da7881dbfb7fd22b33c11dd7390d42ca8ff94541e88f552b8dce1b5d2' '462c0b973a31effbe0423c7c365b0b2fd2ca5cdc6f1bd8744ea48ef45e04593c' 'e7d9d719d1039be245e6bddff6ebce52277757cee61528011f96cf58a45fd924') prepare() { cd "${pkgname}-${pkgver}" patch -Np2 -b -z .orig <../arch-config.diff patch -Np1 -b -z .orig <../xrdp-fix-build-0.9.14.patch ./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-opus \ --enable-rfxcodec \ --enable-mp3lame \ --enable-pixman \ --enable-painter \ --enable-vsock # Fight unused direct deps sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool make V=0 } package() { cd "${pkgname}-${pkgver}" make DESTDIR="$pkgdir" install rm -f "$pkgdir"/etc/xrdp/rsakeys.ini install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING }