summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 675ed194d9b103a9224b438e86f2c0c75c7794ed (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
# Maintainer: Jeff M. Hubbard <jeffmhubbard@gmail.com>
pkgname=wmfocus-git
_pkgname=wmfocus
pkgver=r100.6fd14aa
pkgrel=2
pkgdesc="Visually focus window by label"
url="https://github.com/svenstaro/wmfocus"
arch=('x86_64')
license=('MIT')
depends=('xcb-util-keysyms' 'cairo' 'libxkbcommon-x11')
makedepends=('rust' 'python' 'git')
provides=('wmfocus')
conflicts=('wmfocus')
source=("git+https://github.com/svenstaro/wmfocus.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"

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

build() {
    cd "$_pkgname"
    cargo build --locked --release --features i3
}

package() {
    cd "$_pkgname"
    install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
    install -Dm 755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}