From 9239b6e87ded6af7aafa4c82e270ba130f830620 Mon Sep 17 00:00:00 2001 From: Gustavo Homem Date: Wed, 20 Mar 2013 21:13:44 +0000 Subject: [PATCH] prepare to package X11rdp on a single .deb --- xorg/debuild/debX11rdp.sh | 24 +++++++++++++++++++++++ xorg/debuild/x11rdp-files/DEBIAN/control | 7 +++++++ xorg/debuild/x11rdp-files/DEBIAN/postinst | 18 +++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100755 xorg/debuild/debX11rdp.sh create mode 100644 xorg/debuild/x11rdp-files/DEBIAN/control create mode 100755 xorg/debuild/x11rdp-files/DEBIAN/postinst diff --git a/xorg/debuild/debX11rdp.sh b/xorg/debuild/debX11rdp.sh new file mode 100755 index 00000000..3e713926 --- /dev/null +++ b/xorg/debuild/debX11rdp.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# receives version, release number and source directory as arguments + +VERSION=$1 +RELEASE=$2 +SRCDIR=$3 +PKGDEST=$4 + +PACKDIR=x11rdp-files +DESTDIR=$PACKDIR/opt +NAME=x11rdp + +sed -i -e "s/DUMMYVERINFO/$VERSION-$RELEASE/" $PACKDIR/DEBIAN/control +sed -i -e "s/DUMMYDIRINFO/$SRCDIR/" $PACKDIR/DEBIAN/postinst + +mkdir -p $DESTDIR +cp -Rf $SRCDIR $DESTDIR +dpkg-deb --build $PACKDIR $PKGDEST/${NAME}_$VERSION-$RELEASE.deb + +# revert to initial state +rm -rf $DESTDIR +sed -i -e "s/$VERSION-$RELEASE/DUMMYVERINFO/" $PACKDIR/DEBIAN/control +sed -i -e "s/$SRCDIR/DUMMYDIRINFO/" $PACKDIR/DEBIAN/postinst diff --git a/xorg/debuild/x11rdp-files/DEBIAN/control b/xorg/debuild/x11rdp-files/DEBIAN/control new file mode 100644 index 00000000..59a3f94d --- /dev/null +++ b/xorg/debuild/x11rdp-files/DEBIAN/control @@ -0,0 +1,7 @@ +Package: x11rdp +Version: DUMMYVERINFO +Section: unknown +Priority: optional +Architecture: all +Maintainer: Angulo Solido +Description: X11rdp backend for the xrdp remote access server diff --git a/xorg/debuild/x11rdp-files/DEBIAN/postinst b/xorg/debuild/x11rdp-files/DEBIAN/postinst new file mode 100755 index 00000000..b44dc212 --- /dev/null +++ b/xorg/debuild/x11rdp-files/DEBIAN/postinst @@ -0,0 +1,18 @@ +#!/bin/bash + +X11DIR=/opt/X11rdp + +# make the /usr/bin/X11rdp symbolic link if it doesn't exist... +if [ ! -e /usr/bin/X11rdp ] +then + if [ -e $X11DIR/bin/X11rdp ] + then + ln -s $X11DIR/bin/X11rdp /usr/bin/X11rdp + else + clear + echo "There was a problem... the $X11DIR/bin/X11rdp binary could not be found. Did the compilation complete?" + echo "Stopped. Please investigate what went wrong." + exit + fi +fi +