summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b2d24d1e6fc988f8532200a7bf10881a69eb39da (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
_pkgname=amber-bash
pkgname="${_pkgname}-git"
pkgver=r447.abfb15f
pkgrel=1
pkgdesc="The programming language compiled to bash"
url="https://amber-lang.com/"
makedepends=('cargo' 'rust')
arch=('any')
license=('GPL3')
provides=('amber-bash')
conflicts=('amber-bash')

source=("${_pkgname}::git+https://github.com/amber-lang/amber")
sha256sums=(SKIP)

build() {
	cd "${srcdir}/${_pkgname}"
	cargo b -r
}

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

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