summaryrefslogtreecommitdiff
path: root/pkgs/lua-cyrussasl
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lua-cyrussasl')
-rw-r--r--pkgs/lua-cyrussasl/ChangeLog6
-rw-r--r--pkgs/lua-cyrussasl/PKGBUILD41
-rw-r--r--pkgs/lua-cyrussasl/lua-cyrussasl.patch37
3 files changed, 84 insertions, 0 deletions
diff --git a/pkgs/lua-cyrussasl/ChangeLog b/pkgs/lua-cyrussasl/ChangeLog
new file mode 100644
index 0000000..040d526
--- /dev/null
+++ b/pkgs/lua-cyrussasl/ChangeLog
@@ -0,0 +1,6 @@
+2010-02-15 Dwayne Bent <dbb.1@liqd.org>
+
+ * PKGBUILD, lua-cyrussasl.patch:
+ Initial commit
+ [521419e11ffd] [tip]
+
diff --git a/pkgs/lua-cyrussasl/PKGBUILD b/pkgs/lua-cyrussasl/PKGBUILD
new file mode 100644
index 0000000..17bd091
--- /dev/null
+++ b/pkgs/lua-cyrussasl/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Dwayne Bent <dbb.1@liqd.org>
+
+pkgname=lua-cyrussasl-git
+pkgver=20100215
+pkgrel=1
+pkgdesc="Lua bindings for Cyrus SASL library."
+arch=('i686' 'x86_64')
+url="http://github.com/JorjBauer/lua-cyrussasl"
+license=('BSD')
+depends=('lua>=5.1' 'libsasl')
+makedepends=('git')
+provides=('lua-cyrussasl')
+source=("lua-cyrussasl.patch")
+md5sums=('5b5c15e4cba63d05a5bfd1cc3ddcba0f')
+
+_giturl='git://github.com/JorjBauer/lua-cyrussasl.git'
+_gitlocal='lua-cyrussasl'
+
+build() {
+ _getsrc || return 1
+
+ cd $_gitlocal
+
+ mkdir -p "$pkgdir/usr/lib/lua/5.1" || return 1
+ mkdir -p "$pkgdir/usr/share/licenses/lua-cyrussasl" || return 1
+
+ patch -p1 < "$srcdir/lua-cyrussasl.patch" || return 1
+ make DESTDIR=${pkgdir} install || return 1
+
+ install -m644 "LICENSE" "$pkgdir/usr/share/licenses/lua-cyrussasl/LICENSE"
+}
+
+_getsrc() {
+ if [ -d $_gitlocal ]; then
+ msg "Updating source files..."
+ pushd $_gitlocal && git pull origin && popd || return 1
+ else
+ msg "Cloning source files..."
+ git clone --depth 1 $_giturl $_gitlocal || return 1
+ fi
+}
diff --git a/pkgs/lua-cyrussasl/lua-cyrussasl.patch b/pkgs/lua-cyrussasl/lua-cyrussasl.patch
new file mode 100644
index 0000000..5309e5a
--- /dev/null
+++ b/pkgs/lua-cyrussasl/lua-cyrussasl.patch
@@ -0,0 +1,37 @@
+diff --git a/Makefile b/Makefile
+index 9c696ab..37057da 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,12 +4,18 @@
+ #LUAPATH=/usr/share/lua/5.1
+ #CPATH=/usr/lib/lua/5.1
+
++# Linux (Arch Linux)
++CFLAGS=-g -O2 -fpic -I/usr/include
++LDFLAGS=-O -shared -fpic -lsasl2
++LUAPATH=/usr/share/lua/5.1
++CPATH=/usr/lib/lua/5.1
++
+ # MacOS
+-CFLAGS=-g -Wall -O2
+-LDFLAGS=-bundle -undefined dynamic_lookup -lsasl2
+-MACOSX_VERSION=10.5
+-LUAPATH=/usr/local/share/lua/5.1
+-CPATH=/usr/local/lib/lua/5.1
++#CFLAGS=-g -Wall -O2
++#LDFLAGS=-bundle -undefined dynamic_lookup -lsasl2
++#MACOSX_VERSION=10.5
++#LUAPATH=/usr/local/share/lua/5.1
++#CPATH=/usr/local/lib/lua/5.1
+
+ #########################################################
+ #
+@@ -26,7 +32,7 @@ OBJS=cyrussasl.o luaabstract.o context.o
+ all: $(TARGET)
+
+ install: $(TARGET)
+- cp $(TARGET) $(CPATH)
++ cp $(TARGET) $(DESTDIR)$(CPATH)
+
+ clean:
+ rm -f *.o *.so *~