wok annotate xrdp/receipt @ rev 25562

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