# Contributor (Arch): Florian Dejonckheere <florian@floriandejonckheere.be>
# Contributor (Arch): goodmen <goodmenlinux@gmail.com>
# Contributor (Arch): Gergely Imreh <imrehgATgmailDOTcom>
# Contributors: champus, madeye, Ranguvar and ninja_pt
# Maintainer: Aurélien DESBRIÈRES <aurelien@cwb.IO>

pkgname=ipmiutil
pkgver=3.1.3
pkgrel=1
pkgdesc="A simple program that lists results from the hardware detection library."
arch=('armv7h' 'i686' 'x86_64')
url="http://sourceforge.net/projects/ipmiutil/"
license=('BSD3')
depends=('openssl')
options=('!emptydirs')
source=("http://prdownloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('b80303b6f05cbe48e728dd925fef201e9604a90cd3fc9c8af113367e8d6dbe57')


build()
{
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --enable-gpl --libdir=/usr/lib --bindir=/usr/bin
  make
}

package()
{
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install

  install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/ipmiutil/LICENSE

  cd "${pkgdir}"

  mv -v usr/sbin/* usr/bin/
  rmdir -v usr/sbin/
}
