summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD13
-rw-r--r--fix_package_querying.patch13
-rwxr-xr-x[-rw-r--r--]ucloner.desktop21
-rw-r--r--ucloner.sh6
5 files changed, 52 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 316c4336c70..ed966c81dd2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,17 +9,23 @@ pkgbase = ucloner
depends = vte
depends = squashfs-tools
depends = zenity
- depends = gksu
+ optdepends = jfsutils
+ optdepends = reiserfsprogs
+ optdepends = xfsprogs
+ optdepends = gksu
+ optdepends = kdesu
source = https://ucloner.googlecode.com/files/UCloner-10.10.2-beta1.tar.gz
source = ucloner.sh
source = ucloner.desktop
source = ucloner.png
source = modify_path.patch
+ source = fix_package_querying.patch
md5sums = b7bf49a5516cb9e00943e06e3e73adf2
- md5sums = d5143c3b0431044beb13f933a3d76ceb
- md5sums = 5ffe4317c280d220416e24317d0f6198
+ md5sums = d0cf77f94dea916577f41952221fafa3
+ md5sums = 45bb2de134f1caa4d0f19d975d5274f4
md5sums = 1f913fe9ca34481134bc36e1045e9a20
md5sums = 3e6d3d3005380a888b7a97d2b79880cf
+ md5sums = c84c4aaba3bf5c7fbb6126190cb341ca
pkgname = ucloner
diff --git a/PKGBUILD b/PKGBUILD
index 3b68278fcc8..301f868b89b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,27 +6,32 @@ pkgdesc="Ucloner"
arch=('any')
url="https://code.google.com/p/ucloner"
license=('GPL')
-depends=('python2' 'vte' 'squashfs-tools' 'zenity' 'gksu')
+depends=('python2' 'vte' 'squashfs-tools' 'zenity')
+optdepends=('jfsutils' 'reiserfsprogs' 'xfsprogs' 'gksu' 'kdesu')
source=(
'https://ucloner.googlecode.com/files/UCloner-10.10.2-beta1.tar.gz'
'ucloner.sh'
'ucloner.desktop'
'ucloner.png'
'modify_path.patch'
+ 'fix_package_querying.patch'
)
md5sums=('b7bf49a5516cb9e00943e06e3e73adf2'
- 'd5143c3b0431044beb13f933a3d76ceb'
- '5ffe4317c280d220416e24317d0f6198'
+ 'd0cf77f94dea916577f41952221fafa3'
+ '45bb2de134f1caa4d0f19d975d5274f4'
'1f913fe9ca34481134bc36e1045e9a20'
- '3e6d3d3005380a888b7a97d2b79880cf')
+ '3e6d3d3005380a888b7a97d2b79880cf'
+ 'c84c4aaba3bf5c7fbb6126190cb341ca')
prepare() {
cd "${srcdir}/UCloner-$pkgver-$rev"
patch -p1 < "${srcdir}/modify_path.patch"
+ patch -p1 < "${srcdir}/fix_package_querying.patch"
cd program
rm *.pyc
+ find -name '*.py' | xargs sed -i 's|#!/usr/bin/python$|#!/usr/bin/env python2|'
python2 -m compileall .
}
diff --git a/fix_package_querying.patch b/fix_package_querying.patch
new file mode 100644
index 00000000000..7564929c851
--- /dev/null
+++ b/fix_package_querying.patch
@@ -0,0 +1,13 @@
+diff -Naur a/program/functions.py b/program/functions.py
+--- a/program/functions.py 2010-12-04 17:18:57.000000000 +0000
++++ b/program/functions.py 2015-10-13 09:34:01.093513450 +0000
+@@ -57,7 +57,7 @@
+- a = commands.getoutput( 'dpkg -l' )
++ a = commands.getoutput( 'pacman -Q' )
+ a = a.split( '\n' )
+ for each in a:
+- if each[0:2] == 'ii' and each.split()[1] == pkg_name:
++ if each.split()[0] == pkg_name:
+ return True
+
+ return False
diff --git a/ucloner.desktop b/ucloner.desktop
index 950e0dd22dd..c292e87e899 100644..100755
--- a/ucloner.desktop
+++ b/ucloner.desktop
@@ -1,9 +1,20 @@
[Desktop Entry]
-Name=UCloner
-Comment=Linux System Backup Utility
+Categories=Utility;
Comment[zh_CN]=Linux系统备份工具
-Exec=gksu ucloner %F
+Comment=Linux系统备份工具
+Exec=ucloner
+GenericName[zh_CN]=
+GenericName=
Icon=ucloner.png
-Type=Application
-Categories=Utility;
+MimeType=
+Name[zh_CN]=UCloner
+Name=UCloner
+Path=
+StartupNotify=true
Terminal=false
+TerminalOptions=
+Type=Application
+X-DBUS-ServiceName=
+X-DBUS-StartupType=
+X-KDE-SubstituteUID=false
+X-KDE-Username=
diff --git a/ucloner.sh b/ucloner.sh
index 685d3e6e0ef..cfda628e0cf 100644
--- a/ucloner.sh
+++ b/ucloner.sh
@@ -1,10 +1,14 @@
#!/bin/sh
export LANGUAGE=`echo $LANG | grep -oP [A-Za-z_]+ | head -1`
+which sudo 2>&1 > /dev/null && SUPER=sudo
+which gksu 2>&1 > /dev/null && SUPER=gksu
+which kdesu 2>&1 > /dev/null && SUPER=kdesu
+
if [ "$( ps -A | grep ucloner_gui)" ] ; then
zenity --title="Error" --error --text="Another uclone instance is running!"
exit 1
fi
cd /opt/ucloner/
-exec python2 ./ucloner_gui.py &> /dev/null \ No newline at end of file
+exec $SUPER python2 ./ucloner_gui.py \ No newline at end of file