summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Alff2017-04-07 12:33:23 -0400
committerTed Alff2017-04-07 12:33:23 -0400
commit8c2ca78dde5369491f9eaf96c8b052a712f7b9ab (patch)
tree56fc65bbd602e319ad198fc05314f646d56725fa
downloadaur-awn-extras-applets-git.tar.gz
Initial commit.
-rw-r--r--.SRCINFO44
-rw-r--r--PKGBUILD95
-rw-r--r--check-dependencies.patch68
-rw-r--r--dont_build_cairo_menu.patch21
-rw-r--r--remove-settings-menu.patch129
5 files changed, 357 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6ac0aca79ec
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,44 @@
+# Generated by mksrcinfo v8
+# Fri Apr 7 16:33:11 UTC 2017
+pkgbase = awn-extras-applets-git
+ pkgdesc = Applets for avant-window-navigator (git version)
+ pkgver = 0.4.1.r3544
+ pkgrel = 1
+ url = https://launchpad.net/awn-extras
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = intltool
+ makedepends = vala
+ makedepends = git
+ depends = avant-window-navigator-git
+ depends = python2-notify
+ depends = vte
+ depends = gnome-menus
+ depends = gnome-menus2
+ optdepends = python2-feedparser: comics, feeds, mail applets
+ optdepends = python2-rsvg: comics, cairo-clock, hardware-sensors applets
+ optdepends = python2-dateutil: cairo-clock (optional), calendar applets
+ optdepends = python2-vobject: calendar applet
+ optdepends = python2-pyinotify: thinkhdaps applet (optional)
+ optdepends = gnome-python-desktop: stacks applet
+ optdepends = python2-wnck: slickswitcher applet
+ optdepends = fortune-mod: animal-farm applet
+ optdepends = upower: battery applet
+ optdepends = gnome-applets: cpufreq applet
+ optdepends = hddtemp: hardware-sensors applet (optional)
+ optdepends = lm_sensors: hardware-sensors applet (optional)
+ provides = awn-extras-applets=0.4.1
+ conflicts = awn-extras-applets
+ options = !libtool
+ source = awn-extras::git+https://github.com/p12tic/awn-extras.git
+ source = remove-settings-menu.patch
+ source = check-dependencies.patch
+ source = dont_build_cairo_menu.patch
+ sha256sums = SKIP
+ sha256sums = 4a37d04ccf2e01c2dedc13ca2c518556c1f8abe78a302e85ace8df95808206f0
+ sha256sums = bcb3dae957c3cebbd5ce233e5a0fc08bd33dac319b8ebde40e08467ca03c4aa4
+ sha256sums = 88a93eb240255087178c3c2375e150c68295866990ead18d7f3fb87ddc18fd5e
+
+pkgname = awn-extras-applets-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7479461a51c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,95 @@
+# Maintainer: twa022 <twa022 at gmail dot com>
+# Contributor: SanskritFritz (gmail)
+# Contributor: György Balló <ballogy@freestart.hu>
+# Contributor: Biru Ionut <ionut@archlinux.ro>
+# Contributor: Jonathan Liu <net147@hotmail.com>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+
+_pkgname=awn-extras
+pkgname=${_pkgname}-applets-git
+pkgver=0.4.1.r3544
+pkgrel=1
+pkgdesc='Applets for avant-window-navigator (git version)'
+arch=('i686' 'x86_64')
+url='https://launchpad.net/awn-extras'
+license=('GPL')
+depends=('avant-window-navigator-git' 'python2-notify' 'vte' 'gnome-menus' 'gnome-menus2')
+makedepends=('intltool' 'vala' 'git')
+optdepends=('python2-feedparser: comics, feeds, mail applets'
+ 'python2-rsvg: comics, cairo-clock, hardware-sensors applets'
+ 'python2-dateutil: cairo-clock (optional), calendar applets'
+ 'python2-vobject: calendar applet'
+ 'python2-pyinotify: thinkhdaps applet (optional)'
+ 'gnome-python-desktop: stacks applet'
+ 'python2-wnck: slickswitcher applet'
+ 'fortune-mod: animal-farm applet'
+ 'upower: battery applet'
+ 'gnome-applets: cpufreq applet'
+ 'hddtemp: hardware-sensors applet (optional)'
+ 'lm_sensors: hardware-sensors applet (optional)')
+options=('!libtool')
+conflicts=("${pkgname/-git/}")
+provides=("${pkgname/-git/}=${pkgver/\.r*/}")
+source=("${_pkgname}"::git+https://github.com/p12tic/awn-extras.git
+ remove-settings-menu.patch
+ check-dependencies.patch
+ dont_build_cairo_menu.patch)
+sha256sums=('SKIP'
+ '4a37d04ccf2e01c2dedc13ca2c518556c1f8abe78a302e85ace8df95808206f0'
+ 'bcb3dae957c3cebbd5ce233e5a0fc08bd33dac319b8ebde40e08467ca03c4aa4'
+ '88a93eb240255087178c3c2375e150c68295866990ead18d7f3fb87ddc18fd5e')
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ echo $( grep -A 1 'AC_INIT.*awn-extras' configure.ac | tail -1 | grep -E -o '[0-9](\.[0-9]+)*' ).r$( git rev-list --count HEAD )
+}
+
+prepare() {
+ cd "${srcdir}/${_pkgname}"
+
+ patch -uNp2 -r- -i "$srcdir/remove-settings-menu.patch"
+ patch -uNp2 -r- -i "$srcdir/check-dependencies.patch"
+
+ # Python2 fix
+ find . -type f -name *.py | xargs sed -i 's@^#.*python$@#!/usr/bin/python2@'
+ sed -i 's/async(\"python \"/async(\"python2 \"/' applets/maintained/shiny-switcher/shinyswitcherapplet.c
+
+ msg "Disabling cairo-menu (build failures)"
+ patch -uNp2 -r- -i "$srcdir/dont_build_cairo_menu.patch"
+ rm -fr applets/maintained/cairo-menu
+ sed -i '/applets\/maintained\/cairo-menu/d' configure.ac
+ msg "Disabling volume-control (gstreamer0.10 is deprecated)"
+ sed -i '/maintained\/volume-control/d' configure.ac applets/Makefile.am
+ msg "Disabling media-player (gstreamer0.10 is deprecated)"
+ sed -i '/maintained\/media-player/d' configure.ac applets/Makefile.am
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+
+ ./autogen.sh --prefix=/usr --sysconfdir=/etc \
+ --disable-static \
+ --disable-pymod-checks \
+ --with-gconf \
+ --enable-indicator-applet \
+ PYTHON=/usr/bin/python2
+ make
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}"
+
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install
+
+ mkdir -p "$pkgdir/usr/share/gconf/schemas"
+ gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/awn-extras.schemas" "$pkgdir"/etc/gconf/schemas/*.schemas
+ rm -r "$pkgdir"/etc
+
+ # Remove bandwidth-monitor applet, because it's not compatible with latest netstat
+ rm -R "$pkgdir"/usr/share/avant-window-navigator/applets/bandwidth-monitor*
+
+ # Remove pandora applet, because gtkmozembed is not available
+ rm -R "$pkgdir"/usr/share/avant-window-navigator/applets/pandora*
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/check-dependencies.patch b/check-dependencies.patch
new file mode 100644
index 00000000000..b28435a3f14
--- /dev/null
+++ b/check-dependencies.patch
@@ -0,0 +1,68 @@
+diff -Naur ./awn-extras.orig/applets/maintained/comics/comics.py ./awn-extras/applets/maintained/comics/comics.py
+--- ./awn-extras.orig/applets/maintained/comics/comics.py 2017-04-06 16:58:32.439110580 -0400
++++ ./awn-extras/applets/maintained/comics/comics.py 2017-04-06 16:58:20.252444429 -0400
+@@ -30,7 +30,7 @@
+ from awn.extras import _, awnlib
+
+ # Import Comics! modules, but check dependencies first
++awn.check_dependencies(globals(), 'feedparser', 'pynotify' 'rsvg')
+-awn.check_dependencies(globals(), 'feedparser', 'pynotify')
+ from pynotify import init as notify_init, Notification
+
+ import comics_manage
+diff -Naur ./awn-extras.orig/applets/maintained/media-player/media_player.py ./awn-extras/applets/maintained/media-player/media_player.py
+--- ./awn-extras.orig/applets/maintained/media-player/media_player.py 2017-04-06 16:59:53.045773837 -0400
++++ ./awn-extras/applets/maintained/media-player/media_player.py 2017-04-06 16:58:20.262444429 -0400
+@@ -17,13 +17,15 @@
+ import os
+ import sys
+
++import awn
++awn.check_dependencies(globals(), 'pygst')
++
+ import pygst
+ pygst.require("0.10")
+ import gst
+ import gtk
+ import gobject
+
+-import awn
+ from desktopagnostic import config
+ from awn.extras import _
+
+diff -Naur ./awn-extras.orig/applets/maintained/slickswitcher/slickswitcher.py ./awn-extras/applets/maintained/slickswitcher/slickswitcher.py
+--- ./awn-extras.orig/applets/maintained/slickswitcher/slickswitcher.py 2017-04-06 17:00:45.809104939 -0400
++++ ./awn-extras/applets/maintained/slickswitcher/slickswitcher.py 2017-04-06 16:58:20.265777761 -0400
+@@ -25,6 +25,7 @@
+ import gobject
+
+ import cairo
++awn.check_dependencies(globals(), 'wnck')
+ import drawing, switch, settings
+ from os.path import exists, isdir
+ import os
+diff -Naur ./awn-extras.orig/applets/maintained/volume-control/volume-control.py ./awn-extras/applets/maintained/volume-control/volume-control.py
+--- ./awn-extras.orig/applets/maintained/volume-control/volume-control.py 2017-04-06 17:01:31.179103020 -0400
++++ ./awn-extras/applets/maintained/volume-control/volume-control.py 2017-04-06 16:58:20.265777761 -0400
+@@ -27,6 +27,9 @@
+
+ from awn.extras import _, awnlib, __version__
+
++import awn
++awn.check_dependencies(globals(), 'pygst')
++
+ import pygst
+ pygst.require("0.10")
+ import gst
+diff -Naur ./awn-extras.orig/applets/unmaintained/stacks/stacks_applet.py ./awn-extras/applets/unmaintained/stacks/stacks_applet.py
+--- ./awn-extras.orig/applets/unmaintained/stacks/stacks_applet.py 2017-04-06 17:02:10.892434675 -0400
++++ ./awn-extras/applets/unmaintained/stacks/stacks_applet.py 2017-04-06 16:58:20.272444428 -0400
+@@ -23,6 +23,8 @@
+ import gobject
+ import awn
+
++awn.check_dependencies(globals(), 'gnome.ui', 'gnomedesktop')
++
+ from stacks_backend import *
+ from stacks_backend_file import *
+ from stacks_backend_folder import *
diff --git a/dont_build_cairo_menu.patch b/dont_build_cairo_menu.patch
new file mode 100644
index 00000000000..1d9f3c94ea4
--- /dev/null
+++ b/dont_build_cairo_menu.patch
@@ -0,0 +1,21 @@
+diff -Naur ./awn-extras.orig/applets/Makefile.am ./awn-extras/applets/Makefile.am
+--- ./awn-extras.orig/applets/Makefile.am 2017-04-06 17:24:49.585710543 -0400
++++ ./awn-extras/applets/Makefile.am 2017-04-06 17:26:55.432371888 -0400
+@@ -35,17 +35,6 @@
+ unmaintained/stacks \
+ maintained/yama \
+ $(NULL)
+-if CAIRO_MENU_GNOME3
+-CONDITIONAL_APPLETS += \
+- maintained/cairo-menu \
+- $(NULL)
+-else
+-if CAIRO_MENU_GNOME
+-CONDITIONAL_APPLETS += \
+- maintained/cairo-menu \
+- $(NULL)
+-endif
+-endif
+ if GNOME_MENU
+ CONDITIONAL_APPLETS += \
+ unmaintained/main-menu \
diff --git a/remove-settings-menu.patch b/remove-settings-menu.patch
new file mode 100644
index 00000000000..fa0d43707bf
--- /dev/null
+++ b/remove-settings-menu.patch
@@ -0,0 +1,129 @@
+diff -Naur ./awn-extras.orig/applets/maintained/cairo-menu/gnome-menu-builder.c ./awn-extras/applets/maintained/cairo-menu/gnome-menu-builder.c
+--- ./awn-extras.orig/applets/maintained/cairo-menu/gnome-menu-builder.c 2017-04-06 16:56:26.722449231 -0400
++++ ./awn-extras/applets/maintained/cairo-menu/gnome-menu-builder.c 2017-04-06 16:54:56.732453036 -0400
+@@ -41,7 +41,6 @@
+ #define MAX_ITEMS_OR_SUBMENU 7
+
+ GMenuTree * main_menu_tree = NULL;
+-GMenuTree * settings_menu_tree = NULL;
+
+ GtkWidget * menu_build (MenuInstance * instance);
+ static GtkWidget * submenu_build (MenuInstance * instance);
+@@ -844,19 +843,10 @@
+ gmenu_tree_remove_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
+ }
+
+-static void
+-_remove_settings_submenu_cb(MenuInstance * instance,GObject *where_the_object_was)
+-{
+- g_debug ("%s",__func__);
+- GMenuTreeDirectory *main_root;
+- gmenu_tree_remove_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
+-}
+-
+ static GtkWidget *
+ submenu_build (MenuInstance * instance)
+ {
+ GMenuTreeDirectory *main_root;
+- GMenuTreeDirectory *settings_root;
+ GtkWidget * menu = NULL;
+ /*
+ if the menu is set then clear any menu items (except for places or recent)
+@@ -866,10 +856,6 @@
+ {
+ main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE);
+ }
+- if (!settings_menu_tree)
+- {
+- settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE);
+- }
+ g_assert (main_menu_tree);
+ /*
+ get_places_menu() and get_recent_menu() are
+@@ -903,7 +889,6 @@
+ main_root = gmenu_tree_get_root_directory(main_menu_tree);
+ g_assert (gmenu_tree_item_get_type( (GMenuTreeItem*)main_root) == GMENU_TREE_ITEM_DIRECTORY);
+ g_assert (main_root);
+- settings_root = gmenu_tree_get_root_directory(settings_menu_tree);
+ if ( menu_dir = find_menu_dir (instance,main_root) )
+ {
+ /* if instance->menu then we're refreshing in a monitor callback*/
+@@ -912,22 +897,11 @@
+ menu = fill_er_up(instance,menu_dir,instance->menu);
+ g_object_weak_ref (G_OBJECT(menu), (GWeakNotify)_remove_main_submenu_cb,instance);
+ }
+- else if ( settings_root && (menu_dir = find_menu_dir (instance,settings_root)) )
+- {
+- gmenu_tree_remove_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
+- gmenu_tree_add_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance);
+- menu = fill_er_up(instance,menu_dir,instance->menu);
+- g_object_weak_ref (G_OBJECT(menu), (GWeakNotify)_remove_settings_submenu_cb,instance);
+- }
+ if (menu_dir)
+ {
+ gmenu_tree_item_unref(menu_dir);
+ }
+ gmenu_tree_item_unref(main_root);
+- if (settings_root)
+- {
+- gmenu_tree_item_unref(settings_root);
+- }
+ }
+ return instance->menu = menu;
+ }
+@@ -957,10 +931,6 @@
+ {
+ main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE);
+ }
+- if (!settings_menu_tree)
+- {
+- settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE);
+- }
+
+ if (main_menu_tree)
+ {
+@@ -979,44 +949,6 @@
+ menu_item = gtk_separator_menu_item_new ();
+ gtk_menu_shell_append(GTK_MENU_SHELL(instance->menu),menu_item);
+ }
+- if (settings_menu_tree)
+- {
+- root = gmenu_tree_get_root_directory(settings_menu_tree);
+- gmenu_tree_remove_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_menu_modified_cb,instance);
+- gmenu_tree_add_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_menu_modified_cb,instance);
+- if (!instance->menu)
+- {
+- g_debug ("%s: No applications menu????",__func__);
+- instance->menu = fill_er_up(instance,root,instance->menu);
+- }
+- else
+- {
+- sub_menu = fill_er_up (instance, root,instance->menu);
+-#if 0
+- sub_menu = fill_er_up(instance,root,NULL);
+- c = g_malloc0 (sizeof(CallbackContainer));
+- c->icon_name = g_strdup(gmenu_tree_directory_get_icon (root));
+- image = get_gtk_image (c->icon_name);
+- txt = gmenu_tree_entry_get_name((GMenuTreeEntry*)root);
+- menu_item = cairo_menu_item_new_with_label (txt?txt:"unknown");
+- gtk_menu_item_set_submenu (GTK_MENU_ITEM(menu_item),sub_menu);
+- if (image)
+- {
+- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),image);
+- }
+- gtk_menu_shell_append(GTK_MENU_SHELL(instance->menu),menu_item);
+- c->file_path = g_strdup(gmenu_tree_directory_get_desktop_file_path (root));
+- c->display_name = g_strdup ("Settings");
+- drop_data = g_strdup_printf("cairo_menu_item_dir:///@@@%s@@@%s@@@%s\n",c->file_path,c->display_name,c->icon_name);
+- cairo_menu_item_set_source (AWN_CAIRO_MENU_ITEM(menu_item),drop_data);
+- g_free (drop_data);
+- c->instance = instance;
+- g_signal_connect (menu_item, "button-press-event",G_CALLBACK(_button_press_dir),c);
+- g_object_weak_ref (G_OBJECT(menu_item),(GWeakNotify)_free_callback_container,c);
+-#endif
+- }
+- gmenu_tree_item_unref(root);
+- }
+
+ /*TODO Check to make sure it is needed. Should not be displayed if
+ all flags are of the NO persuasion.*/