summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ec60816b172f11c9f623ca512d9b536c1ea8ba2c (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
# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
# Contributor: Eric BĂ©langer <eric at archlinux dot org>
pkgname=hardinfo-git
pkgver=0.6.alpha.1392.g6ecebbd
pkgrel=4
pkgdesc="A system information and benchmark tool."
arch=('x86_64')
url="https://github.com/lpereira/hardinfo"
license=('GPL2')
depends=('gtk3' 'libsoup')
makedepends=('cmake' 'git')
optdepends=('dmidecode: Memory Devices module'
            'fwupd: Firmware module'
            'lm_sensors: Sensors module'
            'pciutils: PCI Devices module'
            'sysbench: SysBench CPU benchmark'
            'usbutils: USB Devices module')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
options=('debug')
source=('git+https://github.com/lpereira/hardinfo.git'
        'benchmark.patch')
sha256sums=('SKIP'
            '5a352377abce848dbb20b5e35d86feba9b62011d1a7cd075c0d14d54e91f3286')

pkgver() {
  cd "$srcdir/${pkgname%-git}"
  git describe --long | sed 's/^release-//;s/^0.5-/0.6-alpha-/;s/-/./g'
}

prepare() {
  cd "$srcdir/${pkgname%-git}"

  patch -Np1 -i ../benchmark.patch

  # ignore odr-violation errors
#  setconf "${pkgname%-git}.desktop.cmake" Exec \
#    "sh -c 'env ASAN_OPTIONS=detect_odr_violation=0 @CMAKE_INSTALL_FULL_BINDIR@/hardinfo'"
}

build() {
  cmake -B build -S "${pkgname%-git}" \
    -DCMAKE_BUILD_TYPE='Debug' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCMAKE_INSTALL_LIBDIR='lib' \
    -DHARDINFO_GTK3='ON' \
    -DHARDINFO_DEBUG='$(usex debug 1 0)' \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}