summaryrefslogtreecommitdiff
path: root/luasec-prosody-git/PKGBUILD
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2013-07-06 22:40:16 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2013-07-06 22:40:16 +0200
commit9592e15e6009a672e754b32bf743c35b0e894e8c (patch)
tree7c290912bb13600a4edfd22b132da1f7e0ff44b9 /luasec-prosody-git/PKGBUILD
parent0ea9632ab33ba179fb3a5d6a3cbeb91972257308 (diff)
downloadarch-packages-9592e15e6009a672e754b32bf743c35b0e894e8c.tar.gz
add luasec-prosody
Diffstat (limited to 'luasec-prosody-git/PKGBUILD')
-rw-r--r--luasec-prosody-git/PKGBUILD67
1 files changed, 67 insertions, 0 deletions
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: