# Contributor: Leonardo Arena # Maintainer: Leonardo Arena pkgname=pciutils pkgver=3.2.1 pkgrel=1 pkgdesc="PCI bus configuration space access library and tools" url="http://mj.ucw.cz/pciutils.html" arch="all" license="GPL" depends="hwdata-pci" makedepends= install= subpackages="$pkgname-doc $pkgname-dev" source="http://www.kernel.org/pub/software/utils/$pkgname/$pkgname-$pkgver.tar.gz fix-headers.patch" _builddir="$srcdir"/$pkgname-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" sed -i -e "106s/^/\#/" Makefile make ZLIB=no \ PREFIX=/usr \ SHAREDIR=/usr/share/hwdata \ MANDIR=/usr/share/man \ all || return 1 } package() { cd "$_builddir" make PREFIX="$pkgdir"/usr \ SHAREDIR="$pkgdir"/usr/share/hwdata \ MANDIR="$pkgdir"/usr/share/man \ install install -d "$pkgdir"/usr/lib install -m644 lib/libpci.a "$pkgdir"/usr/lib install -D -m 644 lib/libpci.pc "$pkgdir"/usr/lib/pkgconfig/libpci.pc for i in config.h header.h pci.h types.h; do install -D -m 644 lib/${i} "$pkgdir"/usr/include/pci/${i} done } md5sums="fc51ae19eb25c50c8d61667084623e6d pciutils-3.2.1.tar.gz bb5c5627b8436b9b55e27f369f392afc fix-headers.patch" sha256sums="9c1ad30d1e40e353ea78b0c7ca41487cc0923d91e560a6e07072c93bcf520c02 pciutils-3.2.1.tar.gz caf84597a154c53d689ca4ce6234f03da0d9f95775b28b12248bcf21f92c51ee fix-headers.patch" sha512sums="dfe9c2cd56f2e823d287eac07a044ea137f2f0d7913475a06cc072945049ad224e47fc33bdaa04ec9ab94e6ce0864cd83736da43c5166ef4b03aebefa2d014cb pciutils-3.2.1.tar.gz d3104b9f4937279fc6dd24c4f92d48ae704566ef2125dc2a62d2c68b2be84b61818f023a9442d9323579315c1139dc9b57b8cb2fee7be44f1fbced02026d52a2 fix-headers.patch"