# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'megactl'
setvar pkgver = '0.4.1'
setvar pkgrel = '0'
setvar pkgdesc = ""Tools for LSI megaraid adapters""
setvar url = ""http://sourceforge.net/projects/megactl/""
setvar arch = ""all""
setvar license = ""GPLv2""
setvar depends = """"
setvar depends_dev = """"
setvar makedepends = ""$depends_dev linux-headers""
setvar install = """"
setvar subpackages = """"
setvar source = ""http://downloads.sourceforge.net/project/megactl/megactl/$pkgver%20beta%20source%20package/megactl-$pkgver.tar.gz""

setvar _builddir = ""$srcdir"/megactl-$pkgver/src"
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
	make ARCH= megactl megasasctl
}

proc package {
	cd $_builddir
	install -d "$pkgdir"/usr/bin
	install megactl megasasctl "$pkgdir"/usr/bin/ || return 1
}

setvar md5sums = ""5d2b2752e3f623d86220ffd9d91afb44  megactl-0.4.1.tar.gz""
setvar sha256sums = ""d7aee98035c97a1ff098450192f073565c4f2355079763f6dc6202be121720e8  megactl-0.4.1.tar.gz""
setvar sha512sums = ""65a97f03fbe1c76375d2e16016c1e57c7e4544bfd7185b13a330560819caf48ecad8e9f1feb1d448b45d4f862abf2799868bd357d120019a709088c90b58ac92  megactl-0.4.1.tar.gz""