updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / rsyslog-zmq / PKGBUILD
blob025d543fa32b3dc1092d0f1459690020be865ca0
1 # Maintainer: Brian Knox <taotetek@gmail.com>
3 pkgname=rsyslog-zmq
4 _basepkgname=rsyslog
5 pkgver=5.8.6
6 _gitsrc=git://github.com/aggregateknowledge/rsyslog-zeromq.git
7 _gitcheckout=rsyslog-zeromq
8 pkgrel=3
9 pkgdesc="rsyslog with zeromq integration"
10 url="http://github.com/aggregateknowledge/rsyslog-zeromq"
11 arch=('i686' 'x86_64')
12 license=('GPL3')
13 depends=('zlib' 'zeromq' 'logrotate')
14 provides=('rsyslog')
15 makedepends=('postgresql-libs>=8.4.1' 'libmysqlclient' 'net-snmp' 'gnutls' 'git' 'autoconf' 'rsync')
16 optdepends=('postgresql-libs: PostgreSQL Database Support'
17             'libmysqlclient: MySQL Database Support'
18             'net-snmp'
19              'gnutls')
20 backup=('etc/rsyslog.conf' \
21         'etc/logrotate.d/rsyslog'
22         'etc/conf.d/rsyslog')
23 options=('strip' 'zipman' '!libtool')
24 source=("http://www.rsyslog.com/files/download/rsyslog/${_basepkgname}-${pkgver}.tar.gz"
25         'rsyslog'
26         'rsyslog.logrotate'
27         'rsyslog.conf.d'
28     'rsyslog.conf'
29     )
30 md5sums=('c46db0496066b82faf735bd4222208d7'
31          'a18bbcbb6ebdaa13a6ec6d9f3d9eb2da'
32          '8065db4bef3061a4f000ba58779f6829'
33          'a1b698b86249278af082298123375213'
34          '5381110b0c576bdba0e11b403e900eb3')
36 build() {
37   if [[ -d "$_gitcheckout" ]]; then
38       cd "$_gitcheckout" && git pull origin
39       msg "The local files are updated."
40   else
41       git clone "$_gitsrc" "$_gitcheckout"
42   fi
44   cd ${srcdir}/${_basepkgname}-${pkgver}
45   patch -p1 -i ${srcdir}/$_gitcheckout/rsyslog-zeromq.patch
46   cd ${srcdir}/$_gitcheckout/
47   rsync -av {i,o}mzeromq ${srcdir}/${_basepkgname}-${pkgver}/plugins
48   cd ${srcdir}/${_basepkgname}-${pkgver}
49   autoreconf
50   
51   ./configure --prefix=/usr \
52               --enable-mysql \
53               --enable-pgsql \
54               --enable-mail \
55               --enable-imfile \
56               --enable-omzeromq \
57               --enable-imzeromq \
58               --enable-imtemplate \
59               --enable-snmp \
60               --enable-gnutls \
61               --enable-inet \
62               --with-systemdsystemunitdir=/lib/systemd/system
63   make
65 package() {
66   cd ${srcdir}/${_basepkgname}-${pkgver}
67   make install DESTDIR=${pkgdir}
68   # Install Daemons and Configuration Files
69   install -D -m755 ${srcdir}/${_basepkgname} ${pkgdir}/etc/rc.d/${_basepkgname}d
70   install -D -m644 $srcdir/${_basepkgname}.logrotate ${pkgdir}/etc/logrotate.d/${_basepkgname}
71   install -D -m644 ${srcdir}/${_basepkgname}.conf.d ${pkgdir}/etc/conf.d/${_basepkgname}
72   install -D -m644 ${srcdir}/${_basepkgname}.conf ${pkgdir}/etc/${_basepkgname}.conf