Skip to content

Instantly share code, notes, and snippets.

@jelly
Forked from anonymous/PKGBUILD.txt
Created June 26, 2012 17:42
Show Gist options
  • Save jelly/2997364 to your computer and use it in GitHub Desktop.
Save jelly/2997364 to your computer and use it in GitHub Desktop.
PKGBUILD
# Maintainer: Isaac C. Aronson <i@pingas.org>
pkgname=elsa-node
pkgver=20120626
pkgrel=1
pkgdesc="Enterprise Search Log and Archive (Node)"
arch=(any)
url="https://enterprise-log-search-and-archive.googlecode.com/"
license=('GPLv2')
depends=('perl' 'curl' 'subversion' 'mysql' 'pcre' 'libpcap' 'openssl' 'libnet' 'perl-sys-meminfo' 'perl-sys-info' 'perl-time-hires' 'perl-cgi' 'perl-moose' 'perl-config-json' 'perl-string-crc32' 'perl-log-log4perl' 'perl-dbd-mysql' 'perl-date-manip' 'perl-moosex-traits' 'syslog-ng')
makedepends=('sed')
checkdepends=()
optdepends=('elsa-web')
provides=()
conflicts=()
replaces=()
source=('searchd')
options=(emptydirs)
install=("elsa.install")
BASE_DIR=/usr/share
DATA_DIR=/srv
build() {
cd "$srcdir/"
svn --non-interactive --trust-server-cert --force export "https://enterprise-log-search-and-archive.googlecode.com/svn/trunk/elsa"
mkdir -p $srcdir/elsa/node/tmp/locks
touch $srcdir/elsa/node/tmp/locks/directory
}
package() {
cp $srcdir/* -r $pkgdir/$BASE_DIR/
mkdir -p $pkgdir/$DATA_DIR/elsa/log
mkdir -p $pkgdir/$DATA_DIR/elsa/tmp/buffers/
mkdir -p $pkgdir/$DATA_DIR/sphinx/log
touch $pkgdir/etc/sphinx_stopwords.txt
install -m755 searchd $pkgdir/etc/rc.d/searchd
mkdir -p $pkgdir/etc/elsa
cat "$srcdir/elsa/node/conf/syslog-ng.conf" | sed -e "s|\/usr\/local|$BASE_DIR|g" | sed -e "s|\/data|$DATA_DIR|g" > "$pkgdir/etc/elsa/syslog-ng.conf"
cat $srcdir/elsa/node/conf/elsa.conf | sed -e "s:/usr/local:$BASE_DIR:g" | sed -e "s:/data:$DATA_DIR:g" > $pkgdir/etc/elsa/elsa_node.conf
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment