summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD32
-rw-r--r--ayatana-webmail.install19
-rw-r--r--idler_fix.patch17
-rw-r--r--status_icon.patch40
5 files changed, 88 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 84ea6420d45e..7a1674c11127 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
-pkgbase = ayatana-webmail
- pkgdesc = Webmail notifications and actions for any desktop
+pkgbase = ayatana-webmail-no-indicator-messages
+ pkgdesc = Webmail notifications and actions for any desktop without ayatana-indicator-messages dependency
pkgver = 22.12.15
pkgrel = 1
url = https://tari.in/www/software/ayatana-webmail/
@@ -20,9 +20,14 @@ pkgbase = ayatana-webmail
depends = python-psutil
depends = python-secretstorage
depends = python-urllib3
+ optdepends = ayatana-indicator-messages: Support for indicator messages
+ provides = ayatana-webmail=22.12.15
+ conflicts = ayatana-webmail
conflicts = unity-mail
replaces = unity-mail
source = ayatana-webmail-22.12.15.tar.gz::https://github.com/AyatanaIndicators/ayatana-webmail/archive/22.12.15.tar.gz
+ source = status_icon.patch
md5sums = 2703acd3381d466e042eee64d109ad51
+ md5sums = eb8721b75b144ab35a8e18bb352799ab
-pkgname = ayatana-webmail
+pkgname = ayatana-webmail-no-indicator-messages
diff --git a/PKGBUILD b/PKGBUILD
index 642d67f38b0a..f5c8cff8685e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,43 @@
# Author: Robert Tari <robert at tari dot in>
# Maintainer: Robert Tari <robert at tari dot in>
+# Maintainer: Ingo Meyer <IJ_M@gmx.de>
-pkgname="ayatana-webmail"
+pkgname="ayatana-webmail-no-indicator-messages"
pkgver="22.12.15"
pkgrel="1"
-pkgdesc="Webmail notifications and actions for any desktop"
+pkgdesc="Webmail notifications and actions for any desktop without ayatana-indicator-messages dependency"
arch=("any")
url="https://tari.in/www/software/ayatana-webmail/"
license=("GPL3")
depends=("hicolor-icon-theme" "dconf" "gobject-introspection" "desktop-file-utils" "libnotify" "libcanberra" "gnome-keyring" "python-babel" "python-gobject" "python-psutil" "python-secretstorage" "python-urllib3")
makedepends=("python-setuptools" "python-polib")
-install="${pkgname}.install"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/AyatanaIndicators/${pkgname}/archive/${pkgver}.tar.gz")
-md5sums=("2703acd3381d466e042eee64d109ad51")
+optdepends=("ayatana-indicator-messages: Support for indicator messages")
+install="ayatana-webmail.install"
+source=("ayatana-webmail-${pkgver}.tar.gz::https://github.com/AyatanaIndicators/ayatana-webmail/archive/${pkgver}.tar.gz"
+ "status_icon.patch")
+md5sums=("2703acd3381d466e042eee64d109ad51"
+ "eb8721b75b144ab35a8e18bb352799ab")
+provides=("ayatana-webmail=${pkgver}")
replaces=("unity-mail")
-conflicts=("unity-mail")
+conflicts=("ayatana-webmail" "unity-mail")
+
+prepare()
+{
+ cd ayatana-webmail-${pkgver}
+ patch -Np1 -i "${srcdir}/status_icon.patch"
+}
build()
{
- cd ${pkgname}-${pkgver}
+ cd ayatana-webmail-${pkgver}
python setup.py build
}
package()
{
- cd ${pkgname}-${pkgver}
- python setup.py install --root="${pkgdir}" --optimize=1
+ cd ayatana-webmail-${pkgver}
+ python setup.py install --optimize=1 \
+ --prefix=/usr \
+ --root="${pkgdir}" \
+ --skip-build
}
diff --git a/ayatana-webmail.install b/ayatana-webmail.install
index bb1ba6062858..149fcd81e75b 100644
--- a/ayatana-webmail.install
+++ b/ayatana-webmail.install
@@ -1,9 +1,5 @@
post_install()
{
- if which pycompile >/dev/null 2>&1; then
- pycompile -p ayatana-webmail
- fi
-
gtk-update-icon-cache -q -f usr/share/icons/hicolor
update-desktop-database -q
glib-compile-schemas usr/share/glib-2.0/schemas
@@ -14,24 +10,9 @@ post_upgrade()
post_install
}
-pre_remove()
-{
- if which pyclean >/dev/null 2>&1; then
- pyclean -p ayatana-webmail
- else
- pacman -Qql ayatana-webmail | grep '\.py$' | while read file
- do
- rm -f "${file}"[co] >/dev/null
- done
- fi
-}
-
post_remove()
{
gtk-update-icon-cache -q -f usr/share/icons/hicolor
update-desktop-database -q
glib-compile-schemas usr/share/glib-2.0/schemas
}
-
-
-
diff --git a/idler_fix.patch b/idler_fix.patch
new file mode 100644
index 000000000000..fdb9f371c1f3
--- /dev/null
+++ b/idler_fix.patch
@@ -0,0 +1,17 @@
+diff --git a/ayatanawebmail/idler.py b/ayatanawebmail/idler.py
+index 8f956ea..b6b63b4 100755
+--- a/ayatanawebmail/idler.py
++++ b/ayatanawebmail/idler.py
+@@ -22,6 +22,12 @@ class Idler(object):
+
+ def stop(self):
+
++ if self.oConnection.oImap is not None:
++ try:
++ # Send a NOOP command to interrupt the IDLE mode and free the blocked thread
++ self.oConnection.oImap.noop()
++ except:
++ pass
+ self.oEvent.set()
+
+ def join(self):
diff --git a/status_icon.patch b/status_icon.patch
new file mode 100644
index 000000000000..abd422377cb5
--- /dev/null
+++ b/status_icon.patch
@@ -0,0 +1,40 @@
+diff --git a/ayatanawebmail/application.py b/ayatanawebmail/application.py
+index 917fb3b..1525801 100755
+--- a/ayatanawebmail/application.py
++++ b/ayatanawebmail/application.py
+@@ -187,8 +187,9 @@ class MessagingMenu(object):
+ gi.require_version('AppIndicator3', '0.1')
+ self.oAppIndicator = importlib.import_module('gi.repository.AppIndicator3')
+
+- self.oIndicator = self.oAppIndicator.Indicator.new(APPNAME, 'ayatanawebmail-messages', self.oAppIndicator.IndicatorCategory.APPLICATION_STATUS)
+- self.oIndicator.set_attention_icon('ayatanawebmail-messages-new')
++ self.oIndicatorIconNoMessages = 'ayatanawebmail-messages'
++ self.oIndicatorIconNewMessages = 'ayatanawebmail-messages-new'
++ self.oIndicator = self.oAppIndicator.Indicator.new(APPNAME, self.oIndicatorIconNoMessages, self.oAppIndicator.IndicatorCategory.APPLICATION_STATUS)
+ self.oIndicator.set_status(self.oAppIndicator.IndicatorStatus.ACTIVE)
+ self.oMenu = Gtk.Menu()
+ self.oMenu.append(Gtk.SeparatorMenuItem())
+@@ -265,6 +266,7 @@ class MessagingMenu(object):
+ self.oMenu.insert(oMenuItem, len(self.oMenu.get_children()) - self.nMenuItems)
+
+ if bDrawAttention:
++ self.oIndicator.set_icon(self.oIndicatorIconNewMessages)
+ self.oIndicator.set_status(self.oAppIndicator.IndicatorStatus.ATTENTION)
+
+ self.oMenuItemClear.set_sensitive(True)
+@@ -287,6 +289,7 @@ class MessagingMenu(object):
+
+ if len(self.oMenu.get_children()) - self.nMenuItems == 0:
+
++ self.oIndicator.set_icon(self.oIndicatorIconNoMessages)
+ self.oIndicator.set_status(self.oAppIndicator.IndicatorStatus.ACTIVE)
+ self.oMenuItemClear.set_sensitive(False)
+
+@@ -332,6 +335,7 @@ class MessagingMenu(object):
+
+ if len(self.oMenu.get_children()) - self.nMenuItems == 0:
+
++ self.oIndicator.set_icon(self.oIndicatorIconNoMessages)
+ self.oIndicator.set_status(self.oAppIndicator.IndicatorStatus.ACTIVE)
+ self.oMenuItemClear.set_sensitive(False)
+