jlime: Add several small jlime-specific recipes.
authorAlex Ferguson <thoughtmonster@gmail.com>
Sat, 30 Oct 2010 18:42:34 +0000 (21:42 +0300)
committerKristoffer Ericson <kristoffer.ericson@gmail.com>
Wed, 3 Nov 2010 15:51:19 +0000 (16:51 +0100)
* Added fileselector-1.0, a simple file-selector in C and SDL.

* Added fnkey-1.0, which is used to emulate a Mode_Shift + Shift
  keypress using xdotool on pressing the Fn key. This is mainly for
  the ben-nanonote, and is hackish, but works.

* Added gtk-engine-industrial for gtk-1.2, since we still use gtk-1.2
  applications in jlime, and gtk-1.2 looks ugly by default. This helps.

* Added jlime-extras, a package which adds several files (initscripts,
  configuration files, other support files), some of which replace
  files found in other packages.

Signed-off-by: Alex Ferguson <thoughtmonster@gmail.com>
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
recipes/jlime/fileselector_1.0.bb [new file with mode: 0644]
recipes/jlime/fnkey-1.0/fnkey.c [new file with mode: 0644]
recipes/jlime/fnkey_1.0.bb [new file with mode: 0644]
recipes/jlime/gtk-engine-industrial_0.2.36.bb [new file with mode: 0644]
recipes/jlime/jlime-extras_1.0.bb [new file with mode: 0644]

diff --git a/recipes/jlime/fileselector_1.0.bb b/recipes/jlime/fileselector_1.0.bb
new file mode 100644 (file)
index 0000000..5f07335
--- /dev/null
@@ -0,0 +1,15 @@
+DESCRIPTION = "Fileselector is an SDL-based file chooser dialog"
+LICENSE = "GPLv2"
+PR = "r0"
+
+DEPENDS = "virtual/libsdl libsdl-ttf"
+RDEPENDS = "ttf-dejavu-sans-condensed"
+
+SRC_URI = "http://jlime.com/downloads/development/software/fileselector-1.0.tar.gz"
+
+do_install() {
+       oe_runmake install DESTDIR=${D}
+}
+
+SRC_URI[md5sum] = "7dc2f18a52778c3277cafc23ffdd4022"
+SRC_URI[sha256sum] = "d9be5ad183b55aa9af50e89b04de591a488dfc8d1d756e01e13fe183e0a168e7"
diff --git a/recipes/jlime/fnkey-1.0/fnkey.c b/recipes/jlime/fnkey-1.0/fnkey.c
new file mode 100644 (file)
index 0000000..6163562
--- /dev/null
@@ -0,0 +1,41 @@
+#include <linux/input.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#define FNKEY 29 /* key code */
+
+int main(int argc, char **argv)
+{
+       int fd;
+       int mode = 0; /* 0 unpressed ; 2 pressed */
+
+       if(argc < 2) {
+               printf("usage: %s <device>\n", argv[0]);
+               return 1;
+       }
+
+       fd = open(argv[1], O_RDONLY);
+       struct input_event ev;
+
+       while (1) {
+               read(fd, &ev, sizeof(struct input_event));
+
+               if ((ev.type == 1) && (ev.code == FNKEY)) {
+                       if (((ev.value == 2) || (ev.value == 1)) && (mode == 0)) { /* PRESSED */
+                               system("xdotool keydown Mode_switch; xdotool keydown SHIFT");
+                               /* printf("system press\n"); */
+                               mode = 2;
+                       } else if ((ev.value == 0) && (mode == 2)) { /* KEY UP */
+                               system("xdotool keyup Mode_switch; xdotool keyup SHIFT");
+                               /* printf("system unpress\n"); */
+                               mode = 0;
+                       }
+                       /* printf("key %i state %i\n", ev.code, ev.value); */
+
+               }
+       }
+}
+
diff --git a/recipes/jlime/fnkey_1.0.bb b/recipes/jlime/fnkey_1.0.bb
new file mode 100644 (file)
index 0000000..fc09eeb
--- /dev/null
@@ -0,0 +1,17 @@
+DESCRIPTION = "Emulates Fn key by simulating multiple keypresses."
+LICENSE = "GPLv2"
+PR = "r0"
+
+RDEPENDS = "xdotool"
+
+SRC_URI = "file://fnkey.c"
+
+do_compile() {
+       mv ${WORKDIR}/fnkey.c ${S}
+       ${CC} -o fnkey fnkey.c -I${STAGING_INCDIR} -L${STAGING_LIBDIR}
+}
+
+do_install() {
+       install -d ${D}${bindir}
+       install -m 755 fnkey ${D}${bindir}
+}
diff --git a/recipes/jlime/gtk-engine-industrial_0.2.36.bb b/recipes/jlime/gtk-engine-industrial_0.2.36.bb
new file mode 100644 (file)
index 0000000..4c98354
--- /dev/null
@@ -0,0 +1,16 @@
+DESCRIPTION = "Industrial is a flat looking theme engine for GTK+ 1.x"
+LICENSE = "GPLv2"
+PR = "r0"
+
+DEPENDS = "gtk+-1.2"
+
+SRC_URI = "http://jlime.com/downloads/development/software/gtk-engine-industrial-0.2.36.tar.gz"
+
+FILES_${PN} = "/etc/gtk /usr/lib/gtk/themes/engines /usr/share/themes"
+
+do_install() {
+       oe_runmake install DESTDIR=${D}
+}
+
+SRC_URI[md5sum] = "88513408ab24c5a97cacc9ff55e79d2d"
+SRC_URI[sha256sum] = "a8ccf2c029490bcef947359635622674ef00e9b873e37fc5fee728f71c2a8b07"
diff --git a/recipes/jlime/jlime-extras_1.0.bb b/recipes/jlime/jlime-extras_1.0.bb
new file mode 100644 (file)
index 0000000..2ce37df
--- /dev/null
@@ -0,0 +1,15 @@
+DESCRIPTION = "Various extras for the Jlime userlands"
+PR = "r0"
+
+PACKAGE_ARCH = "all"
+SRC_URI = "http://jlime.com/downloads/development/software/jlime-extras-1.0.tar.gz"
+
+FILES_${PN} = "/etc /usr"
+
+do_install() {
+       install -d ${D}
+       cp -R etc usr ${D}
+}
+
+SRC_URI[md5sum] = "6593cd0509c0f79b091d6b15a92ff65d"
+SRC_URI[sha256sum] = "66800f009e3de2c0541f1d5a6be498fa4b2941f73405fe90d6f4c1b34ca5d2c6"