[beesu/f19] Add fixes to nautilus scripts for better compatibility with GNOME 3.8. Added newly-forked Nemo scrip

Tom Callaway spot at fedoraproject.org
Tue Jul 2 15:59:22 UTC 2013


commit c2a6fd909cb4c940eb8b204b6790f11b4b7c081e
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Tue Jul 2 11:58:47 2013 -0400

    Add fixes to nautilus scripts for better compatibility with GNOME 3.8. Added newly-forked Nemo scripts package to distribution.

 beesu-nautilus-scripts-fixes.patch |   88 ++++++++++++++++++++++++++++++++++++
 beesu.spec                         |   59 +++++++++++++++++++++++-
 sources                            |    1 +
 3 files changed, 146 insertions(+), 2 deletions(-)
---
diff --git a/beesu-nautilus-scripts-fixes.patch b/beesu-nautilus-scripts-fixes.patch
new file mode 100644
index 0000000..cebb939
--- /dev/null
+++ b/beesu-nautilus-scripts-fixes.patch
@@ -0,0 +1,88 @@
+--- beesu-2.7/nautilus-beesu-manager-1.7/nautilus-beesu-manager.scripts-fixes	2013-07-02 11:10:03.532207904 -0400
++++ beesu-2.7/nautilus-beesu-manager-1.7/nautilus-beesu-manager	2013-07-02 11:10:21.025207278 -0400
+@@ -9,7 +9,7 @@ then
+     exit
+ fi
+ 
+-export BEESU_BASE_SCRIPT_FOLDER="$HOME/.gnome2/nautilus-scripts/beesu"
++export BEESU_BASE_SCRIPT_FOLDER="$HOME/.local/share/nautilus/scripts/beesu"
+ 
+ echo -ne "BASE_SCRIPT_FOLDER=$BEESU_BASE_SCRIPT_FOLDER\n"
+ 
+--- beesu-2.7/nautilus-beesu-manager-1.7/libexec/local-launcher.scripts-fixes	2013-07-02 11:10:40.716206575 -0400
++++ beesu-2.7/nautilus-beesu-manager-1.7/libexec/local-launcher	2013-07-02 11:11:32.384204728 -0400
+@@ -51,7 +51,7 @@ then
+     fi
+ else
+     beesu_display_error "The script \"$BEESU_SCRIPT_NAME\" at \"$beesu_script_path\" is not installed in this system."
+-    src="$HOME/.gnome2/nautilus-scripts/beesu/$BEESU_SCRIPT_NAME"
++    src="$HOME/.local/share/nautilus/scripts/beesu/$BEESU_SCRIPT_NAME"
+     if [ -x "$src" ]
+     then
+         if [ -x "$exe_zenity" ]
+@@ -60,7 +60,7 @@ else
+             if [ "$?" -ne "1" ]
+             then
+                 rm -v -f "$src"
+-                find "$HOME/.gnome2/nautilus-scripts/beesu/" -type d -print0 | xargs -0 rmdir --ignore-fail-on-non-empty
++                find "$HOME/.local/share/nautilus/scripts/beesu/" -type d -print0 | xargs -0 rmdir --ignore-fail-on-non-empty
+                 beesu_display_info "Launcher script \"$src\" uninstalled."
+             fi
+         fi
+--- "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Execute/Execute Script.scripts-fixes"	2013-07-02 11:11:49.006204134 -0400
++++ "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Execute/Execute Script"	2013-07-02 11:12:19.219203054 -0400
+@@ -8,7 +8,9 @@ then
+         quoted=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | 
+                  head -n 1 |
+                  awk 'BEGIN { FS = "\n" } { printf "\"%s\"", $1 }' | sed -e s#\"\"##)
+-        beesu - gnome-terminal --working-directory="$base" -e "$quoted"
++        # beesu - gnome-terminal --working-directory="$base" -e "$quoted"
++        # We now have to place beesu at the end because gnome-terminal throws dbus errors and fails otherwise.
++        gnome-terminal --working-directory="$base" -e "beesu '$quoted'"
+     else
+         zenity --info --title="Execute Script" --text="I won't run more than one script at once."
+     fi
+--- "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Edit with gHex.scripts-fixes"	2013-07-02 11:13:11.616201181 -0400
++++ "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Edit with gHex"	2013-07-02 11:13:22.123200805 -0400
+@@ -4,7 +4,7 @@ if [[ -n "$NAUTILUS_SCRIPT_SELECTED_FILE
+ then
+     quoted=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | 
+              awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##)
+-    beesu - ghex2 "$quoted"
++    beesu - ghex "$quoted"
+ fi
+ # F12
+ /bin/true
+--- "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/GNOME Shell Open.scripts-fixes"	2013-07-02 11:13:40.075200163 -0400
++++ "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/GNOME Shell Open"	2013-07-02 11:13:50.828199779 -0400
+@@ -3,7 +3,7 @@ if [[ -n "$NAUTILUS_SCRIPT_SELECTED_FILE
+ then
+     quoted=$(echo -e "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | 
+              awk 'BEGIN { FS = "\n" } { printf "\"%s\" ", $1 }' | sed -e s#\"\"##)
+-    beesu - gnome-open "$quoted"
++    beesu - xdg-open "$quoted"
+ fi
+ # F12
+ /bin/true
+--- "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Open Nautilus Here.scripts-fixes"	2013-07-02 11:14:04.847199278 -0400
++++ "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Open Nautilus Here"	2013-07-02 11:14:17.931198810 -0400
+@@ -6,6 +6,6 @@ else
+      while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done
+      dir="$base/$1"
+ fi
+-beesu - nautilus "$dir"
++beesu - nautilus "'$dir'"
+ # F12
+ /bin/true
+--- "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Open Terminal Here.scripts-fixes"	2013-07-02 11:14:26.381198508 -0400
++++ "beesu-2.7/nautilus-beesu-manager-1.7/libexec/scripts/Open Terminal Here"	2013-07-02 11:15:16.095196731 -0400
+@@ -7,6 +7,8 @@ else
+      while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done
+      dir="$base/$1"
+ fi
+-beesu - gnome-terminal --working-directory="$dir"
++# beesu - gnome-terminal --working-directory="$dir"
++# We now have to place beesu at the end because gnome-terminal throws dbus errors and fails otherwise.
++gnome-terminal --working-directory="$dir" -e 'beesu sudo -s'
+ # F12
+ /bin/true
diff --git a/beesu.spec b/beesu.spec
index 7a40471..ac77b49 100644
--- a/beesu.spec
+++ b/beesu.spec
@@ -5,7 +5,7 @@ Name: beesu
 Version: 2.7
 # Don't ever decrease this version (unless all beesu, nbm, and gbp update) or the subpackages will go backwards.
 # It is easier to do this than to track a separate release field.
-Release: 10%{?dist}
+Release: 11%{?dist}
 Summary: Graphical wrapper for su
 URL: http://www.honeybeenet.altervista.org
 Group: Applications/System
@@ -13,9 +13,11 @@ License: GPLv2+
 Source0: http://honeybeenet.altervista.org/beesu/files/beesu-sources/%{name}-%{version}.tar.bz2
 Source1: http://honeybeenet.altervista.org/beesu/files/beesu-manager/nautilus-beesu-manager-%{nbmversion}.tar.bz2
 Source2: http://honeybeenet.altervista.org/beesu/files/beesu-gedit/gedit-beesu-plugin-%{geditver}.tar.bz2
+Source3: nemo-beesu-manager-%{nbmversion}.tar.bz2
 Patch0:  beesu-gedit-plugin-fix.patch
 Patch1:  beesu-nautilus-no-browser.patch
 Patch2:  beesu-gedit-plugin-more-fixes.patch
+Patch3:  beesu-nautilus-scripts-fixes.patch
 BuildRequires: desktop-file-utils
 Requires: pam, usermode
 
@@ -47,12 +49,26 @@ files as root (via beesu). After installation, to activate the plugin in
 gedit, go to Edit -> Preferences -> Plugins and check the box next to
 Open as root.
 
+%package -n nemo-beesu-manager
+Version:	%{nbmversion}
+BuildArch:	noarch
+Requires:	beesu, zenity, nemo
+Group:		User Interface/Desktops
+Summary:	Utility to add beesu scripts to nemo
+
+%description -n nemo-beesu-manager
+nemo-beesu-manager is a little utility to add some useful scripts
+to the Nemo file browser; nemo-beesu-manager can add scripts
+to Nemo using beesu to elevate the user's privileges to root.
+
 %prep
-%setup -q -a1 -a2
+%setup -q -a1 -a2 -a3
 %patch0 -p1 -b .fix
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 chmod -x nautilus-beesu-manager-%{nbmversion}/COPYING nautilus-beesu-manager-%{nbmversion}/README
+chmod -x nemo-beesu-manager-%{nbmversion}/COPYING nemo-beesu-manager-%{nbmversion}/README
 
 %build
 make CFLAGS="%{optflags} -fno-delete-null-pointer-checks"
@@ -84,10 +100,25 @@ pushd gedit-beesu-plugin-%{geditver}
 make install
 popd
 
+#nemo
+pushd nemo-beesu-manager-%{nbmversion}
+install -p -m 755 nemo-beesu-manager %{buildroot}%{_bindir}
+install -p -m 644 nemo-beesu-manager.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
+desktop-file-install --dir %{buildroot}%{_datadir}/applications --mode 0644 nemo-beesu-manager.desktop
+mkdir -v -p %{buildroot}%{_libexecdir}/nemo-beesu-manager/
+install -p -m 755 libexec/api %{buildroot}%{_libexecdir}/nemo-beesu-manager/
+cp -a libexec/scripts %{buildroot}%{_libexecdir}/nemo-beesu-manager/
+install -p -m 644 libexec/local-launcher %{buildroot}%{_libexecdir}/nemo-beesu-manager/ 
+popd
+
 %post -n nautilus-beesu-manager
 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 update-desktop-database &> /dev/null ||:
 
+%post -n nemo-beesu-manager
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+update-desktop-database &> /dev/null ||:
+
 %postun -n nautilus-beesu-manager
 if [ $1 -eq 0 ] ; then
     touch --no-create %{_datadir}/icons/hicolor &>/dev/null
@@ -97,11 +128,24 @@ if [ $1 -eq 0 ] ; then
 fi
 update-desktop-database &>/dev/null || :
 
+%postun -n nemo-beesu-manager
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+	gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+    fi
+fi
+update-desktop-database &>/dev/null || :
+
 %posttrans -n nautilus-beesu-manager
 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
     gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
+%posttrans -n nemo-beesu-manager
+if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
 
 %files
 %doc COPYING README
@@ -126,7 +170,18 @@ fi
 %{_libdir}/gedit/plugins/beesu/beesu.py*
 %{_libexecdir}/gedit-beesu-plugin
 
+%files -n nemo-beesu-manager
+%doc nemo-beesu-manager-%{nbmversion}/COPYING nemo-beesu-manager-%{nbmversion}/README
+%{_bindir}/nemo-beesu-manager
+%{_datadir}/applications/*.desktop
+%{_datadir}/icons/hicolor/32x32/apps/nemo-beesu-manager.png 
+%{_libexecdir}/nemo-beesu-manager/
+
 %changelog
+* Sat Jun 29 2013 D. Charles Pyle <dcharlespyle at msn.com> - 2.7-11
+- Add fixes to nautilus scripts for better compatibility with GNOME 3.8.
+- Added newly-forked Nemo scripts package to distribution.
+
 * Tue Jun 25 2013 Tom Callaway <spot at fedoraproject.org> - 2.7-10
 - add fixes for gedit 3.8 from D. Charles Pyle <dcharlespyle at msn.com>
 
diff --git a/sources b/sources
index 0a5982c..44345c4 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,4 @@
 16565dad8da22ef134835714e1f62399  beesu-2.7.tar.bz2
 6422b0659740b0a6faff58d26424f4e3  nautilus-beesu-manager-1.7.tar.bz2
 bc0a247b300b1888f29c65266af9a435  gedit-beesu-plugin-0.4.tar.bz2
+fc6a90ed25a6f0c8d6347d7038ba7f38  nemo-beesu-manager-1.7.tar.bz2


More information about the scm-commits mailing list