summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a5e35686bbd983bbaf0f6d55652d8f61731748f5 (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
# Maintainer: Josip Ponjavic <josipponjavic at gmail dot com>

pkgname=i3status-rust-git
pkgver=0.9.0.r528.ge195e45
pkgrel=1
pkgdesc='Very resourcefriendly and feature-rich replacement for i3status to use with bar programs (like i3bar and swaybar), written in pure Rust'
arch=('x86_64')
url='https://github.com/greshake/i3status-rust'
license=('GPL3')
depends=('dbus')
makedepends=('git' 'rust')
optdepends=('alsa-utils: For volume block'
            'curl: For the weather block'
            'lm_sensors: For temperature block'
            'networkmanager: For networkmanager block'
            'powerline-fonts: For all themes using the powerline arrow char'
            'speedtest-cli: For the speedtest block'
            'ttf-font-awesome-4: For the awesome icons')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
install="${pkgname%-*}.install"
source=("git+$url")
sha1sums=('SKIP')

pkgver() {
  cd "${pkgname%-*}"
  echo $(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).r$(git rev-list --count HEAD).g$(git describe --always)
}

build() {
  cd "${pkgname%-*}"
  cargo build --release
}

package() {
  cd "${pkgname%-*}"
  install -Dm755 target/release/i3status-rs "$pkgdir/usr/bin/i3status-rs"
  install -Dm644 example_config.toml "$pkgdir/usr/share/doc/${pkgname%-*}/examples/example_config.toml"
  install -Dm644 example_icon.toml "$pkgdir/usr/share/doc/${pkgname%-*}/examples/example_icon.toml"
  install -Dm644 example_theme.toml "$pkgdir/usr/share/doc/${pkgname%-*}/examples/example_theme.toml"
}