summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Dubois2017-05-10 22:22:17 -0400
committerErik Dubois2017-05-10 22:22:17 -0400
commita95ffa17cbb28a84e611723ffb3107bb6cbd89b6 (patch)
tree44d30ea26c5d73b77f18a4ca9a2a9bf1d48e211c
downloadaur-a95ffa17cbb28a84e611723ffb3107bb6cbd89b6.tar.gz
initial commit
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD70
-rw-r--r--bamf-ubuntu.install31
-rw-r--r--update-bamf-index.hook11
-rw-r--r--update-bamf-index.pl31
-rw-r--r--update-bamf-index.sh2
6 files changed, 184 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b91f7a3b60e1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,39 @@
+# Generated by mksrcinfo v8
+# Thu May 11 02:22:13 UTC 2017
+pkgbase = bamf-ubuntu
+ pkgdesc = Removes the headache of applications matching into a simple DBus daemon and c wrapper library
+ pkgver = 0.5.3.16.10.20160929
+ pkgrel = 1
+ url = https://launchpad.net/bamf
+ install = bamf-ubuntu.install
+ arch = i686
+ arch = x86_64
+ groups = unity
+ license = GPL
+ makedepends = gnome-common
+ makedepends = gobject-introspection
+ makedepends = gtk-doc
+ makedepends = libxml2
+ makedepends = libxslt
+ makedepends = vala
+ depends = libgtop
+ depends = libwnck3
+ depends = glib2
+ depends = hicolor-icon-theme
+ depends = libdbusmenu-gtk3
+ depends = procps-ng
+ depends = startup-notification
+ provides = bamf=0.5.3.16.10.20160929
+ conflicts = bamf
+ replaces = bamf
+ source = https://launchpad.net/ubuntu/+archive/primary/+files/bamf_0.5.3+16.10.20160929.orig.tar.gz
+ source = update-bamf-index.hook
+ source = update-bamf-index.pl
+ source = update-bamf-index.sh
+ sha512sums = 572d58639065a867ffbbd1a605db3d01fc0954f37097ee3be1d3ccc96efb6c4258d001fb6a5b5624eadba65b99dc31498f7529cd17c41887cb7bfa676123f6b2
+ sha512sums = 49379121974a6f273084f66c6aa937fd2213e92169040db03f87098d3ca269032603f3dbfec947807e3d4a3c866648b96a2a3bb18f1ad3736a7ceaf011cf901a
+ sha512sums = 7db84774b72fb330abe2116f3d1d842c007820c200344d76ff87abab5226488fcc21d2e82cbe5381fb3e7ce0eacc09232f17d64c4e2a5ee8eef0be06808f21ff
+ sha512sums = 6dd8079a1dddc787d41fea246809e37de76a6e6daa2e3760c4a6770456fd1d8097597cadeae38fd81f322d44e79f0786e82604d606bc81bae57f39091db0755c
+
+pkgname = bamf-ubuntu
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0c70a6774ebf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
+# Original Maintainer: György Balló <ballogy@freestart.hu>
+# Contributor: thn81 <root@scrat>
+
+# vercheck-pkgbuild: auto
+# vercheck-ubuntu: name=bamf, repo=yakkety
+# vercheck-launchpad: name=bamf
+
+pkgname=bamf-ubuntu
+_actual_ver=0.5.3
+_extra_ver=+16.10.20160929
+pkgver=${_actual_ver}${_extra_ver//[\~\+]/.}
+pkgrel=1
+pkgdesc="Removes the headache of applications matching into a simple DBus daemon and c wrapper library"
+arch=(i686 x86_64)
+url="https://launchpad.net/bamf"
+license=(GPL)
+depends=(libgtop libwnck3 glib2 hicolor-icon-theme libdbusmenu-gtk3 procps-ng
+ startup-notification)
+makedepends=(gnome-common gobject-introspection gtk-doc libxml2 libxslt vala)
+provides=("bamf=${pkgver}")
+replaces=(bamf)
+conflicts=(bamf)
+groups=(unity)
+install=${pkgname}.install
+source=("https://launchpad.net/ubuntu/+archive/primary/+files/bamf_${_actual_ver}${_extra_ver}.orig.tar.gz"
+ update-bamf-index.hook
+ update-bamf-index.pl
+ update-bamf-index.sh)
+sha512sums=('572d58639065a867ffbbd1a605db3d01fc0954f37097ee3be1d3ccc96efb6c4258d001fb6a5b5624eadba65b99dc31498f7529cd17c41887cb7bfa676123f6b2'
+ '49379121974a6f273084f66c6aa937fd2213e92169040db03f87098d3ca269032603f3dbfec947807e3d4a3c866648b96a2a3bb18f1ad3736a7ceaf011cf901a'
+ '7db84774b72fb330abe2116f3d1d842c007820c200344d76ff87abab5226488fcc21d2e82cbe5381fb3e7ce0eacc09232f17d64c4e2a5ee8eef0be06808f21ff'
+ '6dd8079a1dddc787d41fea246809e37de76a6e6daa2e3760c4a6770456fd1d8097597cadeae38fd81f322d44e79f0786e82604d606bc81bae57f39091db0755c')
+
+prepare() {
+ #cd "bamf-${_actual_ver}${_extra_ver}"
+
+ sed -i 's/-Werror/-Wno-error/g' configure.ac
+}
+
+build() {
+ #cd "bamf-${_actual_ver}${_extra_ver}"
+
+ gtkdocize
+ autoreconf -vfi
+
+ export PYTHON=/usr/bin/python2
+
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --disable-static \
+ --enable-gtk-doc \
+ --enable-export-actions-menu=yes
+
+ make
+}
+
+package() {
+ #cd "bamf-${_actual_ver}${_extra_ver}"
+
+ make DESTDIR="${pkgdir}/" install
+
+ install -m755 ../update-bamf-index.pl "${pkgdir}"/usr/lib/bamf/
+ install -m755 ../update-bamf-index.sh "${pkgdir}"/usr/lib/bamf/
+ install -dm755 "${pkgdir}"/usr/share/libalpm/hooks/
+ install -m644 ../update-bamf-index.hook "${pkgdir}"/usr/share/libalpm/hooks/
+
+ rm -rv "${pkgdir}"/usr/share/upstart/
+}
diff --git a/bamf-ubuntu.install b/bamf-ubuntu.install
new file mode 100644
index 000000000000..1dc976a9526e
--- /dev/null
+++ b/bamf-ubuntu.install
@@ -0,0 +1,31 @@
+generate_index() {
+ if [[ ! -f usr/share/applications/bamf.index ]]; then
+ echo 'Generating initial BAMF index'
+ usr/lib/bamf/update-bamf-index.sh
+ fi
+}
+
+disable_service() {
+ systemctl stop bamfwatcher &>/dev/null || :
+ systemctl disable bamfwatcher &>/dev/null || :
+}
+
+post_install() {
+ generate_index
+}
+
+post_upgrade() {
+ generate_index
+}
+
+pre_upgrade() {
+ disable_service
+}
+
+pre_remove() {
+ disable_service
+}
+
+post_remove() {
+ rm -f usr/share/applications/bamf.index
+}
diff --git a/update-bamf-index.hook b/update-bamf-index.hook
new file mode 100644
index 000000000000..d8baa71ae2d5
--- /dev/null
+++ b/update-bamf-index.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/applications/*.desktop
+
+[Action]
+Description = Updating BAMF index...
+When = PostTransaction
+Exec = /usr/lib/bamf/update-bamf-index.sh
diff --git a/update-bamf-index.pl b/update-bamf-index.pl
new file mode 100644
index 000000000000..6af14ebe2d8f
--- /dev/null
+++ b/update-bamf-index.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+# This is a copy of the perl script in bamfdaemon.postinst from Ubuntu's bamf
+# packaging
+
+use File::Find;
+
+my $dir_name;
+
+sub strip_exec {
+ my $f = $_;
+ return unless $f =~ /\.desktop$/;
+ return unless ("$File::Find::dir" eq "$dir_name");
+ my @lines;
+ open F, $f;
+ @lines = <F>;
+ close F;
+ my $in_desktop_entry = 0;
+ foreach (@lines) {
+ if (/^\[\s*(.+)\s*\]/) {
+ $in_desktop_entry = ($1 eq "Desktop Entry");
+ }
+ if (/^Exec=(.+)$/ && $in_desktop_entry) {
+ print "$f\t$1\n";
+ }
+ }
+}
+
+$dir_name = $ARGV[-1];
+$dir_name = $1 if ($dir_name =~ /(.*)\/$/);
+find (\&strip_exec, $dir_name);
diff --git a/update-bamf-index.sh b/update-bamf-index.sh
new file mode 100644
index 000000000000..d1e397964fd3
--- /dev/null
+++ b/update-bamf-index.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/lib/bamf/update-bamf-index.pl /usr/share/applications/ > /usr/share/applications/bamf.index