updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / rabbitmq / PKGBUILD
blob9e6a5891cf7602fb9f8e99d458bd61bb5d726801
1 # Maintainer: Stefan J. Betz <info at stefan-betz dot net>
2 # Contributor: p2k <Patrick dot Schneider at uni-ulm dot de>
3 # Contributor: Jonathan Liu <net147@gmail.com>
4 pkgname=rabbitmq
5 pkgver=2.7.0
6 pkgrel=2
7 pkgdesc="Highly reliable and performant enterprise messaging implementation of AMQP written in Erlang/OTP"
8 arch=('i686' 'x86_64')
9 url="http://rabbitmq.com"
10 license=('MPL')
11 depends=('erlang')
12 backup=('etc/rabbitmq/rabbitmq.conf' 'etc/rabbitmq/rabbitmq-env.conf')
13 source=("http://www.rabbitmq.com/releases/${pkgname}-server/v${pkgver}/${pkgname}-server-generic-unix-${pkgver}.tar.gz"
14         "rabbitmq-env.conf"
15         "rabbitmq-server"
16         "rabbitmq-plugins"
17         "rabbitmqctl"
18         "rabbitmq-server-rc.d")
19 install="${pkgname}.install"
20 md5sums=('68d01e0f811c013823f423819a2cabfb'
21          'b2fde4dc69c3a75f99a21463b5c9f832'
22          '481bd6ce748a168a75ce1b65373aaad1'
23          '481bd6ce748a168a75ce1b65373aaad1'
24          '481bd6ce748a168a75ce1b65373aaad1'
25          '062af9637fc3f81ffeb9e428daa8c536')
27 package() {
28   cd "${srcdir}"
29   install -d "${pkgdir}/usr/lib/rabbitmq"/{bin,lib}
30   install -d "${pkgdir}/var/log/rabbitmq"
31   install -d "${pkgdir}/var/lib/rabbitmq/mnesia"
32   cp -R "${pkgname}_server-${pkgver}" "${pkgdir}/usr/lib/rabbitmq/lib/"
34   for x in rabbitmqctl rabbitmq-plugins rabbitmq-env rabbitmq-server; do
35     ln -sf "../lib/${pkgname}_server-${pkgver}/sbin/$x" "${pkgdir}/usr/lib/rabbitmq/bin/"
36   done
38   install -D rabbitmq-env.conf "${pkgdir}/etc/rabbitmq/rabbitmq-env.conf"
39   sed -i "s#^\(RABBITMQ_PLUGINS_DIR\)=.*\$#\1=/usr/lib/${pkgname}/lib/${pkgname}_server-${pkgver}/plugins#" \
40      "${pkgdir}/etc/rabbitmq/rabbitmq-env.conf"
41   install -D rabbitmq-server "${pkgdir}/usr/sbin/rabbitmq-server"
42   install -D rabbitmq-plugins "${pkgdir}/usr/sbin/rabbitmq-plugins"
43   install -D rabbitmqctl "${pkgdir}/usr/sbin/rabbitmqctl"
44   install -D rabbitmq-server-rc.d "${pkgdir}/etc/rc.d/rabbitmq-server"
47 # vim:set ts=2 sw=2 et: