2019-06-03 11:24:16 +02:00
|
|
|
# Contributor: Nathan Johnson <nathan@nathanjohnson.info>
|
|
|
|
# Maintainer: Nathan Johnson <nathan@nathanjohnson.info>
|
|
|
|
pkgname=rabbitmq-server
|
2020-03-13 17:36:06 +01:00
|
|
|
pkgver=3.7.18
|
|
|
|
pkgrel=1
|
2019-06-03 11:24:16 +02:00
|
|
|
pkgdesc="RabbitMQ is an open source multi-protocol messaging broker."
|
|
|
|
url="https://www.rabbitmq.com/"
|
|
|
|
arch="noarch !s390x"
|
|
|
|
license="MPL-1.1"
|
|
|
|
depends="erlang erlang-tools erlang-runtime-tools erlang-stdlib
|
|
|
|
logrotate erlang-ssl erlang-crypto erlang-parsetools
|
|
|
|
erlang-mnesia erlang-sasl erlang-inets erlang-syntax-tools
|
|
|
|
erlang-eldap erlang-xmerl erlang-os-mon erlang-asn1 erlang-public-key"
|
2020-03-13 17:36:06 +01:00
|
|
|
makedepends="$depends_dev erlang-dev python3 py3-simplejson xmlto libxslt
|
2019-06-03 11:24:16 +02:00
|
|
|
rsync zip gawk grep erlang-compiler erlang-erl-docgen
|
2020-03-13 17:36:06 +01:00
|
|
|
erlang-edoc socat erlang-eunit elixir"
|
2019-06-03 11:24:16 +02:00
|
|
|
install="$pkgname.pre-install $pkgname.post-deinstall"
|
|
|
|
pkgusers="rabbitmq"
|
|
|
|
pkggroups="rabbitmq"
|
|
|
|
subpackages="$pkgname-doc"
|
|
|
|
source="
|
|
|
|
rabbitmq-server.initd
|
|
|
|
rabbitmq-server.logrotate
|
2020-03-13 17:36:06 +01:00
|
|
|
https://github.com/rabbitmq/rabbitmq-server/releases/download/v$pkgver/rabbitmq-server-$pkgver.tar.xz
|
|
|
|
py3.patch
|
2019-06-03 11:24:16 +02:00
|
|
|
"
|
2020-03-13 17:36:06 +01:00
|
|
|
options="!check" # test suite broken
|
|
|
|
|
|
|
|
# secfixes:
|
|
|
|
# 3.7.17:
|
|
|
|
# - CVE-2015-9251
|
|
|
|
# - CVE-2017-16012
|
|
|
|
# - CVE-2019-11358
|
2019-06-03 11:24:16 +02:00
|
|
|
|
|
|
|
build() {
|
2020-03-13 17:36:06 +01:00
|
|
|
make dist manpages PYTHON=python3
|
2019-06-03 11:24:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
make install install-bin install-man DESTDIR="$pkgdir" PREFIX=/usr \
|
2020-03-13 17:36:06 +01:00
|
|
|
RMQ_ROOTDIR="/usr/lib/rabbitmq" MANDIR=/usr/share/man PYTHON=python3
|
2019-06-03 11:24:16 +02:00
|
|
|
|
|
|
|
mkdir -p "$pkgdir"/var/lib/rabbitmq/mnesia
|
|
|
|
mkdir -p "$pkgdir"/var/log/rabbitmq
|
|
|
|
|
|
|
|
#Copy all necessary lib files etc.
|
|
|
|
install -p -m755 -D "$builddir"/scripts/rabbitmq-server.ocf \
|
2020-03-13 17:36:06 +01:00
|
|
|
"$pkgdir"/usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server
|
2019-06-03 11:24:16 +02:00
|
|
|
install -p -m755 -D "$builddir"/scripts/rabbitmq-server-ha.ocf \
|
2020-03-13 17:36:06 +01:00
|
|
|
"$pkgdir"/usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server-ha
|
2019-06-03 11:24:16 +02:00
|
|
|
install -p -m644 -D "$srcdir/"$pkgname.logrotate \
|
2020-03-13 17:36:06 +01:00
|
|
|
"$pkgdir"/etc/logrotate.d/rabbitmq-server
|
2019-06-03 11:24:16 +02:00
|
|
|
install -m755 -D "$srcdir"/$pkgname.initd \
|
2020-03-13 17:36:06 +01:00
|
|
|
"$pkgdir"/etc/init.d/$pkgname
|
2019-06-03 11:24:16 +02:00
|
|
|
mkdir -p "$pkgdir"/usr/sbin
|
|
|
|
|
|
|
|
# This is lifted / adapted from the official upstream spec file.
|
|
|
|
# I'd prefer a patch file, but this is probably a little easier
|
|
|
|
# to manage since this is how they do it upstream. inb4eww
|
|
|
|
sed -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
|
|
|
|
-e 's|@STDOUT_STDERR_REDIRECTION@||' \
|
|
|
|
< "$builddir"/scripts/rabbitmq-script-wrapper \
|
|
|
|
> "$pkgdir"/usr/sbin/rabbitmqctl
|
|
|
|
|
|
|
|
chmod 0755 "$pkgdir"/usr/sbin/rabbitmqctl
|
|
|
|
for script in rabbitmq-server rabbitmq-plugins; do
|
|
|
|
cp -a "$pkgdir"/usr/sbin/rabbitmqctl \
|
|
|
|
"$pkgdir"/usr/sbin/$script;
|
|
|
|
done
|
|
|
|
|
|
|
|
mkdir -p "$pkgdir"/usr/share/doc/"$pkgname"
|
|
|
|
cp -a "$builddir"/LICENSE* "$pkgdir"/usr/share/doc/"$pkgname"/
|
|
|
|
cp -a "$builddir"/deps/rabbit/docs/* "$pkgdir"/usr/share/doc/"$pkgname"/
|
|
|
|
cp -a "$builddir"/deps/rabbitmq_sharding/docs/* "$pkgdir"/usr/share/doc/"$pkgname"/
|
|
|
|
chmod 755 "$pkgdir"/var/lib/rabbitmq
|
|
|
|
chmod 750 "$pkgdir"/var/lib/rabbitmq/mnesia
|
|
|
|
chmod 755 "$pkgdir"/var/log/rabbitmq
|
|
|
|
chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/rabbitmq
|
|
|
|
chown -R $pkgusers:$pkggroups "$pkgdir"/var/log/rabbitmq
|
|
|
|
}
|
|
|
|
|
|
|
|
sha512sums="a8bb02a7cae1f8720e5c7aaabfe6a2c0e731cffbe0d8f99bdcb6597daa654dc49e6d41943974601435700cf469eaa8286dc91a3255a6b9023754c3861fbb5cd9 rabbitmq-server.initd
|
|
|
|
b8655cb048ab3b32001d4e6920bb5366696f3a5da75c053605e9b270e771c548e36858dca8338813d34376534515bba00af5e6dd7b4b1754a0e64a8fb756e3f3 rabbitmq-server.logrotate
|
2020-03-13 17:36:06 +01:00
|
|
|
7ac10172b2a1d282a0fbcfc13e4612b0aaee31c7248616cc16451c9390aabd96d866619336a29c9bb3b4142d2141b5d442a07a49c6bb0a4ea0cdb287dc813c0f rabbitmq-server-3.7.18.tar.xz
|
|
|
|
7862c8566631aeb8c7756e5c8ea11705546ffcdca6ec9058516f91c2650a21b1bb373879e8eb8a78dc5af808eb1fdf6c8167997ea7feace2de61dfa1fb1e5c8b py3.patch"
|