mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-11-21 08:15:01 -05:00
upgrade prosody to 0.11.9
This commit is contained in:
parent
09e3d9df8c
commit
34421dd345
38
src/prosody/.SRCINFO
Normal file
38
src/prosody/.SRCINFO
Normal file
@ -0,0 +1,38 @@
|
||||
pkgbase = prosody
|
||||
pkgdesc = Lightweight and extensible Jabber/XMPP server written in Lua
|
||||
pkgver = 0.11.9
|
||||
pkgrel = 1
|
||||
epoch = 1
|
||||
url = https://prosody.im/
|
||||
install = prosody.install
|
||||
arch = x86_64
|
||||
license = MIT
|
||||
depends = lua52
|
||||
depends = lua52-socket
|
||||
depends = lua52-expat
|
||||
depends = lua52-filesystem
|
||||
depends = libidn
|
||||
depends = openssl
|
||||
optdepends = lua52-sec: TLS encryption support
|
||||
optdepends = lua52-dbi: SQL storage support
|
||||
provides = prosody
|
||||
conflicts = prosody
|
||||
backup = etc/prosody/prosody.cfg.lua
|
||||
source = https://prosody.im/downloads/source/prosody-0.11.9.tar.gz
|
||||
source = https://prosody.im/downloads/source/prosody-0.11.9.tar.gz.asc
|
||||
source = prosody.tmpfile.d
|
||||
source = prosody.logrotated
|
||||
source = sysuser.conf
|
||||
source = prosody.service
|
||||
validpgpkeys = 32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE
|
||||
validpgpkeys = 3E52119EF853C59678DBBF6BADED9A77B67AD329
|
||||
validpgpkeys = C01A477A8F69E6E57F5C54CDE7AB958013F1F1D5
|
||||
sha256sums = ccc032aea49d858635fb93644db276de6812be83073a8d80e9b4508095deff09
|
||||
sha256sums = SKIP
|
||||
sha256sums = 0753bd9260f1cfdce6e18e01a61e320b396acfe9fca8ccf3250653bfa6af997e
|
||||
sha256sums = 5a2466b73bd069fb73be97a4e23b24e4c8dd1adb7db871cb8f5ab4094c1f967f
|
||||
sha256sums = e5c30ffbb066f0ed3444475b3313490c535d8c9df018726f6cecf9e3ddfd2e48
|
||||
sha256sums = ea34a3802e9a6b181cc1039eda48538fc9335c432223b225a8801d9d636f268c
|
||||
|
||||
pkgname = prosody
|
||||
|
99
src/prosody/PKGBUILD
Normal file
99
src/prosody/PKGBUILD
Normal file
@ -0,0 +1,99 @@
|
||||
# Maintainer: Daurnimator <daurnimator@archlinux.org>
|
||||
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||
# Old Maintainer: Dwayne Bent <dbb@dbb.io>
|
||||
# Old Maintainer: Tilman Vatteroth <tilman.vatteroth@uni-dortmund.de>
|
||||
# Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com>
|
||||
# Contributor: Timothée Ravier <tim@siosm.fr>
|
||||
# Contributor: Christoph Stahl <christoph.stahl@uni-dortmund.de>
|
||||
|
||||
pkgname=prosody
|
||||
epoch=1
|
||||
pkgrel=1
|
||||
pkgver=0.11.9
|
||||
pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua"
|
||||
arch=('x86_64')
|
||||
url="https://prosody.im/"
|
||||
license=('MIT')
|
||||
depends=('lua52'
|
||||
'lua52-socket'
|
||||
'lua52-expat'
|
||||
'lua52-filesystem'
|
||||
'libidn'
|
||||
'openssl')
|
||||
conflicts=('prosody')
|
||||
provides=('prosody')
|
||||
optdepends=('lua52-sec: TLS encryption support'
|
||||
# 'lua52-event: libevent support'
|
||||
'lua52-dbi: SQL storage support')
|
||||
install=prosody.install
|
||||
backup=('etc/prosody/prosody.cfg.lua')
|
||||
validpgpkeys=('32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE'
|
||||
'3E52119EF853C59678DBBF6BADED9A77B67AD329'
|
||||
'C01A477A8F69E6E57F5C54CDE7AB958013F1F1D5')
|
||||
source=("https://prosody.im/downloads/source/prosody-$pkgver.tar.gz"{,.asc}
|
||||
'prosody.tmpfile.d'
|
||||
'prosody.logrotated'
|
||||
'sysuser.conf'
|
||||
'prosody.service')
|
||||
sha256sums=('ccc032aea49d858635fb93644db276de6812be83073a8d80e9b4508095deff09'
|
||||
'SKIP'
|
||||
'0753bd9260f1cfdce6e18e01a61e320b396acfe9fca8ccf3250653bfa6af997e'
|
||||
'5a2466b73bd069fb73be97a4e23b24e4c8dd1adb7db871cb8f5ab4094c1f967f'
|
||||
'e5c30ffbb066f0ed3444475b3313490c535d8c9df018726f6cecf9e3ddfd2e48'
|
||||
'ea34a3802e9a6b181cc1039eda48538fc9335c432223b225a8801d9d636f268c')
|
||||
|
||||
prepare() {
|
||||
cd prosody-$pkgver
|
||||
|
||||
# disable logging to output and activate syslog
|
||||
sed -i s/"info = "/"-- info = "/g prosody.cfg.lua.dist
|
||||
sed -i s/"error = "/"-- error = "/g prosody.cfg.lua.dist
|
||||
sed -i s/"--\ \"\*syslog\"\;"/"\"*syslog\"\;"/g prosody.cfg.lua.dist
|
||||
|
||||
# add pidfile and daemonize
|
||||
# daemonize is important for systemd!
|
||||
mv prosody.cfg.lua.dist prosody.cfg.lua.old
|
||||
|
||||
echo --Important for systemd >> prosody.cfg.lua.dist
|
||||
echo -- daemonize is important for systemd. if you set this to false the systemd startup will freeze. >> prosody.cfg.lua.dist
|
||||
echo daemonize = true >> prosody.cfg.lua.dist
|
||||
echo 'pidfile = "/run/prosody/prosody.pid"'>> prosody.cfg.lua.dist
|
||||
echo "" >> prosody.cfg.lua.dist
|
||||
cat prosody.cfg.lua.old >> prosody.cfg.lua.dist
|
||||
rm prosody.cfg.lua.old
|
||||
|
||||
#sed -i 's|sock, err = socket.udp();|sock, err = (socket.udp4 or socket.udp)();|g' net/dns.lua
|
||||
}
|
||||
|
||||
build() {
|
||||
cd prosody-$pkgver
|
||||
./configure \
|
||||
--ostype=linux \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/prosody \
|
||||
--datadir=/var/lib/prosody \
|
||||
--with-lua-include=/usr/include/lua5.2 \
|
||||
--cflags="${CPPFLAGS} ${CFLAGS} -fPIC -D_GNU_SOURCE" \
|
||||
--ldflags="${LDFLAGS} -shared" \
|
||||
--no-example-certs \
|
||||
--runwith=lua5.2
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd prosody-$pkgver
|
||||
make DESTDIR="${pkgdir}" install
|
||||
make DESTDIR="${pkgdir}" install -C tools/migration
|
||||
|
||||
install -Dm 0644 "$srcdir"/prosody.tmpfile.d "${pkgdir}"/usr/lib/tmpfiles.d/prosody.conf
|
||||
install -Dm 0644 "$srcdir"/prosody.service "${pkgdir}"/usr/lib/systemd/system/prosody.service
|
||||
install -Dm644 "$srcdir"/sysuser.conf "$pkgdir"/usr/lib/sysusers.d/prosody.conf
|
||||
|
||||
for i in tools/*.lua; do
|
||||
install -Dm 0644 ${i} "${pkgdir}"/usr/share/prosody/${i}
|
||||
done
|
||||
|
||||
install -Dm 0644 COPYING "${pkgdir}"/usr/share/licenses/prosody/COPYING
|
||||
install -Dm 0644 "$srcdir"/prosody.logrotated "${pkgdir}"/etc/logrotate.d/prosody
|
||||
rm "${pkgdir}"/etc/prosody/certs/*
|
||||
}
|
23
src/prosody/prosody.install
Normal file
23
src/prosody/prosody.install
Normal file
@ -0,0 +1,23 @@
|
||||
post_install() {
|
||||
echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody"
|
||||
echo ">> Probably you need to do 'chown prosody:jabber /var/lib/prosody'"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
paths=(/etc/prosody /var/lib/prosody /var/log/prosody
|
||||
/var/log/old/prosody)
|
||||
first=true
|
||||
for path in ${paths[@]}; do
|
||||
if [ -d $path ]; then
|
||||
if $first; then
|
||||
first=false
|
||||
echo "==> Leftover Paths:"
|
||||
fi
|
||||
echo "==> $path"
|
||||
fi
|
||||
done
|
||||
}
|
9
src/prosody/prosody.logrotated
Normal file
9
src/prosody/prosody.logrotated
Normal file
@ -0,0 +1,9 @@
|
||||
/var/log/prosody/prosody.log /var/log/prosody/prosody.err {
|
||||
# olddir /var/log/old/prosody
|
||||
create 644 prosody prosody
|
||||
sharedscripts
|
||||
missingok
|
||||
postrotate
|
||||
/bin/kill -HUP `cat /run/prosody/prosody.pid 2> /dev/null` 2> /dev/null || true
|
||||
endscript
|
||||
}
|
15
src/prosody/prosody.service
Normal file
15
src/prosody/prosody.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=XMPP (Jabber) Server
|
||||
After=network.target
|
||||
Documentation=https://prosody.im/doc
|
||||
Documentation=https://wiki.archlinux.org/index.php/Prosody
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/prosody/prosody.pid
|
||||
ExecStart=/usr/bin/prosodyctl start
|
||||
ExecStop=/usr/bin/prosodyctl stop
|
||||
ExecReload=/usr/bin/prosodyctl reload
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
src/prosody/prosody.tmpfile.d
Normal file
2
src/prosody/prosody.tmpfile.d
Normal file
@ -0,0 +1,2 @@
|
||||
d /run/prosody 0755 prosody jabber -
|
||||
d /var/lib/prosody 0750 prosody jabber -
|
3
src/prosody/sysuser.conf
Normal file
3
src/prosody/sysuser.conf
Normal file
@ -0,0 +1,3 @@
|
||||
g jabber 17 - -
|
||||
u prosody - "Prosody XMPP Server" /var/lib/prosody
|
||||
m prosody jabber
|
Loading…
Reference in New Issue
Block a user