summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d41c9241306bf727613bd9a12e42d671cdb00040 (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: Gyara <laxect39@gmail.com>

pkgname=cargo-component-git
_pkgname=cargo-component
pkgver=r33.b8ba57b
pkgrel=1
pkgdesc="Allows conveniently modify features of crate"
url="https://github.com/bytecodealliance/cargo-component"
conflicts=('cargo-component')
provides=('cargo-component')
depends=('cargo')
makedepends=('git')
arch=('i686' 'x86_64')
license=('Apache')
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname/"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$_pkgname/"
  cargo build --release --target-dir=target
}

package() {
  cd "$srcdir/$_pkgname/"
  install -Dm755 "target/release/cargo-component" "$pkgdir/usr/bin/cargo-component"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}