Subject: [alpine-devel] testing/luasec: new apkbuild

From: "Mika Havela" <[email-masked]>
Date: Wed, 10 Jun 2009 15:23:54 +0000

Please review and apply.
luasec is used by prosody.

<<mhavela>>

From 68cd7f771b2b6fdf576803a4e57d4deb18620c55 Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Wed, 10 Jun 2009 15:20:19 +0000
Subject: [PATCH] testing/luasec: new apkbuild
 Lua bindings for OpenSSL library to provide TLS/SSL communication.
 It's used by prosody for encrypted XMPP.
 http://luasec.luaforge.net/

---
 testing/luasec/APKBUILD           |   27 +++++++++++++++++++++++++++
 testing/luasec/Makefile-0.3.patch |   27 +++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 testing/luasec/APKBUILD
 create mode 100644 testing/luasec/Makefile-0.3.patch

diff --git a/testing/luasec/APKBUILD b/testing/luasec/APKBUILD
new file mode 100644
index 0000000..46f3652
--- /dev/null
+++ b/testing/luasec/APKBUILD
@@ -0,0 +1,27 @@
+# Contributor: Mika Havela <[email-masked]>
+# Maintainer: Mika Havela <[email-masked]>
+pkgname=luasec
+pkgver=0.3.2
+pkgrel=0
+pkgdesc="Lua bindings for OpenSSL library to provide TLS/SSL communication."
+url="http://luasec.luaforge.net/"
+license="MIT"
+depends="lua luasocket"
+makedepends="lua-dev"
+install=
+#subpackages="$pkgname-doc $pkgname-dev"
+source="http://luaforge.net/frs/download.php/4059/luasec-0.3.2.tar.gz
+	Makefile-0.3.patch"
+
+build() {
+	cd "$srcdir/$pkgname-$pkgver"
+	patch Makefile "$startdir/Makefile-0.3.patch" || return 1
+
+	make linux || return 1
+	make DESTDIR="$pkgdir" install
+
+	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+md5sums="ee74c2578a1eb594b889eeba7a3b57f0  luasec-0.3.2.tar.gz
+035470beaabeb26fd16b30c706ed4e8e  Makefile-0.3.patch"
diff --git a/testing/luasec/Makefile-0.3.patch b/testing/luasec/Makefile-0.3.patch
new file mode 100644
index 0000000..6e5ef03
--- /dev/null
+++ b/testing/luasec/Makefile-0.3.patch
@@ -0,0 +1,27 @@
+--- Makefile	2008-11-21 01:37:00.000000000 +0200
++++ Makefile1	2008-11-29 23:23:03.980507871 +0200
+@@ -1,11 +1,11 @@
+ # Inform the location to intall the modules
+-LUAPATH=/usr/local/share/lua/5.1
+-CPATH=/usr/local/lib/lua/5.1
++LUAPATH=${DESTDIR}/usr/share/lua/5.1
++CPATH=${DESTDIR}/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=-I/usr/include -I/usr/include/openssl
++LIBDIR=-L/usr/lib
+ 
+ # For Mac OS X: set the system version
+ MACOSX_VERSION=10.4
+@@ -26,6 +26,8 @@
+ 	@echo "  * macosx"
+ 
+ install:
++	mkdir -p ${LUAPATH}
++	mkdir -p ${CPATH}
+ 	@cd src ; $(MAKE) CPATH="$(CPATH)" LUAPATH="$(LUAPATH)" install
+ 
+ linux:
-- 
1.6.2.5

---

From: Michael Mason <[email-masked]>
Date: Wed, 10 Jun 2009 23:16:05 +0000

> luasec is used by prosody.
Applied Patch.
Added openssl-dev to make depends and the build worked.

> <0001-testing-luasec-new-apkbuild.patch>

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 11 Jun 2009 09:23:30 +0200

> Added openssl-dev to make depends and the build worked.

Michael,

Thanks alot for merging those patches. Makes life alot easier for me.

A tip though... Please use 'git am' to import patches. Then will Mika
Havela show up as author rather than you. If you have a fix for the
patch then you make a new commit.

Also, when you are the author, the commit will get a different commit id
and when Mika pulls your tree (or from main aports tre after I have
merged it) git will see this commit as a different commit which
conflicts with his own and he have to deal with a conflict.

If you use git-am, the commit id will remain, and Mika's git will figure
out that its the same commit and he will only merge your final changes
(separate commits) on top of his own and he does not have to deal with
any conflict.

http://www.kernel.org/pub/software/scm/git/docs/git-am.html

Thanks!

-nc

---