# Contributor: Leonardo Arena # Maintainer: Leonardo Arena pkgname=pciutils pkgver=3.5.3 pkgrel=0 pkgdesc="PCI bus configuration space access library and tools" url="http://mj.ucw.cz/pciutils.html" arch="all" license="GPL" depends="hwdata-pci" makedepends="linux-headers" install= subpackages="$pkgname-doc $pkgname-dev $pkgname-libs" source="http://www.kernel.org/pub/software/utils/$pkgname/$pkgname-$pkgver.tar.gz fix-linking-pci-malloc-Makefile.patch pread.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 OPT="$CFLAGS" ZLIB=no \ SHARED=yes \ PREFIX=/usr \ SHAREDIR=/usr/share/hwdata \ MANDIR=/usr/share/man \ all || return 1 } package() { cd "$_builddir" make PREFIX="$pkgdir"/usr \ SHARED=yes \ SHAREDIR="$pkgdir"/usr/share/hwdata \ MANDIR="$pkgdir"/usr/share/man \ install install -d "$pkgdir"/usr/lib ln -s libpci.so.${pkgver%%.*} "$pkgdir"/usr/lib/libpci.so || return 1 install -D -m 644 lib/libpci.pc "$pkgdir"/usr/lib/pkgconfig/libpci.pc \ || return 1 for i in config.h header.h pci.h types.h; do install -D -m 644 lib/${i} "$pkgdir"/usr/include/pci/${i} \ || return 1 done } sha512sums="7a3b76413480742cc647276c12e51035c794c4d2325dfec673a6fd169756c692b2d3c30d3decd2033da2b9f0641e8804bea4340f8db3e15ced068e3e919c0b68 pciutils-3.5.3.tar.gz 520b39602078e4325d7dac2d460547b360f7b52c668d88cf3d776c59246c8cfcb537b7b4f50575da9d2fcea1e207b3e99626ce4f23df890d2565b7dac1db2d94 fix-linking-pci-malloc-Makefile.patch aa1d3272500180256929b39a5fc4ea38ddb6a9fad090d732832ded9cc396303cf56efc91cfdeb76edbcfefc9a7c8eb058562c3c2b09a9090a59d3e68c27cec62 pread.patch"