# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=dmidecode
pkgver=3.1
pkgrel=0
pkgdesc="A utility for reporting system hardware as described by BIOS"
url="http://www.nongnu.org/dmidecode"
arch="all"
license="GPL"
options="!check"
subpackages="$pkgname-doc"
source="http://download.savannah.gnu.org/releases/dmidecode/dmidecode-$pkgver.tar.xz"

builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	sed -e '/^PROGRAMS !=/d' -e 's/-O2/-Os/' -i Makefile || return 1
}

build() {
	cd "$builddir"
	make prefix=/usr
}

package() {
	cd "$builddir"
	make prefix=/usr DESTDIR="${pkgdir}" install
}

sha512sums="226557ad5747a2a2eb54a938543373b9ddcff032d330ca3b9a066cc81c0e137028f606ffedc042e0220b523346e2f2f7abb0e4b8b34a8bd173719aa858519de9  dmidecode-3.1.tar.xz"
