summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7090a5800afe6c8d0f61d96f858360b359af5a01 (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
# $Id$
# Maintainer:  Radu Potop <radu at wooptoo dot com>

pkgname=amber-search-git
pkgver=0.6.0.58.gc875
pkgrel=1
pkgdesc="A code search and replace tool written in Rust. Inspired by ack, ag, and grep."
arch=('x86_64' 'i686')
url="https://github.com/dalance/amber"
license=('MIT')
provides=("amber-search")
depends=("gcc-libs")
makedepends=('cargo' 'git')
conflicts=("amber-search")
source=("$pkgname::git+$url")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --abbrev=4 --always --tags | sed 's/-/./g' | sed 's/v//'
}

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

package() {
  cd "$srcdir/$pkgname"

  install -Dm755 -t "$pkgdir/usr/bin" "target/release/ambr" "target/release/ambs"

  # documentation & licenses
  install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}