summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2c31c57789b4c0d2bba6c1c73d7befd30840f509 (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
42
# Maintainer: ferreum <code.danielk at gmail com>
pkgname=i3-match-git
pkgver=0.1.36.rbb6a6f4
pkgrel=4
pkgdesc="Match and query i3 window properties and events"
arch=('i686' 'x86_64')
url='https://gitlab.com/ferreum/i3-match'
license=('BSD')
depends=('xcb-util' 'yajl')
makedepends=('i3-wm' 'git')
source=('git+https://gitlab.com/ferreum/i3-match.git')
sha1sums=('SKIP')

_gitname='i3-match'

pkgver() {
  cd "$srcdir/$_gitname"
  local ver="0.1.$(git rev-list --count HEAD).r$(git rev-parse --short HEAD)"
  printf "%s" "${ver//-/.}"
}

prepare() {
  cd "$_gitname/src"
  make clean
  make depend
}

build() {
  cd "$_gitname/src"
  make
}

package() {
  cd "$_gitname"

  install -Dm755 -t "${pkgdir}/usr/bin/" "src/i3-match"
  install -Dm644 -t "${pkgdir}/usr/share/man/man1/" man/*.1
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim:set ts=2 sw=2 et: