### this file is sourced not run
PKGVER=2018.10
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=grok-master-20181013.tar.gz
MD5SUM=15ecc6aa478ede28477baf85e2e0468a
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$TARBALL
BUNDLE=

SLACKREQ='libpcre libevent libtokyo-cabinet' # gperf build-time only
SLACKDESC="grok: grok $PKGVER (Log file parser)  
grok:  
grok: Grok is simple software that allows you to easily parse logs and other 
grok: files. With grok, you can turn unstructured log and event data into 
grok: structured data. The grok program is a great tool for parsing log data 
grok: and program output. You can match any number of complex patterns on any 
grok: number of inputs (processes and files) and have custom reactions.  
grok: 
grok: https://github.com/jordansissel/grok
grok: http://code.google.com/p/semicomplete/wiki/Grok
grok: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/grok* &&
	sed -i -e '/install/ s|/lib|/lib64|' Makefile &&
	patch -Np1 -i ../pkg/gperf-3.1.patch &&
	make grok &&
	make install &&
	
	# additional stuff
	cp patterns/* /usr/share/grok/patterns &&
	mkdir -p /usr/share/doc/grok &&
	cp -a samples /usr/share/doc/grok &&
	mkdir -p /usr/share/man/man1 &&
	cp grok.1 /usr/share/man/man1 &&
	pkg_build_slackdesc
}
