From 1a69fbaf0d09f31a191a113823afaa8339f8fd00 Mon Sep 17 00:00:00 2001
From: Tom Willemse <tom@ryuslash.org>
Date: Wed, 5 Jun 2013 01:23:21 +0200
Subject: [PATCH] Add clark-git

---
 clark-git/PKGBUILD      | 36 ++++++++++++++++++++++++++++++++++++
 clark-git/clark.install | 14 ++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 clark-git/PKGBUILD
 create mode 100644 clark-git/clark.install

diff --git a/clark-git/PKGBUILD b/clark-git/PKGBUILD
new file mode 100644
index 0000000..0031fdb
--- /dev/null
+++ b/clark-git/PKGBUILD
@@ -0,0 +1,36 @@
+_name=clark
+pkgname=$_name-git
+pkgver=20130604
+pkgrel=1
+pkgdesc="Store bookmarks, in common lisp."
+arch=('x86_64')
+url="http://code.ryuslash.org/cgit.cgi/clark/about/"
+license=('GPL3')
+depends=('cl-sqlite' 'sbcl')
+source=("git://ryuslash.org/clark.git")
+md5sums=('SKIP')
+options=(!strip)
+install=clark.install
+
+pkgver()
+{
+    cd "$srcdir"/"$_name"
+    git log -1 --pretty=format:"%cd" --date=short | sed s/-//g
+}
+
+prepare() {
+    cd "$srcdir/$_name/lisp"
+    sed -i "s/^\(LISP.*\)/\1 --no-userinit --eval \"(require :sb-posix)\"/" Makefile
+}
+
+build()
+{
+    cd "$srcdir/$_name"
+    make
+}
+
+package()
+{
+    cd "$srcdir/$_name"
+    make install DESTDIR="$pkgdir/usr/" LISP="sbcl --no-userinit"
+}
diff --git a/clark-git/clark.install b/clark-git/clark.install
new file mode 100644
index 0000000..a9653f4
--- /dev/null
+++ b/clark-git/clark.install
@@ -0,0 +1,14 @@
+INFO_DIR=/usr/share/info
+
+post_install() {
+    install-info $INFO_DIR/clark.info.gz $INFO_DIR/dir 2> /dev/null
+}
+
+post_upgrade() {
+    post_install $1
+}
+
+pre_remove() {
+    install-info --delete $INFO_DIR/clark.info.gz $INFO_DIR/dir \
+        2> /dev/null
+}