summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Aaditya Bagga <aaditya_gnulinux@zoho.com>2014-09-22 10:03:04 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-27 08:48:09 +0700
commitf35358cbe710b3b0fb226a1d168fd7386a5a6e99 (patch)
tree113c4dc7a5e583222bd790c1ba170e2fe9b57f4c
parent4333af2aea9ffcddead587cd796bd5f73d789516 (diff)
downloadslackbuilds-f35358cbe710b3b0fb226a1d168fd7386a5a6e99.tar.gz
slackbuilds-f35358cbe710b3b0fb226a1d168fd7386a5a6e99.tar.xz
system/xfsudo: Updated for vesion 0.5.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
-rw-r--r--system/xfsudo/README1
-rw-r--r--system/xfsudo/README.Slackware15
-rw-r--r--system/xfsudo/doinst.sh14
-rw-r--r--system/xfsudo/slack-desc12
-rw-r--r--system/xfsudo/xfsudo.SlackBuild16
-rw-r--r--system/xfsudo/xfsudo.info8
6 files changed, 51 insertions, 15 deletions
diff --git a/system/xfsudo/README b/system/xfsudo/README
index 1c7e4f0c88..c95a397749 100644
--- a/system/xfsudo/README
+++ b/system/xfsudo/README
@@ -1,5 +1,4 @@
xfsudo - run graphical applications as superuser using sudo
-xfsu - run graphical applications as root using sudo -i
Uses zenity to create the dialog box and sudo as backend to
run the program as root.
diff --git a/system/xfsudo/README.Slackware b/system/xfsudo/README.Slackware
new file mode 100644
index 0000000000..0624bcd0c1
--- /dev/null
+++ b/system/xfsudo/README.Slackware
@@ -0,0 +1,15 @@
+
+1) To create a right click entry in Thunar which will open the current directory with
+root privileges, following custom action (Edit -> Configure custom actions) can be added:
+
+Name: Thunar root
+Description: Open directory with root privileges in Thunar
+Command: xfsudo thunar %d
+
+2) Similarly to create a right click entry which will edit the current file with
+root privileges, following custom action can be added:
+
+Name: Edit as root
+Description: Edit file with root privileges in gvim
+Command: xfsudo gvim %f
+
diff --git a/system/xfsudo/doinst.sh b/system/xfsudo/doinst.sh
new file mode 100644
index 0000000000..de85fd01cc
--- /dev/null
+++ b/system/xfsudo/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/xfsudo.conf.new
diff --git a/system/xfsudo/slack-desc b/system/xfsudo/slack-desc
index a727f2a190..f65dee4696 100644
--- a/system/xfsudo/slack-desc
+++ b/system/xfsudo/slack-desc
@@ -7,13 +7,13 @@
|-----handy-ruler------------------------------------------------------|
xfsudo: xfsudo (run graphical apps as root using sudo)
-xfsudo:
-xfsudo: xfsudo - run graphical applications as superuser using sudo
-xfsudo: xfsu - run graphical applications as root using sudo -i
xfsudo:
-xfsudo: Uses zenity to create the dialog box and sudo as backend to
-xfsudo: run the program as root.
-xfsufo:
+xfsudo: Uses zenity to create the dialog box and sudo
+xfsudo: as backend to run the program as root.
+xfsudo:
xfsudo: URL - https://github.com/aadityabagga/xfsudo
xfsudo:
xfsudo:
+xfsudo:
+xfsudo:
+xfsudo:
diff --git a/system/xfsudo/xfsudo.SlackBuild b/system/xfsudo/xfsudo.SlackBuild
index dbf21b08da..89c8cfc871 100644
--- a/system/xfsudo/xfsudo.SlackBuild
+++ b/system/xfsudo/xfsudo.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=xfsudo
-VERSION=${VERSION:-0.4}
+VERSION=${VERSION:-0.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -37,7 +37,7 @@ fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/$PRGNAM
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
@@ -47,7 +47,7 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
if [ -e $CWD/$VERSION.tar.gz ]; then
- tar xvf $CWD/$VERSION.tar.gz
+ tar xvf $CWD/$VERSION.tar.gz
else
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
fi
@@ -59,13 +59,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make install DESTDIR=$PKG appdir=/usr/doc/$PRGNAM-$VERSION mandir=/usr/man/man1
+make install DESTDIR=$PKG
+
+# Preserve config file
+mv $PKG/etc/xfsudo.conf $PKG/etc/xfsudo.conf.new
+
+# Compress man pages
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/xfsudo/xfsudo.info b/system/xfsudo/xfsudo.info
index 12246d6411..8cfc2da5a4 100644
--- a/system/xfsudo/xfsudo.info
+++ b/system/xfsudo/xfsudo.info
@@ -1,10 +1,10 @@
PRGNAM="xfsudo"
-VERSION="0.4"
+VERSION="0.5"
HOMEPAGE="http://github.com/aadityabagga/xfsudo"
-DOWNLOAD="http://github.com/aadityabagga/xfsudo/archive/0.4.tar.gz"
-MD5SUM="a158f6536f080b8afd4c950b0a50ead8"
+DOWNLOAD="http://github.com/aadityabagga/xfsudo/archive/0.5.tar.gz"
+MD5SUM="99423876d8c94c6b70bd8507f86cf1d4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="zenity"
-MAINTAINER="aaditya"
+MAINTAINER="Aaditya Bagga"
EMAIL="aaditya_gnulinux@zoho.com"