summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8d25dde5b8f914676d9c1b1d7e011ae80d715165 (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
pkgname=buzz-git
pkgver=1.6.0.r4.07cf74e
pkgrel=1
pkgdesc="A simple system tray application for notifying about unseen e-mail"
arch=('i686' 'x86_64')
url="https://github.com/jonhoo/buzz"
license=('MIT' 'Apache')
depends=('libappindicator-gtk3' 'gtk3' 'notification-daemon' 'llvm' 'clang' 'faenza-icon-theme' 'oxygen-icons')
makedepends=('git' 'rust')
source=("${pkgname}::git+https://github.com/jonhoo/buzz")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  local tag=$(git tag --sort=-v:refname | grep -E '^v([0-9]+\.)*[0-9]+$' | head -1)
  local commits_since=$(git rev-list $tag..HEAD --count)
  local ver=$(echo $tag | sed "s/v\(.*\)/\1/")
  echo "$ver.r$commits_since.$(git log --pretty=format:'%h' -n 1)"
}

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

package() {
  cd "${pkgname}"
  echo $(pwd)

  install -D "target/release/buzz" "${pkgdir}/usr/bin/buzz"

  install -Dm644 "LICENSE-APACHE" "$pkgdir/usr/share/doc/${pkgname}/LICENSE-APACHE"
  install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/doc/${pkgname}/LICENSE-MIT"
}