Subject: [alpine-devel] unstable/prosody: Patching APKBUILD

From: "Mika Havela" <[email-masked]>
Date: Fri, 05 Jun 2009 12:07:36 +0000

Got APKBUILD doing the Makefile patching
Executing/installing the pre/post/init.d scripts

This package seems to work. I suggest we move it to testing (after doing this commit).

<<mhavela>>

From fd4dacfa73a70364cc9597f570634153abb48732 Mon Sep 17 00:00:00 2001
From: Mika Havela <[email-masked]>
Date: Fri, 5 Jun 2009 12:03:07 +0000
Subject: [PATCH] unstable/prosody: patching APKBUILD
 Need APKBUILD to execute the patches
 Various scripts are now executed.
 PID-file seems to work too.

---
 unstable/prosody/APKBUILD |   40 +++++++++++++++++++++++++++++++---------
 1 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/unstable/prosody/APKBUILD b/unstable/prosody/APKBUILD
index 4cf10b2..efb9971 100644
--- a/unstable/prosody/APKBUILD
+++ b/unstable/prosody/APKBUILD
@@ -1,28 +1,50 @@
 # Contributor: Michael Mason <[email-masked]>
+# Contributor: Mika Havela <[email-masked]>
+# Maintainer: Mika Havela <[email-masked]>
 pkgname=prosody
 pkgver=0.4.2
 pkgrel=0
 pkgdesc="Lua based Jabber/XMPP server"
 url="http://prosody.im/"
-license="GPL"
-depends="uclibc lua libidn openssl"
-makedepends="lua-dev libidn-dev lua-dev openssl-dev"
-install=
+license="MIT"
+depends="uclibc lua libidn openssl luasocket luaexpat"
+makedepends="lua-dev libidn-dev openssl-dev"
+install="prosody.pre-install prosody.post-install"
 subpackages=""
-source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz"
+source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz
+	$pkgname.cfg.lua
+	$pkgname.initd
+	$install
+	Makefile-0.4.2.patch
+	"
 
 build() {
 	cd "$srcdir/$pkgname-$pkgver"
 
-	PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
-	
+	patch Makefile "$startdir/Makefile-0.4.2.patch" || return 1
+
 	./configure --prefix=/usr \
-		--sysconfdir=/etc
+		--sysconfdir=/etc/prosody \
+		--with-lua=/usr/bin \
+		--with-lua-lib=/usr/lib \
+		--with-lua-include=/usr/include
+	
 	make || return 1
 	make DESTDIR="$pkgdir" install
 
+	install -d "$pkgdir/var/log/prosody" || return 1
+	install -d "$pkgdir/var/run/prosody" || return 1
+	install -D -m755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname" || return 1
+	install -D -m644 "$startdir/prosody.cfg.lua" "$pkgdir/etc/prosody/prosody.cfg.lua" || return 1
+
+	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
 	# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
 	# install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
 }
 
-md5sums="2669478311b3a67522669acdf03cf85c  prosody-0.4.2.tar.gz"
+md5sums="2669478311b3a67522669acdf03cf85c  prosody-0.4.2.tar.gz
+f42039e5a342fe62cd7e491546338aaa  prosody.cfg.lua
+c161a875295b45241229eb6db65211e8  prosody.initd
+08484f183ba39233337d3fbc92cffadc  prosody.pre-install
+8202a40bf6de7cbacbaf76f2985aa220  prosody.post-install
+684d033dac42399a245c061c9a374e1b  Makefile-0.4.2.patch"
-- 
1.6.2.5

---

From: Michael Mason <[email-masked]>
Date: Sat, 6 Jun 2009 00:56:03 +0000

> This package seems to work. I suggest we move it to testing (after  

Applied patch
http://git.alpinelinux.org/cgit/aports-mmason/

> <0001-unstable-prosody-patching-APKBUILD.patch>

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