summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b2aa08cf9886ce1d0ff8929aeb71bbe31598bb0 (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
# Maintainer: fuero <fuerob@gmail.com> 
_pkgname=bonk
pkgname="${_pkgname}-git"
# renovate: pkgName=https://github.com/FascinatedBox/bonk depName=bonk
pkgver=r66.9c77929
pkgrel=1
pkgdesc="command-line tool that provides subcommands to modify windows, adjust window properties, change window decorations, and more."
license=('GPL-2.0-only')
arch=('x86_64')
url="https://github.com/FascinatedBox/bonk"
source=(
  "${_pkgname}.git::git+${url}"
)
depends=('libxcb' 'xcb-util-wm')
makedepends=('cmake' 'make' 'git' 'libx11' 'ruby-ronn-ng')
sha256sums=('SKIP')

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

build() {
  cmake -B build -S "${_pkgname}.git" \
    -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
    -DWITH_DOCS=true
  cmake --build build
}

check() {
  ctest --test-dir build --output-on-failure
}

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