# Compiling Time: 0.4 SBU
# Maintainer: Pingax <pingax@frugalware.org>
# Contributor: Christian Hamar alias krix <krics@linuxforum.hu>
# Contributor: BMH1980 <bmh1980@frugalware.org>

pkgname=lshw
pkgver=B.02.18
pkgrel=1
pkgdesc="A tool to provide information on the hardware configuration of the machine."
url="http://ezix.org/project/wiki/HardwareLiSter"
license="GPL2"
groups=('apps-extra')
archs=('i686' 'x86_64')
makedepends=('gtk+2' 'x11-protos')
options+=('scriptlet')
depends=('libstdc++')
up2date="lynx -dump $url|grep -m 1 latest|grep -o '[A-Z][0-9\.]\+[0-9]'"
source=(http://ezix.org/software/files/$pkgname-$pkgver.tar.gz)

subpkgs=("gtk-$pkgname")
subdescs=("Gtk+2 frontend for lshw")
sublicense=("GPL2")
subgroups=('xapps-extra')
subdepends=('gtk+2')
subarchs=('i686 x86_64')

build() {
	for i in `find . -name Makefile` ; do
		sed -i -e "s|DESTDIR?=/|DESTDIR=$Fdestdir|" \
		       -e "s|SBINDIR=\$(PREFIX)/sbin|SBINDIR=\$(PREFIX)/bin|" \
		       -e "s|^CXXFLAGS=.*|&$CXXFLAGS|" $i || Fdie
	done
	# What.. install wants to strip a directory ...
	Fsed "-p -s" "-p" src/Makefile
	Fpatchall
	Fmake
	Fmakeinstall
	Fmake gui
	Fmakeinstall install-gui
	Fdocrel docs/*
	Fmkdir /usr/share/doc/${subpkgs[0]}-$pkgver
	Ffilerel COPYING README.* docs/* /usr/share/doc/${subpkgs[0]}-$pkgver/
	Fsplit ${subpkgs[0]} usr/bin/${subpkgs[0]} usr/share/$pkgname/artwork
	Fsplit ${subpkgs[0]} usr/share/doc/${subpkgs[0]}-$pkgver
}

sha1sums=('c0240f5e53cf40769d52e316719e8010ea6bdea3')

# optimization OK
