summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD32
3 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..57d5b3e1c7d8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = curb-git
+ pkgdesc = Run a process on a particular subset of the available hardware
+ pkgver = 0.1.5.r10.2d9f461
+ pkgrel = 1
+ url = https://github.com/jonhoo/curb
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cargo
+ makedepends = hwloc
+ depends = hwloc
+ source = curb-git::git+https://github.com/jonhoo/curb.git
+ sha512sums = SKIP
+
+pkgname = curb-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..93595a489efb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*.pkg.tar.xz
+/src/
+/pkg/
+/curb-git/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..169aac5a630f
--- /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"
+}