94 lines
3.3 KiB
Bash
94 lines
3.3 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
# Old Maintainer (Arch): Dwayne Bent <dbb@dbb.io>
|
|
# Old Maintainer (Arch): Tilman Vatteroth <tilman.vatteroth@uni-dortmund.de>
|
|
|
|
pkgname=prosody
|
|
epoch=1
|
|
pkgver=0.11.9
|
|
_debver=$pkgver
|
|
_debrel=2
|
|
pkgrel=2
|
|
pkgdesc='Lightweight and extensible Jabber/XMPP server written in Lua'
|
|
arch=('i686' 'x86_64')
|
|
url='https://prosody.im/'
|
|
license=('Expat')
|
|
depends=('lua52' 'lua52-socket' 'lua52-expat' 'lua52-filesystem' 'lua52-sec'
|
|
'libidn' 'libressl')
|
|
makedepends=('quilt')
|
|
conflicts=('prosody')
|
|
provides=('prosody')
|
|
optdepends=('lua52-dbi: SQL storage support')
|
|
install=prosody.install
|
|
backup=('etc/prosody/prosody.cfg.lua')
|
|
source=("https://prosody.im/downloads/source/prosody-${pkgver}.tar.gz"{,.asc}
|
|
"https://deb.debian.org/debian/pool/main/p/prosody/prosody_${_debver}-${_debrel}+deb11u2.debian.tar.xz"
|
|
"prosody.initd"
|
|
"prosody.run"
|
|
"prosody.logrotated")
|
|
sha512sums=('fabbbbb1acb3de4ff01e3e8c6e9e4dc37cb161259f1649683a1f9d925ed9f1709e052bfc831cba3f1861a9cca599f2b725ee739bfcb57164d6f50ac07011b52a'
|
|
'SKIP'
|
|
'3b398abcc82be9461064cbf0c2ab6f895dd0b7810ce1fa0f8b1a7f02f5211ddc95ee0c0d7c40abda5e1b0229486671b837a760da674a2eacec7e4138d558cc48'
|
|
'06fd900a06536ba334580dd49539b0ca8f9fb4f5706bf39d4acfd3266d265d404554cddc5e0378be2b650ecf6277d4852ea7f25cccc66f158646ad7cd1f71e57'
|
|
'6ba1aeeab49aa64401e45f969fac6eca3dbc36dd74e4c1bf03aed315399bf086c14c3d2f10f269a7e8cffbe48a789b4fdaddb65961698d20c89b3b5f3d91ecf3'
|
|
'7867ac1303c09ed50c8b3f9a204fd7a970ba063e39a2bcdc95925a2192240b3000461d054f3d162b4cfd66de90c291af754df8945cdf257b058f998bca5c4c4f')
|
|
validpgpkeys=('32A9EDDE3609931EB98CEAC315907E8E7BDD6BFE'
|
|
'3E52119EF853C59678DBBF6BADED9A77B67AD329'
|
|
'C01A477A8F69E6E57F5C54CDE7AB958013F1F1D5')
|
|
|
|
prepare() {
|
|
cd ${pkgname}-${pkgver}
|
|
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
# Doesn't apply
|
|
rm -v debian/patches/0001-conf.patch || true
|
|
|
|
quilt push -av
|
|
fi
|
|
|
|
# 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\"\;"/"info = \"*syslog\"\;"/g prosody.cfg.lua.dist
|
|
|
|
}
|
|
|
|
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
|
|
|
|
# services
|
|
install -Dm755 "${srcdir}"/${pkgname}.initd "${pkgdir}"/etc/init.d/${pkgname}
|
|
install -Dm755 "${srcdir}/${pkgname}.run" "${pkgdir}/etc/sv/${pkgname}/run"
|
|
|
|
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/*
|
|
}
|