summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/xrdp/xrdp_0.9.20.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/xrdp/xrdp_0.9.20.bb')
-rw-r--r--meta-oe/recipes-support/xrdp/xrdp_0.9.20.bb94
1 files changed, 94 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/xrdp/xrdp_0.9.20.bb b/meta-oe/recipes-support/xrdp/xrdp_0.9.20.bb
new file mode 100644
index 0000000000..a60c125d06
--- /dev/null
+++ b/meta-oe/recipes-support/xrdp/xrdp_0.9.20.bb
@@ -0,0 +1,94 @@
1SUMMARY = "An open source remote desktop protocol(rdp) server."
2
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://COPYING;md5=72cfbe4e7bd33a0a1de9630c91195c21 \
5"
6
7inherit features_check autotools pkgconfig useradd systemd
8
9DEPENDS = "openssl virtual/libx11 libxfixes libxrandr libpam nasm-native imlib2 pixman libsm"
10
11REQUIRED_DISTRO_FEATURES = "x11 pam"
12
13SRC_URI = "https://github.com/neutrinolabs/${BPN}/releases/download/v${PV}/${BPN}-${PV}.tar.gz \
14 file://xrdp.sysconfig \
15 file://0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch \
16 file://0001-Fix-the-compile-error.patch \
17 file://0001-arch-Define-NO_NEED_ALIGN-on-ppc64.patch \
18 file://0001-mark-count-with-unused-attribute.patch \
19 "
20
21SRC_URI[sha256sum] = "db693401da95b71b4d4e4c99aeb569a546dbdbde343f6d3302b0c47653277abb"
22
23UPSTREAM_CHECK_URI = "https://github.com/neutrinolabs/xrdp/releases"
24UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
25
26CFLAGS += " -Wno-deprecated-declarations"
27
28PACKAGECONFIG ??= ""
29PACKAGECONFIG[fuse] = " --enable-fuse, --disable-fuse, fuse"
30
31USERADD_PACKAGES = "${PN}"
32GROUPADD_PARAM:${PN} = "--system xrdp"
33USERADD_PARAM:${PN} = "--system --home /var/run/xrdp -g xrdp \
34 --no-create-home --shell /bin/false xrdp"
35
36FILES:${PN} += "${datadir}/dbus-1/services/*.service \
37 ${datadir}/dbus-1/accessibility-services/*.service "
38
39FILES:${PN}-dev += "${libdir}/xrdp/libcommon.so \
40 ${libdir}/xrdp/libxrdp.so \
41 ${libdir}/xrdp/libscp.so \
42 ${libdir}/xrdp/libxrdpapi.so "
43
44EXTRA_OECONF = "--enable-pam-config=suse --enable-fuse \
45 --enable-pixman --enable-painter --enable-vsock \
46 --enable-ipv6 --with-imlib2 --with-socketdir=${localstatedir}/run/${PN}"
47
48do_configure:prepend() {
49 cd ${S}
50 ./bootstrap
51 cd -
52}
53
54do_compile:prepend() {
55 sed -i 's/(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am/(MAKE) $(AM_MAKEFLAGS) install-exec-am/g' ${S}/keygen/Makefile.in
56 echo "" > ${B}/xrdp_configure_options.h
57}
58
59do_install:append() {
60
61 # deal with systemd unit files
62 install -d ${D}${systemd_unitdir}/system
63 install -m 0644 ${S}/instfiles/xrdp.service.in ${D}${systemd_unitdir}/system/xrdp.service
64 install -m 0644 ${S}/instfiles/xrdp-sesman.service.in ${D}${systemd_unitdir}/system/xrdp-sesman.service
65 sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
66 sed -i -e 's,@sysconfdir@,${sysconfdir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
67 sed -i -e 's,@sbindir@,${sbindir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
68
69 install -d ${D}${sysconfdir}/sysconfig/xrdp
70 install -m 0644 ${S}/instfiles/*.ini ${D}${sysconfdir}/xrdp/
71 install -m 0644 ${S}/keygen/openssl.conf ${D}${sysconfdir}/xrdp/
72 install -m 0644 ${UNPACKDIR}/xrdp.sysconfig ${D}${sysconfdir}/sysconfig/xrdp/
73 chown xrdp:xrdp ${D}${sysconfdir}/xrdp
74}
75
76SYSTEMD_SERVICE:${PN} = "xrdp.service xrdp-sesman.service"
77
78pkg_postinst:${PN}() {
79 if test -z "$D"
80 then
81 if test -x ${bindir}/xrdp-keygen
82 then
83 ${bindir}/xrdp-keygen xrdp ${sysconfdir}/xrdp/rsakeys.ini >/dev/null
84 fi
85 if test ! -s ${sysconfdir}/xrdp/cert.pem
86 then
87 openssl req -x509 -newkey rsa:2048 -sha256 -nodes -days 3652 \
88 -keyout ${sysconfdir}/xrdp/key.pem \
89 -out ${sysconfdir}/xrdp/cert.pem \
90 -config ${sysconfdir}/xrdp/openssl.conf >/dev/null 2>&1
91 chmod 400 ${sysconfdir}/xrdp/key.pem
92 fi
93 fi
94}