summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Stalder2021-11-06 23:51:10 +0100
committerNicolas Stalder2021-11-06 23:53:28 +0100
commit44eca59f75469c279adab1bb4ebfd7a31e8868e3 (patch)
tree4b7aa6ecb5428002aeaef4d2c0cadf00e9a82a48
downloadaur-44eca59f75469c279adab1bb4ebfd7a31e8868e3.tar.gz
PKGBUILD for Arch Linux
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore3
-rw-r--r--Makefile9
-rw-r--r--PKGBUILD45
4 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..83b2f62975f2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = solo2-cli
+ pkgdesc = Solo 2 CLI
+ pkgver = 0.0.6
+ pkgrel = 1
+ url = https://github.com/solokeys/solo2-cli
+ arch = x86_64
+ license = Apache
+ license = MIT
+ makedepends = cargo
+ makedepends = git
+ makedepends = systemd
+ depends = systemd-libs
+ conflicts = solo2-cli-git
+ source = solo2-cli-0.0.6.tar.gz::https://github.com/solokeys/solo2-cli/archive/refs/tags/v0.0.6.tar.gz
+ sha256sums = 083014e217779f190e49e4839ae99781c1559690a3ee5d96cbdcb1489e663049
+
+pkgname = solo2-cli
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4f45034679c9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+solo2*
+pkg
+src
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..160c06c49d57
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+build:
+ makepkg -f
+
+install:
+ makepkg -i
+
+clean:
+ rm -rf solo2*
+ rm -rf pkg src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2a711bb312a7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Nicolas Stalder <n+archlinux@stalder.io>
+pkgname=solo2-cli
+pkgver=0.0.6
+_pkgver=0.0.6
+pkgrel=1
+pkgdesc='Solo 2 CLI'
+arch=('x86_64')
+url="https://github.com/solokeys/solo2-cli"
+license=(Apache MIT)
+# we only need `libudev.so`, during build we also need `pkgconfig/udev/.pc`
+depends=(systemd-libs)
+# note we do not need Arch `hidapi` package here, it's a git submodule of Rust hidapi
+makedepends=(cargo git systemd)
+conflicts=(solo2-cli-git)
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/solokeys/solo2-cli/archive/refs/tags/v${_pkgver}.tar.gz"
+)
+sha256sums=(
+ "083014e217779f190e49e4839ae99781c1559690a3ee5d96cbdcb1489e663049"
+)
+
+build() {
+ cd "${pkgname}-${_pkgver}"
+ cargo build --release --locked
+}
+
+check() {
+ cd "${pkgname}-${_pkgver}"
+ # make sure shared libs work
+ target/release/solo2 --version
+ cargo test --release
+}
+
+package() {
+ cd "${pkgname}-${_pkgver}"
+ install -Dm755 target/release/solo2 "$pkgdir/usr/bin/solo2"
+ install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgnamefull/LICENSE-MIT"
+
+ # completions
+ install -Dm644 target/release/_solo2 -t $pkgdir/usr/share/zsh/site-functions
+ install -Dm644 target/release/solo2.bash $pkgdir/usr/share/bash-completion/completions/solo2
+
+ # udev rule
+ install -Dm644 70-solo2.rules -t $pkgdir/usr/lib/udev/rules.d
+}