Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/xrdp: fixing sbindir issue

From: Alan Lacerda <alancordeiro_at_gmail.com>
Date: Thu, 15 Jan 2015 11:37:53 +0000

---
 .../xrdp/0001-xrdp.sh-fixing-sbindir-issue.patch   | 104 +++++++++++++++++++++
 testing/xrdp/APKBUILD                              |  17 +++-
 2 files changed, 116 insertions(+), 5 deletions(-)
 create mode 100644 testing/xrdp/0001-xrdp.sh-fixing-sbindir-issue.patch
diff --git a/testing/xrdp/0001-xrdp.sh-fixing-sbindir-issue.patch b/testing/xrdp/0001-xrdp.sh-fixing-sbindir-issue.patch
new file mode 100644
index 0000000..ab2f090
--- /dev/null
+++ b/testing/xrdp/0001-xrdp.sh-fixing-sbindir-issue.patch
_at_@ -0,0 +1,104 @@
+From c37323a9035fbab7f6d93f55c250fa08b47ebfd4 Mon Sep 17 00:00:00 2001
+From: Alan Lacerda <alacerda_at_alpinelinux.org>
+Date: Wed, 14 Jan 2015 18:54:38 +0000
+Subject: [PATCH] xrdp.sh: fixing sbindir issue
+
+---
+ instfiles/xrdp.sh | 33 ++++++++++++++-------------------
+ 1 file changed, 14 insertions(+), 19 deletions(-)
+
+diff --git a/instfiles/xrdp.sh b/instfiles/xrdp.sh
+index 3671004..178026f 100755
+--- a/instfiles/xrdp.sh
++++ b/instfiles/xrdp.sh
+_at_@ -5,20 +5,21 @@
+ # chkconfig: 2345 11 89
+ # description: starts xrdp
+ 
+-SBINDIR=/usr/local/sbin
+ LOG=/dev/null
+ CFGDIR=/etc/xrdp
++BIN_XRDP=$(which xrdp)
++BIN_XRDP_SESMAN=$(which xrdp-sesman)
+ 
+-if ! test -x $SBINDIR/xrdp
+-then
++if [ "x"$BIN_XRDP == "x" ]; then
+   echo "xrdp is not executable"
+   exit 0
+ fi
+-if ! test -x $SBINDIR/xrdp-sesman
+-then
++
++if [ "x"$BIN_XRDP_SESMAN == "x" ]; then
+   echo "xrdp-sesman is not executable"
+   exit 0
+ fi
++
+ if ! test -x $CFGDIR/startwm.sh
+ then
+   echo "startwm.sh is not executable"
+_at_@ -28,8 +29,8 @@ fi
+ xrdp_start()
+ {
+   echo -n "Starting: xrdp and sesman . . "
+-  $SBINDIR/xrdp >> $LOG
+-  $SBINDIR/xrdp-sesman >> $LOG
++  $BIN_XRDP >> $LOG
++  $BIN_XRDP_SESMAN >> $LOG
+   echo "."
+   sleep 1
+   return 0;
+_at_@ -38,15 +39,15 @@ xrdp_start()
+ xrdp_stop()
+ {
+   echo -n "Stopping: xrdp and sesman . . "
+-  $SBINDIR/xrdp-sesman --kill >> $LOG
+-  $SBINDIR/xrdp --kill >> $LOG
++  $BIN_XRDP_SESMAN --kill >> $LOG
++  $BIN_XRDP --kill >> $LOG
+   echo "."
+   return 0;
+ }
+ 
+ is_xrdp_running()
+ {
+-  ps u --noheading -C xrdp | grep -q -i xrdp
++  ps u -C xrdp | grep -q -i xrdp
+   if test $? -eq 0
+   then
+     return 1;
+_at_@ -57,7 +58,7 @@ is_xrdp_running()
+ 
+ is_sesman_running()
+ {
+-  ps u --noheading -C xrdp-sesman | grep -q -i xrdp-sesman
++  ps u -C xrdp-sesman | grep -q -i xrdp-sesman
+   if test $? -eq 0
+   then
+     return 1;
+_at_@ -72,19 +73,13 @@ check_up()
+   is_sesman_running
+   if test $? -eq 0
+   then
+-    if test -e /var/run/xrdp-sesman.pid
+-    then
+-      rm /var/run/xrdp-sesman.pid
+-    fi
++    find /var/run -name xrdp-sesman.pid -exec rm {} \;
+   fi
+   # Cleanup : If xrdp isn't running, but the pid exists, erase it.
+   is_xrdp_running
+   if test $? -eq 0
+   then
+-    if test -e /var/run/xrdp.pid
+-    then
+-      rm /var/run/xrdp.pid
+-    fi
++    find /var/run -name xrdp-sesman.pid -exec rm {} \;
+   fi
+   return 0;
+ }
+-- 
+2.2.1
+
diff --git a/testing/xrdp/APKBUILD b/testing/xrdp/APKBUILD
index df2d921..c6b6044 100644
--- a/testing/xrdp/APKBUILD
+++ b/testing/xrdp/APKBUILD
_at_@ -2,7 +2,7 @@
 # Maintainer:
 pkgname=xrdp
 pkgver=0.6.1
-pkgrel=0
+pkgrel=1
 pkgdesc="An open source RDP server"
 url="http://sourceforge.net/projects/xrdp/"
 arch="all"
_at_@ -13,7 +13,8 @@ makedepends="$depends_dev autoconf automake libtool openssl-dev libx11-dev
 	libxfixes-dev"
 install=""
 subpackages="$pkgname-doc"
-source="http://ufpr.dl.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-v$pkgver.tar.gz"
+source="http://ufpr.dl.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-v$pkgver.tar.gz
+	0001-xrdp.sh-fixing-sbindir-issue.patch"
 
 _builddir="$srcdir/$pkgname-v$pkgver"
 prepare() {
_at_@ -33,6 +34,8 @@ build() {
 	./configure \
 		--prefix=/usr \
 		--disable-static \
+		--sysconfdir=/etc \
+		--sbindir=/sbin \
 		--enable-nopam \
 		|| return 1
 	make \
_at_@ -41,10 +44,14 @@ build() {
 
 package() {
 	cd "$_builddir"
+	mksir -p "${pkgdir}"/usr/var/run
 	make DESTDIR="${pkgdir}" install || return 1
 	find "$pkgdir" -name \*.la -delete
 }
 
-md5sums="26099c6588943262023607c1b4e774d8  xrdp-v0.6.1.tar.gz"
-sha256sums="6880003b26799e4154a9486f671b6fc1b0487de0da2289573f46c090146e5a3b  xrdp-v0.6.1.tar.gz"
-sha512sums="d2aa5c300ed4c5e84137776f3d5f63736a8d674ef3a96eda271fd6d80ecc394a1148dd9d09b3acf3916c774fd15fe7400271ffb034a45ddae6b34ea30fb2465c  xrdp-v0.6.1.tar.gz"
+md5sums="26099c6588943262023607c1b4e774d8  xrdp-v0.6.1.tar.gz
+d49d4ecde7d8007fb0870955b9073af9  0001-xrdp.sh-fixing-sbindir-issue.patch"
+sha256sums="6880003b26799e4154a9486f671b6fc1b0487de0da2289573f46c090146e5a3b  xrdp-v0.6.1.tar.gz
+b815667485bc43963f744a3e1586d153057673ecdd85f35e32a62f828782482d  0001-xrdp.sh-fixing-sbindir-issue.patch"
+sha512sums="d2aa5c300ed4c5e84137776f3d5f63736a8d674ef3a96eda271fd6d80ecc394a1148dd9d09b3acf3916c774fd15fe7400271ffb034a45ddae6b34ea30fb2465c  xrdp-v0.6.1.tar.gz
+366c8d2c05819fb93d79a9d79fa90443b2d17afe3a7dc008cc033a0af5d166038da2f1f2d74669b18a689195155f51d68ce29e7051b60c7e948b8a559de4f266  0001-xrdp.sh-fixing-sbindir-issue.patch"
-- 
2.2.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Jan 15 2015 - 11:37:53 GMT