From 749d2e684cbb034cff718ca48dd8beb2e99151b6 Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Mon, 22 Aug 2016 07:32:16 +0000 Subject: community/prosody: moved from testing --- community/prosody/APKBUILD | 68 +++++++++++++++++++++++++++++++++ community/prosody/prosody.cfg.lua.patch | 34 +++++++++++++++++ community/prosody/prosody.initd | 47 +++++++++++++++++++++++ community/prosody/prosody.pre-install | 11 ++++++ community/prosody/prosodyctl.patch | 11 ++++++ testing/prosody/APKBUILD | 68 --------------------------------- testing/prosody/prosody.cfg.lua.patch | 34 ----------------- testing/prosody/prosody.initd | 47 ----------------------- testing/prosody/prosody.pre-install | 11 ------ testing/prosody/prosodyctl.patch | 11 ------ 10 files changed, 171 insertions(+), 171 deletions(-) create mode 100644 community/prosody/APKBUILD create mode 100644 community/prosody/prosody.cfg.lua.patch create mode 100644 community/prosody/prosody.initd create mode 100644 community/prosody/prosody.pre-install create mode 100644 community/prosody/prosodyctl.patch delete mode 100644 testing/prosody/APKBUILD delete mode 100644 testing/prosody/prosody.cfg.lua.patch delete mode 100644 testing/prosody/prosody.initd delete mode 100644 testing/prosody/prosody.pre-install delete mode 100644 testing/prosody/prosodyctl.patch diff --git a/community/prosody/APKBUILD b/community/prosody/APKBUILD new file mode 100644 index 0000000000..df2328550e --- /dev/null +++ b/community/prosody/APKBUILD @@ -0,0 +1,68 @@ +# Contributor: Mika Havela +# Maintainer: Francesco Colista +_luaver=5.1 +pkgname=prosody +pkgver=0.9.10 +pkgrel=4 +pkgdesc="Lua based Jabber/XMPP server" +url="http://prosody.im/" +arch="all" +license="MIT" +depends="lua${_luaver}-socket lua${_luaver}-expat lua${_luaver}-filesystem + lua${_luaver}-sec lua${_luaver} lua" +makedepends="linux-headers lua${_luaver}-dev libidn-dev openssl-dev" +install="prosody.pre-install" +subpackages="$pkgname-doc" +pkgusers="prosody" +pkggroups="prosody" +source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz + $pkgname.cfg.lua.patch + ${pkgname}ctl.patch + $pkgname.initd + " + +builddir="$srcdir/$pkgname-$pkgver" + +build() { + cd "$builddir" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/prosody \ + --ostype=linux \ + --with-lua=/usr/bin \ + --with-lua-lib=/usr/lib \ + --with-lua-include=/usr/include \ + --runwith=lua${_luaver} \ + --no-example-certs \ + || return 1 + + # Don't generate certs + rm -f "$builddir"/certs/Makefile + + make || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 + + install -d -o prosody -g prosody "$pkgdir/var/log/prosody" || return 1 + install -d -o prosody -g prosody "$pkgdir/var/run/prosody" || return 1 + install -d -m750 -o prosody -g prosody "$pkgdir/var/lib/prosody" \ + || return 1 + + install -D -m755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname" +} + +md5sums="ef6d4a9e6dcae577eb52f7277d7beac5 prosody-0.9.10.tar.gz +b839353efd51b724723f0f4293f76bfb prosody.cfg.lua.patch +ce986894862bab749ca4b46afacf72d2 prosodyctl.patch +413897e00f00c58bb8cbe59736291ef8 prosody.initd" +sha256sums="4836eefed4d9bbb632cba24ac5bd8e9bc7c029a79d06084b00ffc70858d1662f prosody-0.9.10.tar.gz +8653ccb14a0a5e27fee95b5baf412158543f619f6ca54fd7630c8d333ddddadd prosody.cfg.lua.patch +33bb4fd12ecd1376bba5602d8db8bbdfb2913e6ddc348b58e0e4877125b8b433 prosodyctl.patch +aaad1d10168e27e10ced38963d5bbeb0c7988bf58a2e74f02a103a3318047e1d prosody.initd" +sha512sums="4453fb596704b6a248a52dedc00cfc77edbee1fad502f1197b04c2148092389a294c152c3ba36203f51831d51ee2b915c15382ac86fcff4f35696ecacf926574 prosody-0.9.10.tar.gz +950d9b53887d859b7d64986ba3817f92fb45ed1b653998759458156197b9623f1cc240559da071e20992f7aa497ef37d422da2168aa5b3c4ea3946482d160f41 prosody.cfg.lua.patch +96657034ad754ea974222639c45770a1d10f13fe91ed493ab3329382666e2de14807d203105c7a200236875f0d430f7356a0ac8bd624d4859e80eabfbeefc205 prosodyctl.patch +11b0f5e4fa488e047c26aa5e51c35983100cdbf7ebbf7c8b6d003c8db7f52e797f93e4744d54b3094c82d722d5e4de62b5734376cb5e69a4c6127f8cb07a4347 prosody.initd" diff --git a/community/prosody/prosody.cfg.lua.patch b/community/prosody/prosody.cfg.lua.patch new file mode 100644 index 0000000000..444eeb6f82 --- /dev/null +++ b/community/prosody/prosody.cfg.lua.patch @@ -0,0 +1,34 @@ +diff -wbBur prosody-0.9.0.q/prosody.cfg.lua.dist prosody-0.9.0/prosody.cfg.lua.dist +--- prosody-0.9.0.q/prosody.cfg.lua.dist 2013-08-19 23:37:36.000000000 +0400 ++++ prosody-0.9.0/prosody.cfg.lua.dist 2013-08-21 16:17:49.175521891 +0400 +@@ -11,6 +11,8 @@ + -- The only thing left to do is rename this file to remove the .dist ending, and fill in the + -- blanks. Good luck, and happy Jabbering! + ++daemonize = true ++pidfile = "/var/run/prosody/prosody.pid" + + ---------- Server-wide settings ---------- + -- Settings in this section apply to the whole server and are the default settings +@@ -63,7 +65,7 @@ + --"http_files"; -- Serve static files from a directory over HTTP + + -- Other specific functionality +- --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. ++ "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. + --"groups"; -- Shared roster support + --"announce"; -- Send announcement to all online users + --"welcome"; -- Welcome users who register accounts +@@ -139,9 +141,9 @@ + -- Logging configuration + -- For advanced logging see http://prosody.im/doc/logging + log = { +- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging +- error = "prosody.err"; +- -- "*syslog"; -- Uncomment this for logging to syslog ++ -- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging ++ -- error = "prosody.err"; ++ "*syslog"; -- Uncomment this for logging to syslog + -- "*console"; -- Log to the console, useful for debugging with daemonize=false + } + diff --git a/community/prosody/prosody.initd b/community/prosody/prosody.initd new file mode 100644 index 0000000000..c0557bd812 --- /dev/null +++ b/community/prosody/prosody.initd @@ -0,0 +1,47 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="Prosody is a server for prosody/XMPP written in Lua." +description_reload="Reload configuration and reopen log files." +extra_started_commands="reload" +pidfile="/var/run/prosody/prosody.pid" + +depend() { + use dns + need net + provide prosody-server +} + +checkconfig() { + if [ ! -e /etc/prosody/prosody.cfg.lua ] ; then + eerror "You need a /etc/prosody/prosody.cfg.lua file to run prosody" + return 1 + fi + luac -p /etc/prosody/prosody.cfg.lua + return $? +} + +start() { + checkconfig || return 1 + checkpath -q -d -m 0770 -o prosody:prosody "$(dirname ${pidfile})" + checkpath -q -f -m 0770 -o prosody:prosody "${pidfile}" + checkpath -q -d -m 0750 -o prosody:prosody /var/log/prosody + ebegin "Starting Prosody XMPP Server" + prosodyctl start + eend $? +} + +stop() { + ebegin "Stopping Prosody XMPP Server" + prosodyctl stop + eend $? +} + +reload() { + checkconfig || return 1 + ebegin "Reloading configuration of Prosody XMPP Server" + prosodyctl reload + eend $? +} diff --git a/community/prosody/prosody.pre-install b/community/prosody/prosody.pre-install new file mode 100644 index 0000000000..39d9cfadda --- /dev/null +++ b/community/prosody/prosody.pre-install @@ -0,0 +1,11 @@ +#!/bin/sh + +addgroup -S prosody 2>/dev/null +adduser -S -D \ + -h /var/lib/prosody \ + -s /sbin/nologin \ + -G prosody \ + -g "Prosody XMPP Server" \ + prosody 2>/dev/null + +exit 0 diff --git a/community/prosody/prosodyctl.patch b/community/prosody/prosodyctl.patch new file mode 100644 index 0000000000..18333dd524 --- /dev/null +++ b/community/prosody/prosodyctl.patch @@ -0,0 +1,11 @@ +--- prosody-0.9.10.q/prosodyctl ++++ prosody-0.9.10/prosodyctl +@@ -244,7 +244,7 @@ + local modulemanager = require "core.modulemanager" + + local prosodyctl = require "util.prosodyctl" +-require "socket" ++local socket = require "socket" + ----------------------- + + -- FIXME: Duplicate code waiting for util.startup diff --git a/testing/prosody/APKBUILD b/testing/prosody/APKBUILD deleted file mode 100644 index df2328550e..0000000000 --- a/testing/prosody/APKBUILD +++ /dev/null @@ -1,68 +0,0 @@ -# Contributor: Mika Havela -# Maintainer: Francesco Colista -_luaver=5.1 -pkgname=prosody -pkgver=0.9.10 -pkgrel=4 -pkgdesc="Lua based Jabber/XMPP server" -url="http://prosody.im/" -arch="all" -license="MIT" -depends="lua${_luaver}-socket lua${_luaver}-expat lua${_luaver}-filesystem - lua${_luaver}-sec lua${_luaver} lua" -makedepends="linux-headers lua${_luaver}-dev libidn-dev openssl-dev" -install="prosody.pre-install" -subpackages="$pkgname-doc" -pkgusers="prosody" -pkggroups="prosody" -source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz - $pkgname.cfg.lua.patch - ${pkgname}ctl.patch - $pkgname.initd - " - -builddir="$srcdir/$pkgname-$pkgver" - -build() { - cd "$builddir" - ./configure \ - --prefix=/usr \ - --sysconfdir=/etc/prosody \ - --ostype=linux \ - --with-lua=/usr/bin \ - --with-lua-lib=/usr/lib \ - --with-lua-include=/usr/include \ - --runwith=lua${_luaver} \ - --no-example-certs \ - || return 1 - - # Don't generate certs - rm -f "$builddir"/certs/Makefile - - make || return 1 -} - -package() { - cd "$builddir" - make DESTDIR="$pkgdir" install || return 1 - - install -d -o prosody -g prosody "$pkgdir/var/log/prosody" || return 1 - install -d -o prosody -g prosody "$pkgdir/var/run/prosody" || return 1 - install -d -m750 -o prosody -g prosody "$pkgdir/var/lib/prosody" \ - || return 1 - - install -D -m755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname" -} - -md5sums="ef6d4a9e6dcae577eb52f7277d7beac5 prosody-0.9.10.tar.gz -b839353efd51b724723f0f4293f76bfb prosody.cfg.lua.patch -ce986894862bab749ca4b46afacf72d2 prosodyctl.patch -413897e00f00c58bb8cbe59736291ef8 prosody.initd" -sha256sums="4836eefed4d9bbb632cba24ac5bd8e9bc7c029a79d06084b00ffc70858d1662f prosody-0.9.10.tar.gz -8653ccb14a0a5e27fee95b5baf412158543f619f6ca54fd7630c8d333ddddadd prosody.cfg.lua.patch -33bb4fd12ecd1376bba5602d8db8bbdfb2913e6ddc348b58e0e4877125b8b433 prosodyctl.patch -aaad1d10168e27e10ced38963d5bbeb0c7988bf58a2e74f02a103a3318047e1d prosody.initd" -sha512sums="4453fb596704b6a248a52dedc00cfc77edbee1fad502f1197b04c2148092389a294c152c3ba36203f51831d51ee2b915c15382ac86fcff4f35696ecacf926574 prosody-0.9.10.tar.gz -950d9b53887d859b7d64986ba3817f92fb45ed1b653998759458156197b9623f1cc240559da071e20992f7aa497ef37d422da2168aa5b3c4ea3946482d160f41 prosody.cfg.lua.patch -96657034ad754ea974222639c45770a1d10f13fe91ed493ab3329382666e2de14807d203105c7a200236875f0d430f7356a0ac8bd624d4859e80eabfbeefc205 prosodyctl.patch -11b0f5e4fa488e047c26aa5e51c35983100cdbf7ebbf7c8b6d003c8db7f52e797f93e4744d54b3094c82d722d5e4de62b5734376cb5e69a4c6127f8cb07a4347 prosody.initd" diff --git a/testing/prosody/prosody.cfg.lua.patch b/testing/prosody/prosody.cfg.lua.patch deleted file mode 100644 index 444eeb6f82..0000000000 --- a/testing/prosody/prosody.cfg.lua.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -wbBur prosody-0.9.0.q/prosody.cfg.lua.dist prosody-0.9.0/prosody.cfg.lua.dist ---- prosody-0.9.0.q/prosody.cfg.lua.dist 2013-08-19 23:37:36.000000000 +0400 -+++ prosody-0.9.0/prosody.cfg.lua.dist 2013-08-21 16:17:49.175521891 +0400 -@@ -11,6 +11,8 @@ - -- The only thing left to do is rename this file to remove the .dist ending, and fill in the - -- blanks. Good luck, and happy Jabbering! - -+daemonize = true -+pidfile = "/var/run/prosody/prosody.pid" - - ---------- Server-wide settings ---------- - -- Settings in this section apply to the whole server and are the default settings -@@ -63,7 +65,7 @@ - --"http_files"; -- Serve static files from a directory over HTTP - - -- Other specific functionality -- --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. -+ "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. - --"groups"; -- Shared roster support - --"announce"; -- Send announcement to all online users - --"welcome"; -- Welcome users who register accounts -@@ -139,9 +141,9 @@ - -- Logging configuration - -- For advanced logging see http://prosody.im/doc/logging - log = { -- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging -- error = "prosody.err"; -- -- "*syslog"; -- Uncomment this for logging to syslog -+ -- info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging -+ -- error = "prosody.err"; -+ "*syslog"; -- Uncomment this for logging to syslog - -- "*console"; -- Log to the console, useful for debugging with daemonize=false - } - diff --git a/testing/prosody/prosody.initd b/testing/prosody/prosody.initd deleted file mode 100644 index c0557bd812..0000000000 --- a/testing/prosody/prosody.initd +++ /dev/null @@ -1,47 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -description="Prosody is a server for prosody/XMPP written in Lua." -description_reload="Reload configuration and reopen log files." -extra_started_commands="reload" -pidfile="/var/run/prosody/prosody.pid" - -depend() { - use dns - need net - provide prosody-server -} - -checkconfig() { - if [ ! -e /etc/prosody/prosody.cfg.lua ] ; then - eerror "You need a /etc/prosody/prosody.cfg.lua file to run prosody" - return 1 - fi - luac -p /etc/prosody/prosody.cfg.lua - return $? -} - -start() { - checkconfig || return 1 - checkpath -q -d -m 0770 -o prosody:prosody "$(dirname ${pidfile})" - checkpath -q -f -m 0770 -o prosody:prosody "${pidfile}" - checkpath -q -d -m 0750 -o prosody:prosody /var/log/prosody - ebegin "Starting Prosody XMPP Server" - prosodyctl start - eend $? -} - -stop() { - ebegin "Stopping Prosody XMPP Server" - prosodyctl stop - eend $? -} - -reload() { - checkconfig || return 1 - ebegin "Reloading configuration of Prosody XMPP Server" - prosodyctl reload - eend $? -} diff --git a/testing/prosody/prosody.pre-install b/testing/prosody/prosody.pre-install deleted file mode 100644 index 39d9cfadda..0000000000 --- a/testing/prosody/prosody.pre-install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -addgroup -S prosody 2>/dev/null -adduser -S -D \ - -h /var/lib/prosody \ - -s /sbin/nologin \ - -G prosody \ - -g "Prosody XMPP Server" \ - prosody 2>/dev/null - -exit 0 diff --git a/testing/prosody/prosodyctl.patch b/testing/prosody/prosodyctl.patch deleted file mode 100644 index 18333dd524..0000000000 --- a/testing/prosody/prosodyctl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- prosody-0.9.10.q/prosodyctl -+++ prosody-0.9.10/prosodyctl -@@ -244,7 +244,7 @@ - local modulemanager = require "core.modulemanager" - - local prosodyctl = require "util.prosodyctl" --require "socket" -+local socket = require "socket" - ----------------------- - - -- FIXME: Duplicate code waiting for util.startup -- cgit v1.2.3