summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7dc266b0f9af3584f2a821aa54850f59446e5c89 (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
# Maintainer: reimu <r2hkri at gmail com>
pkgname=swayblocks
pkgver=r45.9257a84
pkgrel=1
pkgdesc="another block manager for i3bar/swaybar"
arch=("i686" "x86_64")
url="https://github.com/rei2hu/$pkgname"
license=("GPL")
conflicts=("$pkgname")
provides=("$pkgname")
depends=("elixir")
makedepends=("elixir")
optdepends=(
  "acpi: for battery script",
  "brightnessctl: for brightness script",
  "cmus: for cmus script",
  "alsa-utils: for volume script")
source=("git+$url")
md5sums=("SKIP")

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

build() {
  cd "$srcdir/$pkgname"
  make create
  make build
}

package() {
  mkdir -p "$pkgdir/usr/bin" && mv "$srcdir/$pkgname/swayblocks" "$pkgdir/usr/bin"
}