summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f39f8f68cb16b8f07a6860dea3924a51c49549b (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=clight-gui-git
pkgver=r93.29e7216
pkgrel=1
pkgdesc="Qt GUI for Clight"
arch=('x86_64' 'aarch64')
url="https://github.com/nullobsi/clight-gui"
license=('GPL-3.0-or-later')
depends=('clight' 'qt5-charts')
makedepends=('git' 'cmake' 'qt5-tools')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/nullobsi/clight-gui.git'
        "${pkgname%-git}.desktop")
sha256sums=('SKIP'
            '73affb7c39501d2ade8f517b07f8a2ea6e229dab0f9c28b6bd6c25b65b5f9ec2')

pkgver() {
  cd "${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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

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

  install -Dm644 "${pkgname%-git}.desktop" -t "$pkgdir/usr/share/applications"
}