summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBalló György2020-03-16 00:48:07 +0100
committerBalló György2020-03-16 00:48:07 +0100
commit7f5e33c50dd6f29ad262564be3649108f86b133c (patch)
tree95cffc2f656afde3783ef2b013d08dd24128c8ad
downloadaur-7f5e33c50dd6f29ad262564be3649108f86b133c.tar.gz
Move from [community]
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD37
-rw-r--r--pkexec.patch49
3 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5bd8fa01646
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = pyneighborhood
+ pkgdesc = A GTK+ 2 rewrite of the well-known LinNeighborhood tool
+ pkgver = 0.5.4
+ pkgrel = 4
+ url = https://launchpad.net/pyneighborhood
+ arch = any
+ license = GPL
+ depends = pygtk
+ depends = smbclient
+ optdepends = polkit: mount/unmount Samba shares
+ options = !emptydirs
+ source = https://launchpad.net/pyneighborhood/0.5/0.5.4/+download/pyneighborhood-0.5.4.tar.bz2
+ source = https://launchpad.net/pyneighborhood/0.5/0.5.4/+download/pyneighborhood-0.5.4.tar.bz2.asc
+ source = pkexec.patch
+ validpgpkeys = E188933BBC00723A9DB00CD31398E68B6F33567E
+ sha1sums = b0d899230ed0212aa50c17f406b0ee7e3d6ac17a
+ sha1sums = SKIP
+ sha1sums = c23d054b2309fcc012f98e7274e6fd2e09d2f9a6
+
+pkgname = pyneighborhood
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d5667eea6c2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Ronald van Haren <ronald.archlinux.org>
+
+pkgname=pyneighborhood
+pkgver=0.5.4
+pkgrel=4
+pkgdesc="A GTK+ 2 rewrite of the well-known LinNeighborhood tool"
+license=('GPL')
+url="https://launchpad.net/pyneighborhood"
+source=("https://launchpad.net/pyneighborhood/0.5/${pkgver}/+download/${pkgname}-${pkgver}.tar.bz2"{,.asc}
+ "pkexec.patch")
+depends=('pygtk' 'smbclient')
+optdepends=('polkit: mount/unmount Samba shares')
+arch=('any')
+options=('!emptydirs')
+sha1sums=('b0d899230ed0212aa50c17f406b0ee7e3d6ac17a'
+ 'SKIP'
+ 'c23d054b2309fcc012f98e7274e6fd2e09d2f9a6')
+validpgpkeys=('E188933BBC00723A9DB00CD31398E68B6F33567E') # Stefan J. Betz <info@stefan-betz.net>
+
+prepare() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # python2 fix
+ for file in $(find . -type f -print); do
+ sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
+ sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
+ done
+
+ # Use pkexec to mount/unmount Samba shares
+ patch -Np1 -i ../pkexec.patch
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make PYTHON=python2 DESTDIR=${pkgdir}/usr install
+}
diff --git a/pkexec.patch b/pkexec.patch
new file mode 100644
index 00000000000..04c71c98b3f
--- /dev/null
+++ b/pkexec.patch
@@ -0,0 +1,49 @@
+diff -Naur pyneighborhood-0.5.4.orig/pyneighborhood/__init__.py pyneighborhood-0.5.4/pyneighborhood/__init__.py
+--- pyneighborhood-0.5.4.orig/pyneighborhood/__init__.py 2011-03-22 20:51:25.000000000 +0100
++++ pyneighborhood-0.5.4/pyneighborhood/__init__.py 2018-04-12 07:59:06.447097940 +0200
+@@ -40,7 +40,7 @@
+ loglevel = 0
+ mount_directory =
+ password =
+-sudo = /usr/bin/gksu
++sudo = /usr/bin/pkexec --disable-internal-agent
+ username =
+ hidden_shares = False
+ [CIFS]
+@@ -108,20 +108,9 @@
+ config.set('CIFS',utility,'/bin/%s' % ('mount' if utility == 'mount' else 'umount'))
+ push_notification(_("Using %(util)s for future operations.\n") % { "util": config.get('CIFS',utility) }, level=1)
+
+-sudo_defaults = { "gnome": "/usr/bin/gksu",
+- "kde": "/usr/bin/kdesudo",
+- "lxde": "/usr/bin/gksu",
+- "xfce": "/usr/bin/gksu",
+- "default": "/usr/bin/gksu" }
+-
+ if not access( config.get("Main", "sudo"), F_OK | X_OK):
+ push_notification(_("%(sudo)s isn't accessable... trying to determine correct sudo wrapper...\n") % { "sudo": config.get("Main", "sudo") }, level=2)
+- if get_desktop_environ() in sudo_defaults.keys():
+- push_notification(_("Detected %(de)s desktop environment... falling back to %(wrapper)s as sudo wrapper...\n") % { "de": get_desktop_environ(), "wrapper": sudo_defaults[get_desktop_environ()] } )
+- config.set("Main", "sudo", sudo_defaults[get_desktop_environ()])
+- else:
+- push_notification(_("Couldn't get valid sudo wrapper for detected desktop environment %(de)s, falling back to default %(default)s...\n") % { "de": get_desktop_environ(), "default": sudo_defaults["default"]}, level=2)
+- config.set("Main", "sudo", sudo_defaults["default"])
++ config.set("Main", "sudo", "/usr/bin/pkexec --disable-internal-agent")
+
+ fileman_defaults = { "gnome": "/usr/bin/nautilus",
+ "kde": "/usr/bin/dolphin",
+diff -Naur pyneighborhood-0.5.4.orig/pyneighborhood/mountwindow.py pyneighborhood-0.5.4/pyneighborhood/mountwindow.py
+--- pyneighborhood-0.5.4.orig/pyneighborhood/mountwindow.py 2011-03-22 20:51:25.000000000 +0100
++++ pyneighborhood-0.5.4/pyneighborhood/mountwindow.py 2018-04-12 07:22:04.351628369 +0200
+@@ -145,10 +145,7 @@
+ options = []
+ command = []
+ if config.get("Main", "enable_sudo") == "True":
+- for item in config.get("Main", "sudo").split(" "):
+- command.append(item)
+- del item
+- command.append("--")
++ command.append(config.get("Main", "sudo"))
+ command.append(config.get("CIFS", "mount"))
+ if len(config.get("CIFS", "options")) > 0:
+ options.append(config.get("CIFS", "options"))