summaryrefslogtreecommitdiffstats
path: root/xorg
diff options
context:
space:
mode:
authorGustavo Homem <gustavo@angulosolido.pt>2013-03-20 21:13:44 +0000
committerGustavo Homem <gustavo@angulosolido.pt>2013-03-20 21:13:44 +0000
commit9239b6e87ded6af7aafa4c82e270ba130f830620 (patch)
tree32888cb50c6d62fb72ab94183fea8930511a6139 /xorg
parentfbe1e2ab74189ad0bbf94ec715b36270f7c37b20 (diff)
downloadxrdp-proprietary-9239b6e87ded6af7aafa4c82e270ba130f830620.tar.gz
xrdp-proprietary-9239b6e87ded6af7aafa4c82e270ba130f830620.zip
prepare to package X11rdp on a single .deb
Diffstat (limited to 'xorg')
-rwxr-xr-xxorg/debuild/debX11rdp.sh24
-rw-r--r--xorg/debuild/x11rdp-files/DEBIAN/control7
-rwxr-xr-xxorg/debuild/x11rdp-files/DEBIAN/postinst18
3 files changed, 49 insertions, 0 deletions
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 <packaging@angulosolido.pt>
+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
+