summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7fb4a94e796d3cdd8a424afe4d496ce50f996a10 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: Muflone http://www.muflone.com/contacts/english/
# Contributor: Giuseppe CalĂ  <jiveaxe@gmail.com>
pkgname=pacmanlogviewer-git
pkgver=1.5.1.r1.geb77370
pkgrel=1
pkgdesc="Inspect pacman log files"
arch=('x86_64')
url="https://github.com/gcala/pacmanlogviewer"
license=('GPL-3.0-or-later')
depends=(
  'hicolor-icon-theme'
  'qt6-base'
)
makedepends=(
  'cmake'
  'desktop-file-utils'
  'git'
  'qt6-tools'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/gcala/pacmanlogviewer.git')
sha256sums=('SKIP')

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

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

  # Set StartupWMClass
  desktop-file-edit --set-key=StartupWMClass --set-value=plv \
    it.cuteworks.pacmanlogviewer.desktop
}

build() {
  cmake -B build -S "${pkgname%-git}" \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -Wno-dev
  cmake --build build
}

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