# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
setvar pkgname = 'nebula'
setvar pkgver = '0.2.3'
setvar pkgrel = '1'
setvar pkgdesc = ""An Intrusion Signature Generator""
setvar url = ""http://nebula.carnivore.it/""
setvar arch = ""all""
setvar license = ""GPL2""
setvar depends = """"
setvar depends_dev = """"
setvar makedepends = ""zlib-dev""
setvar install = """"
setvar subpackages = ""$pkgname-client""
setvar source = ""http://downloads.sourceforge.net/nebula/$pkgname-$pkgver.tar.gz
	musl-fixes.patch""
setvar _builddir = ""$srcdir"/$pkgname-$pkgver"

proc prepare {
	local i
	cd $_builddir
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
}

proc build {
	cd $_builddir
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make AM_CFLAGS=-D_GNU_SOURCE || return 1
}

proc package {
	cd $_builddir
	make DESTDIR="$pkgdir" install || return 1
}

proc client {
	#cd "$_builddir"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/"$pkgname"client "$subpkgdir"/usr/bin/
}

setvar md5sums = ""06eabd66634e7969203465fb94900f18  nebula-0.2.3.tar.gz
393c6ba03578214aa720cd8a703d8b1b  musl-fixes.patch""
setvar sha256sums = ""6d90fe1c5c1d81045134485e8ee4e888e9fce5d4323a2b6b321bf8a9765fc856  nebula-0.2.3.tar.gz
e35212e0b65711fd9ead733e15fe76c79a15de7ac7c417a4c26df400df6f590b  musl-fixes.patch""
setvar sha512sums = ""9202be7ca3c78e7dadf559180a3a9a331ed0ddd4b04aa16ac0c65856f513e600e4e04b7908d4be412360c3fc7e91a286723be1151c74333f0111a4307e323023  nebula-0.2.3.tar.gz
790c3682e3a32da44e83bcfc44c1483b866d526efdfee6522a42878a9ac3aab65341515c9a080e22e44f5e9daff3b4c55c3e53da6ee68e6580df74850e3b44dd  musl-fixes.patch""