summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--README.rst2
-rw-r--r--luasec-prosody-git/PKGBUILD67
-rw-r--r--luasec-prosody-git/luasec-prosody.patch13
4 files changed, 86 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d9429da..8b846e5 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,10 @@
SLNUNICODE = slnunicode-git
LUAMD5 = lua-md5-git
SWIG = swig-git
+LUASEC = luasec-prosody-git
# collections
-PKGS = $(SLNUNICODE) $(LUAMD5) $(SWIG)
+PKGS = $(SLNUNICODE) $(LUAMD5) $(SWIG) $(LUASEC)
VERFY = $(PKGS:%=verify-%)
SOURCE = $(PKGS:%=source-%)
@@ -37,6 +38,7 @@ $(SOURCE):
slnunicode: $(SLNUNICODE)
luamd5: $(LUAMD5)
swig: $(SWIG)
+luasec: $(LUASEC)
info:
@echo settings:
@@ -49,6 +51,6 @@ info:
@echo "all verify source"
@echo
@echo package targets:
- @echo "slnunicode" "luamd5" "swig"
+ @echo "slnunicode" "luamd5" "swig" "luasec"
.PHONY: info all $(PKGS) clean $(VERFY) source $(SOURCE)
diff --git a/README.rst b/README.rst
index d240290..e284570 100644
--- a/README.rst
+++ b/README.rst
@@ -28,6 +28,7 @@ Currently comprises development versions of these packages:
(#) LuaMD5_. (``lua-md5-git``)
(#) `Selene Unicode`_ (``slnunicode-git``)
+(#) `Luase Prosody`_ (``luasec-prosody-git``)
(#) SWIG_ (``swig-git``)
.. _ArchLinux: https://www.archlinux.org
@@ -35,5 +36,6 @@ Currently comprises development versions of these packages:
.. _LuaMD5: https://aur.archlinux.org/packages/lua-md5-git/
.. _Selene Unicode: https://aur.archlinux.org/packages/slnunicode-git
.. _SWIG: https://aur.archlinux.org/packages/swig-git
+.. _Luasec Prosody`: https://aur.archlinux.org/packages/luasec-prosody-git
.. _me: mailto:phg42.2a@gmail.com
diff --git a/luasec-prosody-git/PKGBUILD b/luasec-prosody-git/PKGBUILD
new file mode 100644
index 0000000..2f86469
--- /dev/null
+++ b/luasec-prosody-git/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer: Philipp Gesang <phg42.2a@gmail.com>
+
+pkgname=luasec-prosody-git
+_gitname=luasec
+_gitbranch=master
+pkgver=19.063e8a8
+pkgrel=1
+pkgdesc="A fork of LuaSec, an SSL and crypto library for Lua."
+arch=("i686" "x86_64")
+url="https://github.com/brunoos/luasec/wiki"
+license=("MIT")
+groups=()
+depends=("lua" "openssl")
+makedepends=("git")
+provides=("luasec")
+conflicts=("luasec-hg")
+#install=
+source=("${_gitname}::git+https://github.com/brunoos/${_gitname}#branch=${_gitbranch}"
+ "luasec-prosody.patch") # build for Lua 5.2
+noextract=()
+sha512sums=("SKIP"
+ "38fcf53127e9b65ab79f68f5813fcf3149943c9abfe7e506ac7b67d00c9bc982dbd75c2c8faaf7dd0f248c67598f0292128b701e2a98ab1a4d0c47190191038a")
+
+pkgver() {
+ cd "${_gitname}"
+ echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+build() {
+ cd "${srcdir}"
+ msg "Connecting to GIT server ..."
+
+ if [[ -d "${_gitname}" ]]; then
+ cd "${_gitname}" && git pull origin
+ msg "The local files are updated."
+ else
+ git clone "${_gitroot}" "${_gitname}"
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting build ..."
+
+ rm -rf "${srcdir}/${_gitname}-build"
+ git clone "${srcdir}/${_gitname}" "${srcdir}/${_gitname}-build"
+ cd "${srcdir}/${_gitname}-build"
+
+ msg "Rewrite paths in Makefile to build for Lua 5.2"
+ git apply "${srcdir}/luasec-prosody.patch"
+
+ ## build
+ msg "Compile for target \"linux\""
+ if [[ "${LDFLAGS}" =~ "-Wl" ]]
+ then
+ msg "Fixing LDFLAGS (remove \"-Wl\")"
+ LDFLAGS=${LDFLAGS/-Wl,/}
+ echo "LDFLAGS=\"${LDFLAGS}\""
+ fi
+ make linux
+}
+
+package() {
+ cd "${srcdir}/${_gitname}-build"
+ make DESTDIR="${pkgdir}/" install
+ install -Dm0644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/luasec-prosody-git/luasec-prosody.patch b/luasec-prosody-git/luasec-prosody.patch
new file mode 100644
index 0000000..41d007f
--- /dev/null
+++ b/luasec-prosody-git/luasec-prosody.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index c8aa90f..31e27c8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ # Inform the location to intall the modules
+-LUAPATH ?= /usr/share/lua/5.1
+-LUACPATH ?= /usr/lib/lua/5.1
++LUAPATH ?= /usr/share/lua/5.2
++LUACPATH ?= /usr/lib/lua/5.2
+
+ # Compile with build-in LuaSocket's help files.
+ # Comment this lines if you will link with non-internal LuaSocket's help files