summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5d324566f785eece8bf21074b4883d11c5ef4e70 (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: redtide <redtid3@gmail.com>

_pkgname=wshot
pkgname=$_pkgname-git
pkgver=1.0.2.r21.ga302158
pkgrel=1
pkgdesc="Screenshot GUI for wayland"
arch=(any)
url="https://github.com/qtilities/wshot"
license=(GPL3)
source=(git+$url)
sha512sums=(
  SKIP
)
provides=($_pkgname)
conflicts=($_pkgname)
makedepends=(
  git
)
depends=(
  grim
  slurp
  zenity
  jq
)

pkgver() {
  cd $_pkgname
  (
    set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  local cmake_options=(
    -B build
    -D CMAKE_INSTALL_PREFIX=/usr
    -S $_pkgname
    -W no-dev
  )
  cmake "${cmake_options[@]}"
  cmake --build build --verbose
}

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