summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a3e0332d98b70479d2e125a685d8e8942c67333 (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: Nicolas Geniteau <nicolas.geniteau@gmail.com>
pkgname=somebar-git
pkgver=1.0.3.r4.af73bc3
pkgrel=1
pkgdesc="dwm-like bar for dwl"
arch=('x86_64')
url="https://git.sr.ht/~raphi/somebar"
depends=()
makedepends=('git' 'meson' 'wayland-protocols' 'cairo' 'pango')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://git.sr.ht/~raphi/somebar" "config.hpp")
sha256sums=('SKIP' 'SKIP')

prepare() {
	cd "$srcdir/${pkgname%-git}"
	# Use a custom config.hpp if the file is not empty
        if [ -s "$srcdir/config.hpp" ]; then
		cp -f "$srcdir/config.hpp" src/config.hpp
	else
		cp -f src/config.def.hpp src/config.hpp
	fi
}

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

build() {
	arch-meson "$srcdir/${pkgname%-git}" build
	meson compile -C build
}

package() {
	meson install -C build --destdir "$pkgdir"
}