summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ce1d2fe76965600030b8b093e1b6bd84ecc700cb (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
43
44
45
46
47
48
49
# Maintainer: Romain Chardiny <romain.chardiny@gmail.com>

pkgname=groslaur-git
pkgver=r2.cb33038
pkgrel=1
pkgdesc="Shitty AUR helper"
arch=('any')
url="https://github.com/romch007/groslaur"
license=('MIT')
depends=('git' 'pacman')
makedepends=('git' 'rust')
provides=("groslaur")
conflicts=('groslaur')
source=('git+https://github.com/romch007/groslaur.git')
md5sums=('SKIP')

pkgver() {
  cd "groslaur"

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

prepare() {
  cd "groslaur"

  if [ ! -f "Cargo.lock" ]; then
    cargo update
  fi
  cargo fetch
}

build() {
  cd "groslaur"

  cargo build -r
}

package() {
  cd "groslaur"

  cargo install \
    --locked \
    --no-track \
    --root "$pkgdir/usr" \
    --path .

  install -Dm644 "README.md" -t "$pkgdir/usr/share/doc/groslaur"
  install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/groslaur"
}