summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Luz2019-09-09 00:21:59 +0200
committerMaximilian Luz2019-09-09 00:21:59 +0200
commit705065e36c0a13e08132d89c76ae7dd2183d605b (patch)
tree61c9c29b5b927e65c55cc7a992d4787f5f07a74b
downloadaur-705065e36c0a13e08132d89c76ae7dd2183d605b.tar.gz
Initial release
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD46
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9675de0f16a6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = surface-control-git
+ pkgdesc = Control various aspects of Microsoft Surface devices from the Command-Line
+ pkgver = 0.2.3.r0.gd435532
+ pkgrel = 1
+ url = https://github.com/qzed/linux-surface-control
+ arch = x86_64
+ license = MIT
+ makedepends = rust
+ makedepends = cargo
+ depends = gcc-libs
+ provides = surface-control
+ conflicts = surface-control
+ source = surface-control::git+https://github.com/qzed/linux-surface-control.git
+ sha256sums = SKIP
+
+pkgname = surface-control-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..c3982649ebbf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg
+src
+surface-control
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b6ad2a4cb002
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Maximilian Luz <luzmaximilian@gmail.com>
+
+_pkgname='surface-control'
+pkgname="${_pkgname}-git"
+pkgver=0.2.3.r0.gd435532
+pkgrel=1
+pkgdesc='Control various aspects of Microsoft Surface devices from the Command-Line'
+url='https://github.com/qzed/linux-surface-control'
+license=('MIT')
+arch=('x86_64')
+depends=('gcc-libs')
+makedepends=('rust' 'cargo')
+
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+
+source=(
+ "${_pkgname}::git+https://github.com/qzed/linux-surface-control.git"
+)
+
+sha256sums=(
+ 'SKIP'
+)
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build(){
+ cd "${srcdir}/${_pkgname}"
+ env CARGO_TARGET_DIR="target" CARGO_INCREMENTAL=0 cargo build --release --locked
+ strip --strip-all "target/release/surface"
+}
+
+package() {
+ install -D -m755 "${srcdir}/${_pkgname}/target/release/surface" "$pkgdir/usr/bin/surface"
+
+ # completion files
+ install -D -m644 "${srcdir}/${_pkgname}/target/surface.bash" "$pkgdir/usr/share/bash-completion/completions/surface"
+ install -D -m644 "${srcdir}/${_pkgname}/target/_surface" "$pkgdir/usr/share/zsh/site-functions/_surface"
+ install -D -m644 "${srcdir}/${_pkgname}/target/surface.fish" "$pkgdir/usr/share/fish/completions/surface.fish"
+
+ # license
+ install -Dm644 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/surface-control/LICENSE"
+}