diff options
author | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-08-13 01:33:19 -0700 |
commit | 7a65a910b77ad191d69881098c47f9b0c852d92e (patch) | |
tree | 9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/synapse | |
parent | 60da6abff6c9577a783d72865f11de7a585e912e (diff) |
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/synapse')
-rw-r--r-- | community/synapse/PKGBUILD | 54 | ||||
-rw-r--r-- | community/synapse/check-null-exec.patch | 16 | ||||
-rw-r--r-- | community/synapse/fix-check-desktop.patch | 30 | ||||
-rw-r--r-- | community/synapse/synapse.install | 13 |
4 files changed, 113 insertions, 0 deletions
diff --git a/community/synapse/PKGBUILD b/community/synapse/PKGBUILD new file mode 100644 index 000000000..c6a3accf1 --- /dev/null +++ b/community/synapse/PKGBUILD @@ -0,0 +1,54 @@ +# $Id: PKGBUILD 88681 2013-04-21 22:16:50Z heftig $ +# Maintainer: Felix Yan <felixonmars@gmail.com> +# Contributor: Alessio Sergi <asergi at archlinux dot us> + +pkgname=synapse +pkgver=0.2.10 +pkgrel=5 +pkgdesc="A semantic file launcher" +arch=('i686' 'x86_64') +url="https://launchpad.net/synapse-project" +license=('GPL3') +depends=('gtkhotkey' 'hicolor-icon-theme' 'json-glib' 'libgee06' 'libnotify' \ + 'libunique' 'libzeitgeist' 'rest' 'xdg-utils') +makedepends=('intltool' 'vala') +optdepends=('banshee: banshee plugin' + 'bc: calculator plugin' + 'devhelp: documentation plugin' + 'gnome-screensaver: screensaver plugin' + 'gnome-dictionary: dictionary plugin' + 'openssh: ssh plugin' + 'pastebinit: pastebin plugin' + 'rhythmbox: rhythmbox plugin' + 'xnoise: xnoise plugin') +install=$pkgname.install +source=("https://launchpad.net/$pkgname-project/0.2/$pkgver/+download/$pkgname-$pkgver.tar.gz" + "fix-check-desktop.patch" + "check-null-exec.patch") +sha1sums=('6e8a800bdbdded4e167734c8e49d95a9e44998ff' + 'b64fa4efc4efd01f77f84d19a7a63c10186d0211' + 'f494e5b36a77421114ce04b7085369abe5c00d68') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # XDG_CURRENT_DESKTOP fix + patch -Np1 -i "$srcdir"/fix-check-desktop.patch + + # don't crash on empty Exec field + patch -Np1 -i "$srcdir"/check-null-exec.patch + + # DSO fix + export LDFLAGS="$LDFLAGS -lm" + + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install +} + +# vim:set ts=2 sw=2 et: diff --git a/community/synapse/check-null-exec.patch b/community/synapse/check-null-exec.patch new file mode 100644 index 000000000..77820ecbb --- /dev/null +++ b/community/synapse/check-null-exec.patch @@ -0,0 +1,16 @@ +diff -Naur synapse-0.2.10.orig/src/core/desktop-file-service.vala synapse-0.2.10/src/core/desktop-file-service.vala +--- synapse-0.2.10.orig/src/core/desktop-file-service.vala 2012-03-18 20:02:41.000000000 +0100 ++++ synapse-0.2.10/src/core/desktop-file-service.vala 2012-12-26 18:07:55.962276823 +0100 +@@ -125,7 +125,11 @@ + } + + name = app_info.get_name (); +- exec = app_info.get_executable (); ++ exec = app_info.get_commandline (); ++ if (exec == null) ++ { ++ throw new DesktopFileError.UNINTERESTING_ENTRY ("Unable to get exec for %s".printf (name)); ++ } + + // check for hidden desktop files + if (keyfile.has_key (GROUP, "Hidden") && diff --git a/community/synapse/fix-check-desktop.patch b/community/synapse/fix-check-desktop.patch new file mode 100644 index 000000000..16e039b48 --- /dev/null +++ b/community/synapse/fix-check-desktop.patch @@ -0,0 +1,30 @@ +diff -Naur synapse-0.2.10.orig/src/core/desktop-file-service.vala synapse-0.2.10/src/core/desktop-file-service.vala +--- synapse-0.2.10.orig/src/core/desktop-file-service.vala 2012-03-18 20:02:41.000000000 +0100 ++++ synapse-0.2.10/src/core/desktop-file-service.vala 2012-03-19 12:06:43.080443401 +0100 +@@ -248,13 +248,23 @@ + + private void get_environment_type () + { +- unowned string? session_var = Environment.get_variable ("DESKTOP_SESSION"); +- ++ unowned string? session_var; ++ session_var = Environment.get_variable ("XDG_CURRENT_DESKTOP"); ++ if (session_var == null) ++ { ++ session_var = Environment.get_variable ("DESKTOP_SESSION"); ++ } ++ + if (session_var == null) return; + + string session = session_var.down (); + +- if (session.has_prefix ("kde")) ++ if (session.has_prefix ("unity")) ++ { ++ session_type = DesktopFileInfo.EnvironmentType.UNITY; ++ session_type_str = "Unity"; ++ } ++ else if (session.has_prefix ("kde")) + { + session_type = DesktopFileInfo.EnvironmentType.KDE; + session_type_str = "KDE"; diff --git a/community/synapse/synapse.install b/community/synapse/synapse.install new file mode 100644 index 000000000..704cb339e --- /dev/null +++ b/community/synapse/synapse.install @@ -0,0 +1,13 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &>/dev/null +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + post_install "$1" +} + +# vim:set ts=2 sw=2 et: |