aboutsummaryrefslogtreecommitdiffstats
path: root/community/xrdp/APKBUILD
blob: e4a9e41d1702c9cbb775ea11926d5c2ec4551ad6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Contributor: Alan Lacerda <alacerda@alpinelinux.org>
# Maintainer: Alan Lacerda <alacerda@alpinelinux.org>
pkgname=xrdp
pkgver=0.9.17
pkgrel=1
pkgdesc="Open source RDP server"
url="https://www.xrdp.org/"
arch="all"
license="Apache-2.0"
install="$pkgname.post-install"
depends="xinit"
makedepends="autoconf automake libtool openssl-dev libx11-dev
	libxfixes-dev libxrandr-dev libjpeg-turbo-dev fuse-dev linux-headers
	nasm linux-pam-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-openrc"
source="https://github.com/neutrinolabs/xrdp/releases/download/v$pkgver/xrdp-$pkgver.tar.gz
	xrdp.initd
	dynamic-link.patch
	remove-werror.patch
	openssl.conf
	"

# secfixes:
#   0.9.15-r1:
#     - CVE-2021-36158
#   0.9.13.1-r0:
#     - CVE-2020-4044

prepare() {
	default_prepare
	./bootstrap
}

build() {
	local _simd_opt=""
	if [ "$CARCH" = "x86" ]; then
		_simd_opt="--without-simd"
	fi
	./configure \
		--prefix=/usr \
		--disable-static \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--sbindir=/usr/sbin \
		--enable-fuse \
		--enable-pam \
		--enable-tjpeg \
		$_simd_opt
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm0644 "$srcdir"/openssl.conf -t "$pkgdir"/etc/xrdp

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	ln -s $pkgname $pkgdir/etc/init.d/$pkgname-sesman

	# Remove keys and its configuration generated during the
	# build process
	rm -f \
		"$pkgdir"/etc/xrdp/*.pem \
		"$pkgdir"/etc/xrdp/rsakeys.ini
}

sha512sums="
03bf9b4bba805701113a4c79a7c86234942c24d288cbfcf99418b69d4acd947e8e9e221f9d0ac2504eddacf573e2ca83645bf6487a27c5534b7684bb39902930  xrdp-0.9.17.tar.gz
22b44398f4014ee67831051d1a1a859c6f4a601d75a03b33142ce7ea1e3f00082134337efb7da69e964f4a369d2b22114973221be2131f384f9459cc8e82fc13  xrdp.initd
c20de35c4623bcdeae2ba8a740f965b5f320c506ff9a7b9444ec0c8300af518fd3a84b8c28f6e775b7bab73bdac7433be9261d133fc767d953ac54cb2d3b0afd  dynamic-link.patch
e22d17ad3d7116707bd4259592960175cf7586637228f8c37d92e60430ae38bf71d10667688e2d1db123709a074480b1f2e4e6f279c6ef421cc1c20688cde816  remove-werror.patch
c06de34e3f926d3d580a54a95a97c0fb3069c9fbade65b23bf424609aabb2a42db68eaeaa9540716b93b8d96bc3e75616612eedfa6cd55e736eee3b79c585d4f  openssl.conf
"