# $Id: PKGBUILD 107044 2014-03-11 18:19:44Z arodseth $ # Maintainer: Alexander Rødseth # Contributor: Kaiting Chen # Contributor: Gergely Imreh # Contributor: champus, madeye, ranguvar and ninja_pt pkgname=hwinfo pkgver=21.0.1.3 pkgrel=1 pkgdesc='Hardware detection tool from openSUSE' arch=('x86_64' 'i686') url='http://download.opensuse.org/source/factory/repo/oss/suse/src/' license=('GPL2') depends=('libx86emu' 'bash') makedepends=('sysfsutils' 'rpmextract' 'flex' 'aria2') options=('!emptydirs') source=("hwinfo.meta4::http://download.opensuse.org/source/factory/repo/oss/suse/src/$pkgname-${pkgver%.*.*}-${pkgver#*.*.}.src.rpm" 'custom_ioctl.patch') sha256sums=('SKIP' '6e83b50aa34f31db5fe6de938402e7c4dda6ffa9ffe1346c076e4779018fcf1d') prepare() { # Downloading the source rpm file, using meta4 aria2c -M "$pkgname.meta4" -V -c --allow-overwrite=true --no-conf=true # Wish they would just provide a normal $pkgname-$pkgvar.tar.gz... rpmextract.sh "$pkgname-${pkgver%.*.*}-${pkgver#*.*.}.src.rpm" tar jxf "$pkgname-${pkgver%.*.*}.tar.bz2" # Patching cd "$pkgname-${pkgver%.*.*}" patch -p0 -i ../custom_ioctl.patch } build() { make -C "$pkgname-${pkgver%.*.*}" -j1 \ CFLAGS+="-fPIC -I$srcdir/$pkgname-${pkgver%.*.*}/src/hd" \ LIBDIR=/usr/lib } package() { make -C "$pkgname-${pkgver%.*.*}" LIBDIR=/usr/lib DESTDIR="$pkgdir" install mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin" } # vim:set ts=2 sw=2 et: