summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ab3d239b87f1d4d48ea294247ae87b658ef173c (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
#!/bin/bash
# PKGBUILD License Artistic 2.0 https://choosealicense.com/licenses/artistic-2.0/
# Maintainer: Caleb Cushing <xenoterracide@gmail.com>
# Contributor: Caleb Cushing <xenoterracide@gmail.com>

# PKGBUILD slightly ripped off ofrom exa-git PKGBUILD

_pkgname=brix
pkgname=${_pkgname}-git
pkgver=0.3.0.beta.2.r9.g23c2cf9
pkgrel=2
pkgdesc='Brix Scaffolding System'
arch=('i686' 'x86_64')
url="https://github.com/miapolis/${_pkgname}"
license=('MIT')
makedepends=('cargo' 'git')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("git+${url}.git")
md5sums=('SKIP')

pkgver() {
  cd $_pkgname
  printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')"
}

prepare() {
  cd $_pkgname
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd $_pkgname
  export RUSTFLAGS="-C target-cpu=native"
  cargo build --frozen --release
}

package() {
  target="target/release"
  cd $_pkgname
  install -Dm755 "$target/$_pkgname" -t "$pkgdir/usr/bin"
}