summaryrefslogtreecommitdiff
path: root/community/hwinfo/PKGBUILD
blob: ab29b53691f68bbb5e240a3288b448a3e60c784b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# $Id: PKGBUILD 103280 2014-01-02 12:43:36Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Gergely Imreh <imrehgATgmailDOTcom>
# Contributor: champus
# Contributor: madeye
# Contributor: Ranguvar
# Contributor: ninja_pt

pkgname=hwinfo
pkgver=21.0
_subver=1.2
pkgrel=1
pkgdesc='Hardware detection tool from openSUSE'
arch=('i686' 'x86_64' 'mips64el')
url='http://download.opensuse.org/source/factory/repo/oss/suse/src/'
license=('GPL2')
depends=('perl' 'libx86emu')
makedepends=('sysfsutils' 'rpmextract' 'flex')
options=('!emptydirs')
source=("http://download.opensuse.org/source/factory/repo/oss/suse/src/$pkgname-$pkgver-$_subver.src.rpm"
        'custom_ioctl.patch')
sha256sums=('4126875621a935a450cf616b69a1f922047f241cedc3ac02ece54cd78b23a9fb'
            '6e83b50aa34f31db5fe6de938402e7c4dda6ffa9ffe1346c076e4779018fcf1d')

prepare() {
  rpmextract.sh "$pkgname-$pkgver-$_subver.src.rpm"
  tar jxf $pkgname-$pkgver.tar.bz2
  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: