summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 53fccdc7ee1587036e7637ce859bbacf9b83887b (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=pciutils-git
pkgver=3.10.0.r9.gdb43fb5
pkgrel=1
pkgdesc="Programs for inspecting and manipulating configuration of PCI devices"
arch=('i686' 'x86_64')
url="https://mj.ucw.cz/sw/pciutils/"
license=('GPL2')
depends=('glibc' 'hwdata' 'kmod' 'sh')
makedepends=('git')
provides=("pciutils=$pkgver")
conflicts=('pciutils')
options=('staticlibs')
source=("git+https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git")
sha256sums=('SKIP')


pkgver() {
  cd "pciutils"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "pciutils"

  make \
    OPT="$CFLAGS" \
    SHARED=no \
    ZLIB=no
  cp "lib/libpci.a" "$srcdir"

  make clean
  make \
    OPT="$CFLAGS" \
    SHARED=yes \
    ZLIB=no
}

package() {
  cd "pciutils"

  make \
    DESTDIR="$pkgdir" \
    PREFIX="/usr" \
    SBINDIR="/usr/bin" \
    SHAREDIR="/usr/share/hwdata" \
    SHARED=yes \
    ZLIB=no \
    install \
    install-lib

  install -Dm644 "$srcdir/libpci.a" -t "$pkgdir/usr/lib"

  # supplied by hwids package
  rm -rf "$pkgdir/usr"/{bin/update-pciids,share/{hwdata,man/man8/update-pciids.8}}
}