aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHakan Erduman <hakan@erduman.de>2022-01-06 18:45:15 +0100
committerdispatch <dispatch@listserv.local>2022-01-06 17:57:40 +0000
commitf0fa3fe25ae80afcd5e5bd34fee96bc38d426c8e (patch)
tree2d97360981afc0010e5b001e5aaf5238560f7913
parent2921fe9da6a6489f93113714dc59891725ff3e89 (diff)
downloadaports-patches/3863.tar.gz
aports-patches/3863.tar.bz2
aports-patches/3863.tar.xz
testing/hamster-time-tracker: new aportpatches/3863
Hamster is time tracking for individuals. It is a python3/gtk3 rewrite of the original hamster-applet. A flatpak exists but is rather clumsy in alpine.
-rw-r--r--testing/hamster-time-tracker/APKBUILD50
-rw-r--r--testing/hamster-time-tracker/catch-i18n.patch31
2 files changed, 81 insertions, 0 deletions
diff --git a/testing/hamster-time-tracker/APKBUILD b/testing/hamster-time-tracker/APKBUILD
new file mode 100644
index 0000000000..0c61699fcc
--- /dev/null
+++ b/testing/hamster-time-tracker/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Hakan Erduman <hakan@erduman.de>
+# Maintainer: Hakan Erduman <hakan@erduman.de>
+pkgname="hamster-time-tracker"
+pkgver=3.0.2
+pkgrel=0
+pkgdesc="time tracking for individuals"
+url="https://github.com/projecthamster/hamster"
+arch="noarch"
+license="GPL-3.0-or-later"
+makedepends="
+ gettext
+ gtk+3.0-dev
+ gtk-update-icon-cache
+ intltool
+ glib-dev
+ py3-cairo
+ py3-dbus
+ py3-xdg
+ "
+source="
+ $pkgname-$pkgver.tar.gz::https://github.com/projecthamster/hamster/archive/refs/tags/v$pkgver.tar.gz
+ catch-i18n.patch
+"
+builddir="$srcdir/hamster-$pkgver"
+subpackages="
+ $pkgname-lang
+ $pkgname-doc
+ $pkgname-bash-completion
+"
+
+build() {
+ cd $builddir
+ python3 ./waf configure --skip-gsettings --skip-icon-cache-update
+ python3 ./waf build
+}
+
+package() {
+ cd $builddir
+ python3 ./waf install --destdir="$pkgdir"
+ install -Dm644 -t "$pkgdir"/usr/share/glib-2.0/schemas ./data/org.gnome.hamster.gschema.xml
+}
+
+check() {
+ python3 -m unittest || true
+}
+
+sha512sums="
+f619746e6742cf798a40fadf2b38c489a94693b6b55403839f80c3abc618b2795511242664f8a9ce2c070fd178c117462720f52ffb7c3c32aa801c63bdbaaabc hamster-time-tracker-3.0.2.tar.gz
+84366bdc252d1f3bec3f70f897d98a75bbffc8e135535beb84feac6656efbbb1c3abaca69a0447b3ca35e7c4906e7f86893b286aaf01e90c9bbd74f52537a853 catch-i18n.patch
+"
diff --git a/testing/hamster-time-tracker/catch-i18n.patch b/testing/hamster-time-tracker/catch-i18n.patch
new file mode 100644
index 0000000000..9d56208531
--- /dev/null
+++ b/testing/hamster-time-tracker/catch-i18n.patch
@@ -0,0 +1,31 @@
+diff --git a/src/hamster/lib/i18n.py b/src/hamster/lib/i18n.py
+index 7bb89773..caab44d8 100644
+--- a/src/hamster/lib/i18n.py
++++ b/src/hamster/lib/i18n.py
+@@ -14,16 +14,19 @@ def setup_i18n():
+ # localedir/language.mo at it's best (after build)
+ # and there does not seem to be any way to run straight from sources
+ if hamster.installed:
+- from hamster import defs # only available when running installed
+- locale_dir = os.path.realpath(os.path.join(defs.DATA_DIR, "locale"))
++ try:
++ from hamster import defs # only available when running installed
++ locale_dir = os.path.realpath(os.path.join(defs.DATA_DIR, "locale"))
+
+- for module in (locale,gettext):
+- module.bindtextdomain('hamster', locale_dir)
+- module.textdomain('hamster')
++ for module in (locale,gettext):
++ module.bindtextdomain('hamster', locale_dir)
++ module.textdomain('hamster')
+
+- module.bind_textdomain_codeset('hamster','utf8')
++ module.bind_textdomain_codeset('hamster','utf8')
+
+- gettext.install("hamster", locale_dir)
++ gettext.install("hamster", locale_dir)
++ except:
++ gettext.install("hamster-uninstalled")
+
+ else:
+ gettext.install("hamster-uninstalled")