aboutsummaryrefslogblamecommitdiffstats
path: root/testing/rabbitmq-server/APKBUILD
blob: f7f5ccd1643d789dc8f4fdb5a6de41f0f04cb444 (plain) (tree)
1
2
3
4


                                                         
            





















                                                                                                                  
                  





















































                                                                                     
                                                                
                                                           
                                                              
                                             
                                                                                                   
                                                                                           
                                                                                              
                                                                             
                                                                                                                                                                   
                                                                                                                                                           
                                                                                                                                                              
                                                                                                                                             
# Contributor: Nathan Johnson <nathan@nathanjohnson.info>
# Maintainer: Nathan Johnson <nathan@nathanjohnson.info>
pkgname=rabbitmq-server
pkgver=3.6.3
_realver=${pkgver//\./_}
pkgrel=0
pkgdesc="RabbitMQ is an open source multi-protocol messaging broker."
url="http://www.rabbitmq.com/"
arch="noarch"
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"
depends_dev=""
makedepends="$depends_dev erlang-dev py-simplejson xmlto libxslt
	rsync zip gawk grep erlang-compiler erlang-erl-docgen
	erlang-edoc socat"
install="$pkgname.pre-install $pkgname.post-deinstall"
pkgusers="rabbitmq"
pkggroups="rabbitmq"
subpackages="$pkgname-doc"
source="
	rabbitmq-server.initd
	rabbitmq-server.logrotate
	https://github.com/rabbitmq/${pkgname}/releases/download/rabbitmq_v${_realver}/${pkgname}-${pkgver}.tar.xz
	grep.patch
"

builddir="$srcdir/${pkgname}-${pkgver}"
build() {
	cd "$builddir"
	make dist manpages
}

package() {
	cd "$builddir"

	make install install-bin install-man DESTDIR="$pkgdir" PREFIX=/usr \
		RMQ_ROOTDIR="/usr/lib/rabbitmq" MANDIR=/usr/share/man

	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 \
		"$pkgdir"/usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server || return 1
	install -p -m755 -D "$builddir"/scripts/rabbitmq-server-ha.ocf \
		"$pkgdir"/usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server-ha \
		|| return 1
	install -p -m644 -D "$srcdir/"$pkgname.logrotate \
		"$pkgdir"/etc/logrotate.d/rabbitmq-server || return 1
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
	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"/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
}

md5sums="12287613dfb924d4cde19202de6eb313  rabbitmq-server.initd
f24af11867cddc5a17fefa8bf4276d52  rabbitmq-server.logrotate
3568dceb7f120549fc0add9836b89659  rabbitmq-server-3.6.3.tar.xz
8c7c3403d240dd8a67503267c17f155b  grep.patch"
sha256sums="b1ffe4a47550474c7a5b8ab47f4cd40549b84ede361302fa58863f27f17be3ec  rabbitmq-server.initd
9cce79e90835317b9704ecdf44e7dbc71803a17c85c1402f2bb4b2edb0232ab2  rabbitmq-server.logrotate
053b22ab1cdfddf1d3975f16d22a182d0bab673ab1b4a88f7a390f0b2a47648f  rabbitmq-server-3.6.3.tar.xz
53773ce795c39fac63cb725cab9bc864bd2849f5b609d7fbe29981d89e31b3be  grep.patch"
sha512sums="a8bb02a7cae1f8720e5c7aaabfe6a2c0e731cffbe0d8f99bdcb6597daa654dc49e6d41943974601435700cf469eaa8286dc91a3255a6b9023754c3861fbb5cd9  rabbitmq-server.initd
b8655cb048ab3b32001d4e6920bb5366696f3a5da75c053605e9b270e771c548e36858dca8338813d34376534515bba00af5e6dd7b4b1754a0e64a8fb756e3f3  rabbitmq-server.logrotate
a079701537686aba11fd2e0da5801848348a6d154414d006635005bf9e42d9b88e2d34d755a72eca43e2dc45fc83d8a37a99dd938f8f094424e65e77010cf91f  rabbitmq-server-3.6.3.tar.xz
84a5b186afcf3c8d279333473307cc5413763c690860b7d400b4843eb2b00e4db80917e1fa13e7d22cd67007ed044112def50bee87e917c2adcca37f2da6ecdd  grep.patch"