summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1387f962bd29e411f8d3a1eae882e40307447f60 (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
pkgname=xargo-git
_pkgname=xargo
pkgdesc="The sysroot manager that lets you build and customize std"
pkgrel=1
pkgver=0.3.12.268
arch=('i686' 'x86_64')
conflicts=("xargo")
provides=("xargo")
url="https://github.com/japaric/xargo"
license=('Apache' 'MIT')
depends=('rust' 'cargo')
makedepends=('rust' 'cargo')
optdepends=('rust-src: rust std source code')
source=("$_pkgname::git+https://github.com/japaric/xargo")
sha256sums=('SKIP')

pkgver() {
	cd $_pkgname
	echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).$(git rev-list --count HEAD)"
}

build() {
	cd $_pkgname
	sed -i "1d" src/main.rs
	env CARGO_INCREMENTAL=0 cargo build --release
}

package() {
	cd $_pkgname
	install -D -m755 "$srcdir/$_pkgname/target/release/xargo" "$pkgdir/usr/bin/xargo"
}