New package: xlunch-2.4.2

This commit is contained in:
Michael Aldridge 2017-05-16 00:54:58 -05:00
parent 76ab165f37
commit a520f2a8d4
4 changed files with 67 additions and 0 deletions

34
srcpkgs/xlunch/INSTALL Normal file
View file

@ -0,0 +1,34 @@
# This file is originally called 'genconf' in the src, but it needs to
# run on the machine that this actually gets installed on, so it will
# be an install script here...
case "$ACTION" in
pre)
;;
post)
APPS=/usr/share/applications
ICONS=/usr/share/icons/hicolor
SIZE=48
echo "generating config file from $APPS ..." >&2
find $APPS | fgrep .desktop | while read DESKTOPFILE; do
NAME="$(cat $DESKTOPFILE | egrep -i "^Name=" | head -n 1 | cut -d "=" -f 2-)"
EXEC="$(cat $DESKTOPFILE | egrep -i "^Exec=" | head -n 1 | cut -d "=" -f 2-)"
ICON="$(cat $DESKTOPFILE | egrep -i "^Icon=" | head -n 1 | cut -d "=" -f 2-)"
TERM="$(cat $DESKTOPFILE | egrep -i "^Terminal=" | head -n 1 | cut -d "=" -f 2-)"
if [ "$TERM" = "true" ]; then
EXEC="xterm -e ""$EXEC"
fi
if [ "$ICON" != "" ]; then
ICON=$(find "$ICONS" | grep $SIZE"x"$SIZE | grep $ICON"[.]png" | head -n 1)
if [ "$ICON" != "" -a "$EXEC" != "" -a "$NAME" != "" ]; then
echo "$NAME;$ICON;$EXEC"
fi
fi
done | sort | uniq > etc/xlunch/icons.conf
;;
esac

View file

@ -0,0 +1,9 @@
--- Makefile.orig 2017-05-16 00:48:25.302317545 -0500
+++ Makefile 2017-05-16 00:47:47.801022135 -0500
@@ -1,5 +1,5 @@
CC = gcc
-LDFLAGS = -lImlib2 -lX11
+override LDFLAGS += -lImlib2 -lX11
CFLAGS ?= -O2 -s
all: xlunch icons.conf

View file

@ -0,0 +1,12 @@
--- xlunch.c.orig 2017-05-17 21:38:59.048445309 -0500
+++ xlunch.c 2017-05-17 21:39:41.334944291 -0500
@@ -27,6 +27,9 @@
#include <sys/file.h>
#include <errno.h>
+/* file I/O stuff */
+#include <fcntl.h>
+
/* some globals for our window & X display */
Display *disp;
Window win;

12
srcpkgs/xlunch/template Normal file
View file

@ -0,0 +1,12 @@
# Template file for 'xlunch'
pkgname=xlunch
version=2.4.2
revision=1
build_style=gnu-makefile
makedepends="libX11-devel imlib2-devel"
short_desc="Graphical app launcher for X with little dependencies"
maintainer="Michael Aldridge <aldridge.mac@gmail.com>"
license="GPL-3"
homepage="http://xlunch.org/"
distfiles="https://github.com/Tomas-M/xlunch/archive/v${version}.tar.gz"
checksum=daedfeba280ed5748e4ab77c82baf147236211d0a70501ba6eca3c4729face34