summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO25
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD46
-rw-r--r--kde-statusicon.patch44
4 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f5e73fbf11cc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = syncthing-gtk-python3
+ pkgdesc = GTK3 based GUI and notification area icon for Syncthing. Python 3 port with Debian sources.
+ pkgver = 0.9.4.4
+ pkgrel = 2
+ epoch = 1
+ url = https://salsa.debian.org/debian/syncthing-gtk
+ arch = any
+ license = GPL2
+ makedepends = python-setuptools
+ depends = syncthing>=0.14.50
+ depends = gtk3
+ depends = libnotify
+ depends = python-bcrypt
+ depends = python-cairo
+ depends = python-dateutil
+ depends = python-gobject
+ conflicts = syncthing-gtk
+ replaces = syncthing-gtk
+ source = git+https://salsa.debian.org/debian/syncthing-gtk.git#tag=debian/0.9.4.4+ds+git20200927+d09a2ef-3
+ source = kde-statusicon.patch
+ sha256sums = SKIP
+ sha256sums = 109d8c970045e60251fc64865f05322b23a0995ee6725be02905941cb3a1ae0d
+
+pkgname = syncthing-gtk-python3
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7baf6caf2f00
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+*.pkg*
+/syncthing-gtk/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bbc6efdb61b6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Salamandar <felix@piedallu.me>
+# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
+# Contributor: Martin Wimpress <code@flexion.org>
+# Contributor: kozec <kozec at kozec dot com>
+
+_pkgname=syncthing-gtk
+pkgname=syncthing-gtk-python3
+pkgver=0.9.4.4
+pkgrel=2
+epoch=1
+pkgdesc='GTK3 based GUI and notification area icon for Syncthing. Python 3 port with Debian sources.'
+arch=('any')
+url='https://salsa.debian.org/debian/syncthing-gtk'
+license=('GPL2')
+conflicts=( 'syncthing-gtk' )
+replaces=( 'syncthing-gtk' )
+depends=(
+ 'syncthing>=0.14.50' 'gtk3' 'libnotify'
+ 'python-bcrypt' 'python-cairo' 'python-dateutil' 'python-gobject'
+)
+makedepends=('python-setuptools')
+source=(
+ "git+${url}.git#tag=debian/0.9.4.4+ds+git20200927+d09a2ef-3"
+ # $pkgname-$pkgver.tar.gz::https://github.com/syncthing/$pkgname/archive/v$pkgver.tar.gz
+ kde-statusicon.patch
+)
+sha256sums=(
+ 'SKIP'
+ '109d8c970045e60251fc64865f05322b23a0995ee6725be02905941cb3a1ae0d'
+)
+
+prepare() {
+ cd "$_pkgname"
+ # Enable Gtk.StatusIcon in KDE
+ patch -Np1 -i ../kde-statusicon.patch
+}
+
+build() {
+ cd "$_pkgname"
+ python3 setup.py build
+}
+
+package() {
+ cd "$_pkgname"
+ python3 setup.py install --root="$pkgdir" --optimize=1
+}
diff --git a/kde-statusicon.patch b/kde-statusicon.patch
new file mode 100644
index 000000000000..cd736324bd7a
--- /dev/null
+++ b/kde-statusicon.patch
@@ -0,0 +1,44 @@
+From be3d197db4c7f7b06c88fa7457f27bb7741cd016 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
+Date: Fri, 26 Jan 2018 19:18:34 +0100
+Subject: [PATCH] Enable Gtk.StatusIcon in KDE
+
+---
+ syncthing_gtk/statusicon.py | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/syncthing_gtk/statusicon.py b/syncthing_gtk/statusicon.py
+index 5f19ee9..b4f7d10 100644
+--- a/syncthing_gtk/statusicon.py
++++ b/syncthing_gtk/statusicon.py
+@@ -26,7 +26,7 @@
+ # StatusIconKDE4 | excellent | usable³ | very good⁵ | usable³ | usable³ | excellent | excellent |
+ # StatusIconQt5 | very good (KF5) | - | - | - | - | - | - |
+ # StatusIconAppI | good² | none | excellent | none | none | excellent | good² |
+-# StatusIconGTK3 | none | excellent | none | very good¹ | very good¹ | none | good⁴ |
++# StatusIconGTK3 | good | excellent | none | very good¹ | very good¹ | none | good⁴ |
+ #
+ # Notes:
+ # - StatusIconQt5:
+@@ -211,12 +211,6 @@ def __init__(self, *args, **kwargs):
+ # Unity fakes SysTray support but actually hides all icons...
+ raise NotImplementedError
+
+- if IS_KDE:
+- # While the GTK backend works fine on KDE 4, the StatusIconKDE4 backend will achieve better
+- # results and should be available on any standard KDE 4 installation
+- # (since several KDE applications depend on it)
+- raise NotImplementedError
+-
+ self._tray = Gtk.StatusIcon()
+
+ self._tray.connect("activate", self._on_click)
+@@ -246,7 +240,7 @@ def _on_embedded_change(self, *args):
+ # by a fallback icon
+ is_embedded = self._tray.is_embedded() or not self._tray.get_visible()
+ # On some desktops, above check fails but tray is always visible
+- is_embedded = is_embedded or IS_LXQT or IS_CINNAMON
++ is_embedded = is_embedded or IS_KDE or IS_LXQT or IS_CINNAMON
+ if is_embedded != self.get_property("active"):
+ self.set_property("active", is_embedded)
+