wok view xrdp/receipt @ rev 24445

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 14 14:14:23 2022 +0000 (2022-02-14)
parents 1e9cc0eb1d17
children 0262035dc1e7
line source
1 # SliTaz package receipt.
3 PACKAGE="xrdp"
4 VERSION="0.9.16"
5 CATEGORY="network"
6 SHORT_DESC="An open source remote desktop protocol (RDP) server."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="Apache"
9 WEB_SITE="http://www.xrdp.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://github.com/neutrinolabs/$PACKAGE/releases/download/v$VERSION/$TARBALL"
14 DEPENDS="openssl pam util-linux-uuid xorg-libICE xorg-libSM xorg-libX11
15 xorg-libXext xorg-libXfixes xorg-libXrandr xorgxrdp zlib"
16 BUILD_DEPENDS="autoconf automake libtool nasm openssl-dev pam-dev
17 pkg-config util-linux-uuid-dev xorg-dev"
19 current_version()
20 {
21 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
22 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 ./bootstrap &&
29 ./configure \
30 --prefix=/usr \
31 --sysconfdir=/etc \
32 --mandir=/usr/share/man \
33 --localstatedir=/var \
34 --enable-ipv6 \
35 $CONFIGURE_ARGS &&
36 make &&
37 make DESTDIR=$DESTDIR install
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir -p $fs/usr/lib/xrdp
44 mkdir -p $fs/usr/share
45 mkdir -p $install/usr/share/doc
47 cp -a $src/*.txt $install/usr/share/doc
48 cp -a $src/*.md $install/usr/share/doc
49 cp -a $src/COPYING $install/usr/share/doc
50 cp -a $install/etc $fs/
51 cp -a $install/usr/lib/xrdp/*.so* $fs/usr/lib/xrdp/
52 cp -a $install/usr/sbin $fs/usr/
53 cp -a $install/usr/bin $fs/usr/
54 cp -a $install/usr/share/xrdp $fs/usr/share/
56 # 0.9.13 no such file
57 # mv $fs/etc/xrdp/xrdp.sh $fs/etc/init.d/xrdp
59 sed -i -e 's|/usr/local|/usr|;s|xrdp\.sh|xrdp|' \
60 -e 's|--noheading -C||' \
61 -e 's,grep -q -i,grep /usr/sbin | &,' \
62 -e 's|.*/lib/lsb/init-functions|# &|' \
63 $fs/etc/init.d/xrdp
65 SESSION="/usr/bin/lxde-session"
66 sed -i "s|xterm|[ -x $SESSION ] \\&\\& exec $SESSION\\n &|" \
67 $fs/etc/xrdp/startwm.sh
69 rm -f $fs/etc/xrdp/rsakeys.ini $fs/etc/xrdp/key.pem $fs/etc/xrdp/cert.pem
70 }
72 # Pre and post install commands for Tazpkg.
73 post_install()
74 {
75 chroot $1/ xrdp-keygen xrdp /etc/xrdp/rsakeys.ini
76 chroot $1/ openssl req -x509 -newkey rsa:2048 -sha256 -nodes \
77 -keyout /etc/xrdp/key.pem -out /etc/xrdp/cert.pem -days 365 \
78 -subj /C=US/ST=CA/L=Sunnyvale/O=xrdp/CN=www.xrdp.org \
79 -config /etc/ssl/openssl.conf
80 }