summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d0457de3af54d56fa504db1bd8e4a3c80adb6c5a (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
# Maintainer: katt <magunasu.b97@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Stefano Zamprogno <stefano dot zamprogno at gmail dot com>
# Contributor: Chuck Yang <Chuck.Yang@gmail.com>

pkgname=lshw-git
pkgver=B.02.19.r39.g9ae06b4
pkgrel=2
pkgdesc='A small tool to provide detailed information on the hardware configuration of the machine'
url=https://ezix.org/project/wiki/HardwareLiSter
license=(GPL)
arch=(x86_64)
depends=(gcc-libs hwids)
optdepends=('gtk3: for gtk-lshw')
makedepends=(gtk3 sqlite git)
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}")
source=(git+https://ezix.org/src/pkg/lshw.git)
sha256sums=('SKIP')

pkgver() {
    cd "${pkgname%-git}"
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
    cd "${pkgname%-git}"
    sed -i 's|/usr/sbin/gtk-lshw|/usr/bin/gtk-lshw|' src/gui/integration/gtk-lshw.desktop
}

build() {
    cd "${pkgname%-git}"
    make SBINDIR=/usr/bin
    make SBINDIR=/usr/bin gui
}

package() {
    cd "${pkgname%-git}"
    make DESTDIR="$pkgdir"/ SBINDIR=/usr/bin install
    make DESTDIR="$pkgdir"/ SBINDIR=/usr/bin install-gui
    install -Dm0644 src/gui/integration/gtk-lshw.desktop -t "$pkgdir"/usr/share/applications
    install -Dm0644 src/gui/integration/gtk-lshw.pam -t "$pkgdir"/usr/share/doc/$pkgname
    install -Dm0644 src/gui/integration/console.apps -t "$pkgdir"/usr/share/doc/$pkgname
    rm -f "$pkgdir"/usr/share/lshw/{pci,usb}.ids
}