summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Munch-Ellingsen2017-09-12 10:59:59 +0200
committerPeter Munch-Ellingsen2017-09-12 11:20:36 +0200
commit3c02425f9b612355a0999af0ff2b1a93044e1b71 (patch)
tree576ec04ac1bd93d57e0e6f57c5c841038a4ecbce
parent0007fc7c077b6d82edb2ca67422286b4045e508e (diff)
downloadaur-3c02425f9b612355a0999af0ff2b1a93044e1b71.tar.gz
Updated to work with v3 of xlunch
-rw-r--r--PKGBUILD30
-rw-r--r--xlunch-conf-gen.hook2
-rw-r--r--xlunch-conf-install.hook2
-rw-r--r--xlunch-conf-remove.hook2
-rw-r--r--[-rwxr-xr-x]xlunch-create-entry43
5 files changed, 15 insertions, 64 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e40e0e0ed2bb..553f204d9f42 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,25 @@
-# Maintainer: Maxim Kurnosenko <asusx2@mail.ru>
+# Maintainer: Peter Munch-Ellingsen <peterme@peterme.net>
_pkgname=xlunch
pkgname=xlunch-git
-pkgver=2.4.2.r54.gcf29d5c
+pkgver=3.0.0.r0.g69e8a65
pkgrel=3
-pkgdesc="Graphical app launcher for X with little dependencies"
+pkgdesc="Graphical app launcher for X with few dependencies"
arch=('i686' 'x86_64')
url="http://xlunch.org/"
license=('GPL3')
depends=('sh' 'libx11' 'imlib2')
-makedepends=('git' 'gcc' 'make')
+makedepends=('git' 'gcc' 'make' 'sed' 'grep')
provides=('xlunch')
conflicts=('xlunch')
source=('git+https://github.com/Tomas-M/xlunch.git'
- 'xlunch-create-entry'
'xlunch-conf-gen.hook'
'xlunch-conf-install.hook'
'xlunch-conf-remove.hook')
md5sums=('SKIP'
- 'ad3366bef069a51927779b8736bf85b9'
- '5cedcafe1ba39961a84f1634958ca478'
- 'ccaf7547b8ceeb11badb2a08b3c592f7'
- '832317d10246dd7b2ac17c599b19f441')
+ '309c9c1b92ed8ffd48b93d8f9f8270a8'
+ '3986350c123f26415684cb1cabe33cb0'
+ '7bc2cc30625750d62739d028c3b439b4')
pkgver() {
cd "$_pkgname"
@@ -30,18 +28,14 @@ pkgver() {
build() {
cd "$_pkgname"
- make xlunch
+ make xlunch
}
package() {
cd "$srcdir/$_pkgname"
- install -Dm755 xlunch "$pkgdir"/usr/bin/xlunch
- install -Dm755 extra/genconf "$pkgdir"/usr/bin/xlunch-genconf
- install -Dm755 extra/sample_config.cfg "$pkgdir"/etc/xlunch/icons.conf
- install -Dm755 ../xlunch-create-entry "$pkgdir"/usr/bin/xlunch-create-entry
+ make DESTDIR="$pkgdir/" install
- install -Dm644 extra/ghost.png "$pkgdir"/usr/share/icons/hicolor/48x48/apps/xlunch_ghost.png
- install -Dm644 ../xlunch-conf-gen.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-gen.hook
- install -Dm644 ../xlunch-conf-install.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-install.hook
- install -Dm644 ../xlunch-conf-remove.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-remove.hook
+ install -Dm644 ../xlunch-conf-gen.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-gen.hook
+ install -Dm644 ../xlunch-conf-install.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-install.hook
+ install -Dm644 ../xlunch-conf-remove.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-remove.hook
}
diff --git a/xlunch-conf-gen.hook b/xlunch-conf-gen.hook
index bb9f5b9b63ca..066069e1d357 100644
--- a/xlunch-conf-gen.hook
+++ b/xlunch-conf-gen.hook
@@ -6,5 +6,5 @@ Target = usr/bin/xlunch
[Action]
Description = Generating new xlunch icons.conf
-Exec = bin/sh -c 'xlunch-genconf > /etc/xlunch/icons.conf'
+Exec = bin/bash -c 'genentries -p "/usr/share/xlunch/svgicons" > /etc/xlunch/entries.dsv'
When = PostTransaction
diff --git a/xlunch-conf-install.hook b/xlunch-conf-install.hook
index fb6b0661e65f..290830f6d0f2 100644
--- a/xlunch-conf-install.hook
+++ b/xlunch-conf-install.hook
@@ -6,6 +6,6 @@ Target = usr/share/applications/*
[Action]
Description = Updating xlunch icons.conf...
-Exec = bin/bash -c 'while read -r f; do xlunch-create-entry "$f" >> /etc/xlunch/icons.conf; cat /etc/xlunch/icons.conf | sort | uniq > /etc/xlunch/icons-new.conf; mv /etc/xlunch/icons-new.conf /etc/xlunch/icons.conf; done 2>/dev/null'
+Exec = bin/bash -c 'while read -r f; do genentries -p "/usr/share/xlunch/svgicons" -f "$f" >> /etc/xlunch/entries.dsv; cat /etc/xlunch/entries.dsv | sort | uniq > /etc/xlunch/entries_new.dsv; mv /etc/xlunch/entries_new.dsv /etc/xlunch/entries.dsv; done 2>/dev/null'
When = PostTransaction
NeedsTargets
diff --git a/xlunch-conf-remove.hook b/xlunch-conf-remove.hook
index 91c92db8fb62..857336d852f0 100644
--- a/xlunch-conf-remove.hook
+++ b/xlunch-conf-remove.hook
@@ -5,6 +5,6 @@ Target = usr/share/applications/*
[Action]
Description = Updating xlunch icons.conf...
-Exec = bin/bash -c 'while read -r f; do grep -v "$(xlunch-create-entry '$f')" /etc/xlunch/icons.conf > /etc/xlunch/icons-new.conf; if [ -n "$(cat /etc/xlunch/icons-new.conf)" ]; then mv /etc/xlunch/icons-new.conf /etc/xlunch/icons.conf; fi; done'
+Exec = bin/bash -c 'while read -r f; do grep -v "$(genentries -p /usr/share/xlunch/svgicons -f '$f')" /etc/xlunch/entries.dsv > /etc/xlunch/entries-new.dsv; if [ -n "$(cat /etc/xlunch/entries-new.dsv)" ]; then mv /etc/xlunch/entries-new.dsv /etc/xlunch/entries.dsv; fi; done'
When = PreTransaction
NeedsTargets
diff --git a/xlunch-create-entry b/xlunch-create-entry
index 46fc2d4179d2..e69de29bb2d1 100755..100644
--- a/xlunch-create-entry
+++ b/xlunch-create-entry
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-APPS=/usr/share/applications
-PIXMAPS=/usr/share/pixmaps
-ICONS=/usr/share/icons
-SIZE=48
-
-echo "/$1" | grep ".desktop" | while read DESKTOPFILE; do
- FDATA="$(cat $DESKTOPFILE)"
- NAME="$(echo "$FDATA" | grep -i "^Name=" | head -n 1 | cut -d "=" -f 2-)"
- EXEC="$(echo "$FDATA" | grep -i "^Exec=" | head -n 1 | cut -d "=" -f 2-)"
- ICONNAME="$(echo "$FDATA" | grep -i "^Icon=" | head -n 1 | cut -d "=" -f 2-)"
- USETERM="$(echo "$FDATA" | grep -i "^Terminal=" | head -n 1 | cut -d "=" -f 2-)"
- if [ "$USETERM" = "true" ]; then
- EXEC="$TERM -e ""$EXEC"
- fi
-
- if [ "$ICONNAME" != "" ]; then
- ICON="$(find "$PIXMAPS" | grep $ICONNAME"[.]png$" | head -n 1)"
- if [ "$ICON" == "" ]; then
- ICON="$(find "$ICONS" | grep $SIZE"x"$SIZE | grep $ICONNAME"[.]png$" | head -n 1)"
- fi
-
- if [ "$ICON" == "" ]; then
- ICON="$(find "$ICONS" | grep "scalable" | grep -E $ICONNAME"[.]png$" | head -n 1)"
- if [ "$ICON" == "" ]; then
- SVGICON="$(find "$ICONS" | grep "scalable" | grep -E $ICONNAME"[.]svg$" | head -n 1)"
- if type convert >/dev/null 2>&1; then
- if [ "$SVGICON" != "" ]; then
- mkdir -p "svgicons"
- convert -size $SIZEx$SIZE -background none "$SVGICON" "svgicons/"$ICONNAME".png"
- ICON="svgicons/"$ICONNAME".png"
- fi
- else
- ICON=$SVGICON
- fi
- fi
- fi
- if [ "$ICON" != "" -a "$EXEC" != "" -a "$NAME" != "" ]; then
- echo "$NAME;$ICON;$EXEC"
- fi
- fi
-done | sort | uniq