Yo! Here is my most important contribution! I wonder if it will be perfect at the first time⦠I'm waiting for your answer. Bye, Kooda.
>From 1ffc071871e41c6b95a8ce5da3e92e7039f578b1 Mon Sep 17 00:00:00 2001 From: Kooda <[email protected]> Date: Wed, 7 Apr 2010 22:22:48 +0200 Subject: [PATCH] prosody-0.6.1-1-i686
* New package --- source/network-extra/prosody/FrugalBuild | 29 +++++++ source/network-extra/prosody/prosody.cfg.lua | 116 ++++++++++++++++++++++++++ source/network-extra/prosody/prosody.install | 42 +++++++++ source/network-extra/prosody/rc.prosody | 48 +++++++++++ 4 files changed, 235 insertions(+), 0 deletions(-) create mode 100644 source/network-extra/prosody/FrugalBuild create mode 100644 source/network-extra/prosody/prosody.cfg.lua create mode 100644 source/network-extra/prosody/prosody.install create mode 100644 source/network-extra/prosody/rc.prosody diff --git a/source/network-extra/prosody/FrugalBuild b/source/network-extra/prosody/FrugalBuild new file mode 100644 index 0000000..4aa0b25 --- /dev/null +++ b/source/network-extra/prosody/FrugalBuild @@ -0,0 +1,29 @@ +# Compiling Time: 0 SBU +# Maintainer: nick <n...@email> +# Contributor: Kooda <[email protected]> + +pkgname=prosody +pkgver=0.6.1 +pkgrel=1 +pkgdesc="Prosody is a light and fast XMPP server." +url="http://prosody.im/" +depends=('luafilesystem' 'luaexpat' 'luasec') +groups=('network-extra') +archs=('i686' 'x86_64') +up2date="Flasttar $url/downloads/source/" +source=($url/downloads/source/$pkgname-$pkgver.tar.gz \ + 'prosody.cfg.lua' \ + 'rc.prosody') + +sha1sums=('fc11c01d5f871295981ec1aa0e8c6d25e7dbf355' \ + 'f7ab243d7d5ce940821772a216488332044b445d' \ + 'd5b5b5dfd4b67edf855e27d6b7881449f13632fa') + +install=$pkgname.install +backup=(etc/prosody.cfg.lua) + +build() +{ + Fbuild + Fcp prosody.cfg.lua etc/ +} diff --git a/source/network-extra/prosody/prosody.cfg.lua b/source/network-extra/prosody/prosody.cfg.lua new file mode 100644 index 0000000..771bb29 --- /dev/null +++ b/source/network-extra/prosody/prosody.cfg.lua @@ -0,0 +1,116 @@ +-- Prosody Example Configuration File +-- +-- If it wasn't already obvious, -- starts a comment, and all +-- text after it on a line is ignored by Prosody. +-- +-- The config is split into sections, a global section, and one +-- for each defined host that we serve. You can add as many host +-- sections as you like. +-- +-- Lists are written { "like", "this", "one" } +-- Lists can also be of { 1, 2, 3 } numbers, and other things. +-- Either commas, or semi-colons; may be used +-- as seperators. +-- +-- A table is a list of values, except each value has a name. An +-- example table would be: +-- +-- ssl = { key = "keyfile.key", certificate = "certificate.cert" } +-- +-- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so +-- can +-- be placed anywhere that you deem fitting. +-- +-- Tip: You can check that the syntax of this file is correct when you have finished +-- by running: luac -p prosody.cfg.lua +-- If there are any errors, it will let you know what and where they are, otherwise it +-- will keep quiet. +-- +-- Good luck, and happy Jabbering! + +-- Server-wide settings go in this section +Host "*" + + -- This is a (by default, empty) list of accounts that are admins + -- for the server. Note that you must create the accounts separately + -- (see http://prosody.im/doc/creating_accounts for info) + -- Example: admins = { "[email protected]", "[email protected]" } + admins = { } + + -- This is the list of modules Prosody will load on startup. + -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too. + modules_enabled = { + -- Generally required + "roster"; -- Allow users to have a roster. Recommended ;) + "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. + "tls"; -- Add support for secure TLS on c2s/s2s connections + "dialback"; -- s2s dialback support + "disco"; -- Service discovery + + -- Not essential, but recommended + "private"; -- Private XML storage (for room bookmarks, etc.) + "vcard"; -- Allow users to set vCards + + -- Nice to have + "legacyauth"; -- Legacy authentication. Only used by some old clients and bots. + "version"; -- Replies to server version requests + "uptime"; -- Report how long server has been running + "time"; -- Let others know the time here on this server + "ping"; -- Replies to XMPP pings with pongs + "pep"; -- Enables users to publish their mood, activity, playing music and more + "register"; -- Allow users to register on this server using a client and change passwords + + -- Other specific functionality + "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. (do not comment this line) + --"console"; -- telnet to port 5582 (needs console_enabled = true) + --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" + --"httpserver"; -- Serve static files from a directory over HTTP + }; + + -- These modules are auto-loaded, should you + -- for (for some mad reason) want to disable + -- them then uncomment them below + modules_disabled = { + -- "presence"; + -- "message"; + -- "iq"; + }; + + -- Do not change these four lines, they are used by the prosody's startup script { + pidfile = "/var/run/prosody.pid" + setuid = 54 + setgid = 54 + umask = "007" + -- } + + -- Disable account creation by default, for security + -- For more information see http://prosody.im/doc/creating_accounts + allow_registration = false; + + -- These are the SSL/TLS-related settings. If you don't want + -- to use SSL/TLS, you may comment or remove this + ssl = { + key = "/etc/certs/localhost.key"; + certificate = "/etc/certs/localhost.cert"; + } + +-- This allows clients to connect to localhost. No harm in it. +Host "localhost" + +-- Section for example.com +-- (replace example.com with your domain name) +Host "example.com" + + enabled = false -- This will disable the host, preserving the config, but denying connections + + -- Assign this host a certificate for TLS, otherwise it would use the one + -- set in the global section (if any). + -- Note that old-style SSL on port 5223 only supports one certificate, and will always + -- use the global one. + ssl = { + key = "/etc/certs/example.com.key"; + certificate = "/etc/certs/example.com.crt"; + } + +-- Set up a MUC (multi-user chat) room server on conference.example.com: +Component "conference.example.com" "muc" diff --git a/source/network-extra/prosody/prosody.install b/source/network-extra/prosody/prosody.install new file mode 100644 index 0000000..c5c2863 --- /dev/null +++ b/source/network-extra/prosody/prosody.install @@ -0,0 +1,42 @@ +post_install() +{ + if ! grep -q 'prosody' /etc/group; then + #create group + /usr/sbin/groupadd -g 54 prosody 2>/dev/null + fi + + if ! grep -q 'prosody' /etc/shadow; then + #create user + /usr/sbin/useradd -s /bin/false -c "daemon system user prosody" -d /var/lib/prosody -u 54 -g prosody prosody 2>/dev/null + fi + + # Fix permissions + chown -R prosody:prosody /var/lib/prosody + chmod -R 0660 /var/lib/prosody + rm -f /var/run/prosody.pid + + echo "==> Don't forget to change /etc/prosody.cfg.lua when needed" + echo " -> For more informations about prosody's configurtion, please take a look at :" + echo " -> http://prosody.im/doc" + echo + echo "==> If you want to add or delete JIDs you have to be in the 'prosody' group" + echo " -> You can do it with this command : 'usermod -aG prosody $USER'" + echo + echo "==>To start the daemon, type 'service prosody start'" + echo " ->To automaticly start the daemon at boot time, type 'service prosody add'" +} + +post_upgrade() +{ + post_install +} + +pre_remove() +{ + service prosody stop + service prosody del +} + +op=$1 +shift +$op $* diff --git a/source/network-extra/prosody/rc.prosody b/source/network-extra/prosody/rc.prosody new file mode 100644 index 0000000..c67528f --- /dev/null +++ b/source/network-extra/prosody/rc.prosody @@ -0,0 +1,48 @@ +#!/bin/bash +# (c) 2010 Kooda <[email protected]> +# rc.prosody for Frugalware +# distributed under GPL License +# chkconfig: 2345 85 15 +# description: Start and stop Prosody daemon, a light and fast XMPP server + +source /lib/initscripts/functions +daemon="Prosody" + +actions=(restart start status stop) + +pid="cat /var/run/prosody.pid 2>/dev/null" + +rc_start() +{ + start_msg + if [ -z "$(eval $pid)" ]; then + /usr/bin/prosody 1>/dev/null + ok $? + else + ok 999 + fi +} + +rc_stop() +{ + stop_msg + if [ ! -z "$(eval $pid)" ] ;then + kill "$(eval $pid)" 2> /dev/null 1> /dev/null + rm -f /var/run/prosody.pid + ok $? + else + ok 999 + fi +} + +rc_status() +{ + status_msg + if [ ! -z "$(eval $pid)" ] ;then + ok 997 + else + ok 998 + fi +} + +rc_exec $1 -- 1.7.0.4
_______________________________________________ Frugalware-devel mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-devel
