summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJon Gjengset2019-03-18 09:55:33 -0400
committerJon Gjengset2019-03-18 09:55:33 -0400
commit3c996e1486d24683954bd4dc5de5f25d2add6ecc (patch)
treea0889c97d38453160d29564d9e7957f4cdffb1bd /PKGBUILD
downloadaur-curb-git.tar.gz
First package
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 32 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..169aac5a630
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Jon Gjengset <jon@thesquareplanet.com>
+pkgname=curb-git
+pkgver=0.1.5.r10.2d9f461
+pkgrel=1
+pkgdesc="Run a process on a particular subset of the available hardware"
+arch=('x86_64')
+url="https://github.com/jonhoo/curb"
+license=('MIT')
+depends=('hwloc')
+makedepends=('git' 'cargo' 'hwloc')
+source=("$pkgname::git+https://github.com/jonhoo/${pkgname%-git}.git")
+sha512sums=('SKIP')
+pkgver() {
+ cd "$pkgname"
+
+ # get version from Cargo.toml
+ local version=$(grep version Cargo.toml | head -n1 | sed 's/.*"\(.*\)"/\1/')
+ # add on revision
+ printf "%s.r%s.%s" "$version" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$pkgname"
+
+ env -u CARGO_TARGET_DIR cargo build --release
+}
+
+package() {
+ cd "$pkgname"
+
+ install -Dm755 "target/release/curb" "$pkgdir/usr/bin/curb"
+}