diff options
author | Caleb Bassi | 2018-12-28 04:23:22 -0800 |
---|---|---|
committer | Caleb Bassi | 2018-12-28 04:23:22 -0800 |
commit | 7569f4a1d70ac3114a15d3604442d9aec423dd70 (patch) | |
tree | ec57c976bd7a4aef20b5ac6fb62d6cef6336c69f | |
download | aur-evscript-git.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6f813f90a90b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = evscript-git + pkgdesc = A tiny sandboxed Dyon scripting environment for evdev input devices that lets you do e.g. xcape in Wayland + pkgver = r14.de6e09b + pkgrel = 1 + url = https://github.com/myfreeweb/evscript + arch = any + license = MIT + makedepends = git + makedepends = cargo + provides = evscript + conflicts = evscript + source = git+https://github.com/myfreeweb/evscript + md5sums = SKIP + +pkgname = evscript-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..943f259de26f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Caleb Bassi <calebjbassi@gmail.com> + +pkgname=evscript-git +_pkgname=${pkgname%-git} +pkgver=r14.de6e09b +pkgrel=1 +pkgdesc="A tiny sandboxed Dyon scripting environment for evdev input devices that lets you do e.g. xcape in Wayland" +arch=("any") +url="https://github.com/myfreeweb/evscript" +license=("MIT") +makedepends=("git" "cargo") +provides=(${_pkgname}) +conflicts=(${_pkgname}) +source=("git+${url}") +md5sums=("SKIP") + +# https://wiki.archlinux.org/index.php/VCS_package_guidelines +pkgver() { + cd "${_pkgname}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=loop +build() { + cd "${_pkgname}" + if command -v rustup > /dev/null 2>&1; then + RUSTFLAGS="-C target-cpu=native" rustup run stable \ + cargo build --release + elif rustc --version | grep -q nightly; then + RUSTFLAGS="-C target-cpu=native" \ + cargo build --release + else + cargo build --release + fi +} + +package() { + install -Dm755 "${srcdir}/${_pkgname}/target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" +} |