summaryrefslogtreecommitdiff
path: root/pcr/gnome-shell-pomodoro
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/gnome-shell-pomodoro')
-rw-r--r--pcr/gnome-shell-pomodoro/PKGBUILD41
-rw-r--r--pcr/gnome-shell-pomodoro/gschemas.install14
-rw-r--r--pcr/gnome-shell-pomodoro/libre.patch213
3 files changed, 268 insertions, 0 deletions
diff --git a/pcr/gnome-shell-pomodoro/PKGBUILD b/pcr/gnome-shell-pomodoro/PKGBUILD
new file mode 100644
index 000000000..3db26a390
--- /dev/null
+++ b/pcr/gnome-shell-pomodoro/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer (Arch): Andrejs Mivreņiks <gim at fastmail dot fm>
+# Contributor (Arch): Janne Haapsaari <haaja@iki.fi>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+pkgname=gnome-shell-pomodoro
+pkgver=0.11.1
+pkgrel=1.parabola1
+pkgdesc='A time management utility for GNOME based on the pomodoro technique, without nonfree Skype support'
+arch=('i686' 'x86_64')
+url='https://github.com/codito/gnome-shell-pomodoro/'
+license=('GPL3')
+depends=('gnome-desktop' 'libcanberra' 'upower' 'gstreamer' 'gobject-introspection' 'perl-xml-sax-expat' 'telepathy-glib')
+makedepends=('intltool' 'vala' 'gnome-common' 'docbook2x')
+conflicts=('gnome-shell-pomodoro-git')
+install='gschemas.install'
+source=("$pkgname-$pkgver.tar.gz::https://github.com/codito/gnome-pomodoro/archive/$pkgver.tar.gz"
+ 'libre.patch')
+sha256sums=('90217c2df07ef7da2f1e8fba4e657a18954d03bc09fe93ba4405aa6e12df1a7a'
+ 'acb05ba020439a6ae20a87b9f40b51a2b0aff836180349e7750e647e479148dc')
+
+prepare() {
+ cd "$srcdir/gnome-pomodoro-$pkgver"
+ # Remove Skype stuff
+ rm -rv lib/skype{,-plugin}.vala
+ patch -Np1 -i ../libre.patch
+
+ # Fixes some build issues when 'docbook2x' package is installed
+ # Big thanks to user maus25 for the fix
+ sed -i "s/docbook2man \$?/docbook2man --sgml \$?/g" man/Makefile.am
+
+ ./autogen.sh --prefix=/usr --datadir=/usr/share
+}
+
+build() {
+ cd "$srcdir/gnome-pomodoro-$pkgver"
+ make
+}
+
+package() {
+ cd "$srcdir/gnome-pomodoro-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/pcr/gnome-shell-pomodoro/gschemas.install b/pcr/gnome-shell-pomodoro/gschemas.install
new file mode 100644
index 000000000..4dfa1fc1f
--- /dev/null
+++ b/pcr/gnome-shell-pomodoro/gschemas.install
@@ -0,0 +1,14 @@
+post_install() {
+ glib-compile-schemas usr/share/glib-2.0/schemas/
+ gtk-update-icon-cache -f -t -q usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ glib-compile-schemas usr/share/glib-2.0/schemas/
+ gtk-update-icon-cache -f -t -q usr/share/icons/hicolor
+}
+
+post_remove() {
+ glib-compile-schemas usr/share/glib-2.0/schemas/
+ gtk-update-icon-cache -f -t -q usr/share/icons/hicolor
+}
diff --git a/pcr/gnome-shell-pomodoro/libre.patch b/pcr/gnome-shell-pomodoro/libre.patch
new file mode 100644
index 000000000..b5575eebe
--- /dev/null
+++ b/pcr/gnome-shell-pomodoro/libre.patch
@@ -0,0 +1,213 @@
+diff -Nur gnome-pomodoro-0.11.1.orig/data/org.gnome.pomodoro.gschema.xml.in gnome-pomodoro-0.11.1/data/org.gnome.pomodoro.gschema.xml.in
+--- gnome-pomodoro-0.11.1.orig/data/org.gnome.pomodoro.gschema.xml.in 2015-10-24 14:24:33.000000000 -0300
++++ gnome-pomodoro-0.11.1/data/org.gnome.pomodoro.gschema.xml.in 2015-11-30 15:28:22.605008894 -0300
+@@ -208,40 +208,4 @@
+ </key>
+ </schema>
+
+- <schema id="org.gnome.pomodoro.plugins.skype" path="/org/gnome/pomodoro/plugins/skype/">
+- <key name="enabled" type="b">
+- <default>false</default>
+- <summary>Enabled</summary>
+- <description>Whether plugin is enabled.</description>
+- </key>
+- <key name="set-custom-status" type="b">
+- <default>false</default>
+- <summary>Set custom status</summary>
+- <description>Whether plugin should set custom presence status.</description>
+- </key>
+- <key name="presence-during-pomodoro" type="s">
+- <choices>
+- <choice value=""/>
+- <choice value="available"/>
+- <choice value="invisible"/>
+- <choice value="busy"/>
+- <choice value="idle"/>
+- </choices>
+- <default>"busy"</default>
+- <summary>Presence during pomodoro</summary>
+- <description>Presence during pomodoro.</description>
+- </key>
+- <key name="presence-during-break" type="s">
+- <choices>
+- <choice value=""/>
+- <choice value="available"/>
+- <choice value="invisible"/>
+- <choice value="busy"/>
+- <choice value="idle"/>
+- </choices>
+- <default>"available"</default>
+- <summary>Presence during break</summary>
+- <description>Presence during break.</description>
+- </key>
+- </schema>
+ </schemalist>
+diff -Nur gnome-pomodoro-0.11.1.orig/lib/Makefile.am gnome-pomodoro-0.11.1/lib/Makefile.am
+--- gnome-pomodoro-0.11.1.orig/lib/Makefile.am 2015-10-24 14:24:33.000000000 -0300
++++ gnome-pomodoro-0.11.1/lib/Makefile.am 2015-11-30 15:24:53.841977378 -0300
+@@ -23,8 +23,6 @@
+ screensaver-module.vala \
+ service.vala \
+ settings.vala \
+- skype.vala \
+- skype-plugin.vala \
+ sound-chooser-button.vala \
+ sounds-module.vala \
+ symbolic-button.vala \
+diff -Nur gnome-pomodoro-0.11.1.orig/lib/preferences-dialog.vala gnome-pomodoro-0.11.1/lib/preferences-dialog.vala
+--- gnome-pomodoro-0.11.1.orig/lib/preferences-dialog.vala 2015-10-24 14:24:33.000000000 -0300
++++ gnome-pomodoro-0.11.1/lib/preferences-dialog.vala 2015-11-30 15:27:33.987411057 -0300
+@@ -368,7 +368,6 @@
+
+ this.setup_header_bar ();
+ this.setup_default_view ();
+- this.setup_skype_view ();
+ this.setup_telepathy_view ();
+
+ this.stack.set_visible_child_name ("default");
+@@ -618,102 +617,6 @@
+ }
+ }
+
+- private void setup_skype_view ()
+- {
+- var plugin = this.presence_module.get_plugin_by_name ("skype")
+- as Pomodoro.SkypePlugin;
+-
+- var list_box = new Gtk.ListBox ();
+- list_box.set_selection_mode (Gtk.SelectionMode.NONE);
+- list_box.set_activate_on_single_click (true);
+- list_box.set_header_func (list_box_separator_func);
+- list_box.can_focus = false;
+- list_box.show ();
+-
+- var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
+- box.set_margin_left (20);
+- box.set_margin_right (20);
+- box.set_margin_top (12);
+- box.set_margin_bottom (12);
+-
+- var grid = new Gtk.Grid ();
+- grid.set_margin_left (24);
+- grid.set_margin_top (6);
+- grid.set_margin_bottom (12);
+- grid.set_column_spacing (6);
+- grid.set_row_spacing (12);
+-
+- var grid_row = 0;
+-
+- var custom_status_checkbutton = new Gtk.CheckButton.with_label (_("Set custom status"));
+- custom_status_checkbutton.halign = Gtk.Align.START;
+-
+- var pomodoro_presence_label = new Gtk.Label (_("Status during pomodoro"));
+- pomodoro_presence_label.halign = Gtk.Align.START;
+- pomodoro_presence_label.hexpand = true;
+-
+- var pomodoro_presence = this.create_presence_status_combo_box ();
+-
+- var break_presence_label = new Gtk.Label (_("Status during break"));
+- break_presence_label.halign = Gtk.Align.START;
+- break_presence_label.hexpand = true;
+-
+- var break_presence = this.create_presence_status_combo_box ();
+-
+- var authenticate_button = new Gtk.Button.with_label (_("Authenticate"));
+- authenticate_button.halign = Gtk.Align.START;
+- authenticate_button.hexpand = false;
+-
+- authenticate_button.clicked.connect (() => {
+- plugin.authenticate ();
+- });
+-
+- box.pack_start (custom_status_checkbutton, false, false, 0);
+-
+- grid.attach (pomodoro_presence_label, 0, grid_row, 1, 1);
+- grid.attach (pomodoro_presence, 1, grid_row, 1, 1);
+- grid_row += 1;
+-
+- grid.attach (break_presence_label, 0, grid_row, 1, 1);
+- grid.attach (break_presence, 1, grid_row, 1, 1);
+- grid_row += 1;
+-
+- box.pack_start (grid, false, true, 0);
+-
+- // box.pack_start (authenticate_button, false, false, 0);
+-
+- box.show_all ();
+-
+- this.stack.add_named (box, "skype");
+-
+- plugin.settings.bind_with_mapping ("presence-during-pomodoro",
+- pomodoro_presence,
+- "value",
+- SETTINGS_BIND_FLAGS,
+- (SettingsBindGetMappingShared) get_presence_status_mapping,
+- (SettingsBindSetMappingShared) set_presence_status_mapping,
+- null,
+- null);
+-
+- plugin.settings.bind_with_mapping ("presence-during-break",
+- break_presence,
+- "value",
+- SETTINGS_BIND_FLAGS,
+- (SettingsBindGetMappingShared) get_presence_status_mapping,
+- (SettingsBindSetMappingShared) set_presence_status_mapping,
+- null,
+- null);
+- plugin.settings.bind ("set-custom-status",
+- custom_status_checkbutton,
+- "active",
+- SETTINGS_BIND_FLAGS);
+-
+- plugin.settings.bind ("set-custom-status",
+- grid,
+- "sensitive",
+- GLib.SettingsBindFlags.GET);
+- }
+-
+ private void setup_telepathy_view ()
+ {
+ var plugin = this.presence_module.get_plugin_by_name ("telepathy")
+diff -Nur gnome-pomodoro-0.11.1.orig/lib/presence-module.vala gnome-pomodoro-0.11.1/lib/presence-module.vala
+--- gnome-pomodoro-0.11.1.orig/lib/presence-module.vala 2015-10-24 14:24:33.000000000 -0300
++++ gnome-pomodoro-0.11.1/lib/presence-module.vala 2015-11-30 15:26:39.433437824 -0300
+@@ -178,15 +178,6 @@
+ GLib.SettingsBindFlags.NO_SENSITIVITY);
+ this.plugins.append (telepathy_plugin);
+
+- var skype_plugin = new Pomodoro.SkypePlugin ();
+- skype_plugin.settings.bind ("enabled",
+- skype_plugin,
+- "enabled",
+- GLib.SettingsBindFlags.GET |
+- GLib.SettingsBindFlags.DEFAULT |
+- GLib.SettingsBindFlags.NO_SENSITIVITY);
+- this.plugins.append (skype_plugin);
+-
+ // this.enable_plugins ();
+
+ this.timer.state_changed.connect (this.on_timer_state_changed);
+diff -Nur gnome-pomodoro-0.11.1.orig/po/POTFILES.in gnome-pomodoro-0.11.1/po/POTFILES.in
+--- gnome-pomodoro-0.11.1.orig/po/POTFILES.in 2015-10-24 14:24:33.000000000 -0300
++++ gnome-pomodoro-0.11.1/po/POTFILES.in 2015-11-30 15:29:01.523084849 -0300
+@@ -33,8 +33,6 @@
+ lib/screensaver-module.vala
+ lib/service.vala
+ lib/settings.vala
+-lib/skype-plugin.vala
+-lib/skype.vala
+ lib/sound-chooser-button.vala
+ lib/sounds-module.vala
+ lib/symbolic-button.vala
+diff -Nur gnome-pomodoro-0.11.1.orig/po/POTFILES.skip gnome-pomodoro-0.11.1/po/POTFILES.skip
+--- gnome-pomodoro-0.11.1.orig/po/POTFILES.skip 2015-10-24 14:24:33.000000000 -0300
++++ gnome-pomodoro-0.11.1/po/POTFILES.skip 2015-11-30 15:28:46.903807716 -0300
+@@ -21,8 +21,6 @@
+ lib/screensaver-module.c
+ lib/service.c
+ lib/settings.c
+-lib/skype-plugin.c
+-lib/skype.c
+ lib/sound-chooser-button.c
+ lib/sounds-module.c
+ lib/symbolic-button.c