dzen2: Add recipe for dzen2, a small messaging/menu program.
authorAlex Ferguson <thoughtmonster@gmail.com>
Sat, 30 Oct 2010 18:42:22 +0000 (21:42 +0300)
committerKristoffer Ericson <kristoffer.ericson@gmail.com>
Wed, 3 Nov 2010 15:51:13 +0000 (16:51 +0100)
* Added Makefile, which adds the INCS and LIBS variables due to the
  way OE handles CFLAGS and LDFLAGS.

* Added dzen-extras.tar.gz which adds a launcher script containing
  several functions (including time display, memory usage, cpu usage
  and battery status) for use of dzen as a panel application, along
  with some other required scripts and images.

Signed-off-by: Alex Ferguson <thoughtmonster@gmail.com>
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
recipes/dzen2/dzen2_svn.bb [new file with mode: 0644]
recipes/dzen2/files/Makefile [new file with mode: 0644]
recipes/dzen2/files/dzen-extras.tar.gz [new file with mode: 0644]

diff --git a/recipes/dzen2/dzen2_svn.bb b/recipes/dzen2/dzen2_svn.bb
new file mode 100644 (file)
index 0000000..5ba54dd
--- /dev/null
@@ -0,0 +1,35 @@
+DESCRIPTION = "dzen is a general purpose messaging, notification and menu program."
+LICENSE = "MIT"
+DEPENDS = "virtual/libx11 libxft"
+
+SRCREV = "271"
+PV = "0.8.5+svnr${SRCPV}"
+PR = "r0"
+
+SRC_URI = "svn://dzen.googlecode.com/svn/;module=trunk;proto=http \
+          file://dzen-extras.tar.gz \
+          file://Makefile"
+
+S = "${WORKDIR}/trunk"
+
+FILES_${PN} = "/usr/bin /usr/share/dzen"
+
+do_configure() {
+       install -m 0644 ${WORKDIR}/Makefile ${S}/Makefile
+       cat <<EOF > config.mk
+VERSION = ${PV}
+
+PREFIX = /usr
+MANPREFIX = /usr/share/man
+
+INCS = -DDZEN_XFT -DVERSION=\"${PV}\" `pkg-config --cflags xft` 
+LIBS = -lc -lX11 `pkg-config --libs xft`
+EOF
+}
+
+do_install() {
+       oe_runmake install DESTDIR=${D}
+}
+
+SRC_URI[md5sum] = "5978620c2124c8a8ad52d7f17ce94fd7"
+SRC_URI[sha256sum] = "5e4ce96e8ed22a4a0ad6cfafacdde0532d13d049d77744214b196c4b2bcddff9"
diff --git a/recipes/dzen2/files/Makefile b/recipes/dzen2/files/Makefile
new file mode 100644 (file)
index 0000000..47096da
--- /dev/null
@@ -0,0 +1,57 @@
+# dzen2 
+#   (C)opyright MMVII Robert Manea
+
+include config.mk
+
+SRC = draw.c main.c util.c action.c
+OBJ = ${SRC:.c=.o}
+
+all: options dzen2
+
+options:
+       @echo dzen2 build options:
+       @echo "CFLAGS   = ${CFLAGS} ${INCS}"
+       @echo "LDFLAGS  = ${LDFLAGS} ${LIBS}"
+       @echo "CC       = ${CC}"
+
+.c.o:
+       @echo CC $<
+       @${CC} -c ${CFLAGS} ${INCS} $<
+
+${OBJ}: dzen.h action.h config.mk
+
+dzen2: ${OBJ}
+       @echo CC -o $@
+       @${CC} -o $@ ${OBJ} ${LDFLAGS} ${LIBS}
+
+clean:
+       @echo cleaning
+       @rm -f dzen2 ${OBJ} dzen2-${VERSION}.tar.gz
+
+dist: clean
+       @echo creating dist tarball
+       @mkdir -p dzen2-${VERSION}
+       @cp -R LICENSE Makefile README config.mk action.h dzen.h ${SRC} dzen2-${VERSION}
+       @tar -cf dzen2-${VERSION}.tar dzen2-${VERSION}
+       @gzip dzen2-${VERSION}.tar
+       @rm -rf dzen2-${VERSION}
+
+install: all
+       @echo installing executables to ${DESTDIR}${PREFIX}/bin
+       @mkdir -p ${DESTDIR}${PREFIX}/bin
+       @cp -f dzen2 ${DESTDIR}${PREFIX}/bin
+       @chmod 755 ${DESTDIR}${PREFIX}/bin/dzen2
+       @cp -f dzen-launcher ${DESTDIR}${PREFIX}/bin
+       @chmod 755 ${DESTDIR}${PREFIX}/bin/dzen-launcher
+       @echo installing scripts to ${DESTDIR}${PREFIX}/share/dzen
+       @mkdir -p ${DESTDIR}${PREFIX}/share/dzen
+       @cp -f scripts/* ${DESTDIR}${PREFIX}/share/dzen
+       @echo installing images to ${DESTDIR}${PREFIX}/share/dzen/images
+       @mkdir -p ${DESTDIR}${PREFIX}/share/dzen/images
+       @cp -f images/* ${DESTDIR}${PREFIX}/share/dzen/images
+
+uninstall:
+       @echo removing executable file from ${DESTDIR}${PREFIX}/bin
+       @rm -f ${DESTDIR}${PREFIX}/bin/dzen2
+
+.PHONY: all options clean dist install uninstall
diff --git a/recipes/dzen2/files/dzen-extras.tar.gz b/recipes/dzen2/files/dzen-extras.tar.gz
new file mode 100644 (file)
index 0000000..91a41c9
Binary files /dev/null and b/recipes/dzen2/files/dzen-extras.tar.gz differ