dcallagh-exheres

My personal Exherbo repository
git clone https://code.djc.id.au/git/dcallagh-exheres/
commit ff80583e5b7c9f3dabb4b4c8304a7ed004079787
parent 8e6381dece4b832cc114813b9665489853a7900e
Author: Dan Callaghan <djc@djc.id.au>
Date:   Mon,  4 Jul 2011 20:36:35 +1000

luasec

Diffstat:
Apackages/dev-lua/luasec/files/luasec-0.4.1-paths.patch | 36++++++++++++++++++++++++++++++++++++
Apackages/dev-lua/luasec/luasec-0.4.1.exheres-0 | 32++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 0 deletions(-)
diff --git a/packages/dev-lua/luasec/files/luasec-0.4.1-paths.patch b/packages/dev-lua/luasec/files/luasec-0.4.1-paths.patch
@@ -0,0 +1,36 @@
+diff -ur luasec-0.4.1.orig/Makefile luasec-0.4.1/Makefile
+--- luasec-0.4.1.orig/Makefile	2011-03-02 13:09:20.000000000 +1000
++++ luasec-0.4.1/Makefile	2011-07-04 20:24:22.344395091 +1000
+@@ -1,11 +1,11 @@
+ # Inform the location to intall the modules
+-LUAPATH=/usr/local/share/lua/5.1
+-LUACPATH=/usr/local/lib/lua/5.1
++LUAPATH=/usr/share/lua/5.1
++LUACPATH=/usr/lib/lua/5.1
+ 
+ # Edit the lines below to inform new path, if necessary
+ #
+-#INCDIR=-I/usr/local/lua-5.1/include -I/usr/local/openssl-0.9.8/include
+-#LIBDIR=-L/usr/local/openssl-0.9.8/lib -R/usr/local/openssl-0.9.8/lib
++INCDIR=$(shell pkg-config --cflags-only-I lua openssl)
++LIBDIR=$(shell pkg-config --libs-only-L lua openssl)
+ 
+ # For Mac OS X: set the system version
+ MACOSX_VERSION=10.4
+diff -ur luasec-0.4.1.orig/src/Makefile luasec-0.4.1/src/Makefile
+--- luasec-0.4.1.orig/src/Makefile	2011-03-02 13:09:20.000000000 +1000
++++ luasec-0.4.1/src/Makefile	2011-07-04 20:27:13.144619139 +1000
+@@ -33,10 +33,9 @@
+ all:
+ 
+ install: $(CMOD) $(LMOD)
+-	mkdir -p $(LUAPATH)/ssl
+-	cp $(CMOD) $(LUACPATH)
+-	cp $(LMOD) $(LUAPATH)
+-	cp https.lua $(LUAPATH)/ssl
++	install -D -m0755 $(CMOD) $(DESTDIR)$(LUACPATH)/$(CMOD)
++	install -D -m0644 $(LMOD) $(DESTDIR)$(LUAPATH)/$(LMOD)
++	install -D -m0644 https.lua $(DESTDIR)$(LUAPATH)/ssl/https.lua
+ 
+ linux:
+ 	@$(MAKE) $(CMOD) MYCFLAGS="$(LNX_CFLAGS)" MYLDFLAGS="$(LNX_LDFLAGS)"
diff --git a/packages/dev-lua/luasec/luasec-0.4.1.exheres-0 b/packages/dev-lua/luasec/luasec-0.4.1.exheres-0
@@ -0,0 +1,32 @@
+# Copyright 2011 Dan Callaghan <djc@djc.id.au>
+# Distributed under the terms of the GNU General Public License v2
+
+SUMMARY="Lua bindings for OpenSSL"
+DESCRIPTION="
+LuaSec is a binding for OpenSSL library to provide TLS/SSL communication. It takes an already 
+established TCP connection and creates a secure session between the peers.
+"
+HOMEPAGE="http://www.inf.puc-rio.br/~brunoos/luasec/"
+DOWNLOADS="http://www.inf.puc-rio.br/~brunoos/luasec/download/${PNV}.tar.gz"
+UPSTREAM_CHANGELOG="http://www.inf.puc-rio.br/~brunoos/luasec/ChangeLog.txt"
+
+LICENCES="MIT"
+SLOT="0"
+PLATFORMS="~amd64 ~x86"
+
+DEPENDENCIES="
+    build+run:
+        dev-lang/lua
+        dev-libs/openssl
+    run:
+        dev-lua/luasocket
+"
+
+BUGS_TO="djc@djc.id.au"
+
+DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}/${PNV}-paths.patch" )
+
+src_compile() {
+    emake linux
+}
+