[arch-commits] Commit in (nitrocli nitrocli/trunk nitrocli/trunk/PKGBUILD)

Maxime Gauduin alucryd at gemini.archlinux.org
Fri Jul 30 09:18:20 UTC 2021


    Date: Friday, July 30, 2021 @ 09:18:20
  Author: alucryd
Revision: 990960

add nitrocli

Added:
  nitrocli/
  nitrocli/trunk/
  nitrocli/trunk/PKGBUILD

----------+
 PKGBUILD |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

Added: nitrocli/trunk/PKGBUILD
===================================================================
--- nitrocli/trunk/PKGBUILD	                        (rev 0)
+++ nitrocli/trunk/PKGBUILD	2021-07-30 09:18:20 UTC (rev 990960)
@@ -0,0 +1,59 @@
+# Maintainer: Maxime Gauduin <alucryd at archlinux.org>
+# Contributor: Robin Krahl <robin.krahl at ireas.org>
+
+pkgname=nitrocli
+pkgver=0.4.1
+pkgrel=1
+pkgdesc='A command line tool for interacting with Nitrokey devices'
+arch=(x86_64)
+url=https://github.com/d-e-s-o/nitrocli
+license=(GPL3)
+depends=(
+  gnupg
+  libnitrokey.so
+)
+makedepends=(
+  cargo
+  git
+)
+optdepends=('bash-completion: Bash completion support')
+_tag=8a8250f262100a95164a7b0ff8e1ea7d5c17e3a6
+source=(git+https://github.com/d-e-s-o/nitrocli.git#tag=${_tag})
+b2sums=(SKIP)
+
+prepare() {
+  cargo fetch \
+    --locked \
+    --manifest-path nitrocli/Cargo.toml
+}
+
+pkgver() {
+  cd nitrocli
+  git describe --tags | sed 's/^v//'
+}
+
+build() {
+  export USE_SYSTEM_LIBNITROKEY=1
+  cargo build \
+    --release \
+    --frozen \
+    --manifest-path nitrocli/Cargo.toml
+  cargo run \
+    --release \
+    --manifest-path nitrocli/Cargo.toml \
+    --bin=shell-complete bash > nitrocli.bash
+}
+
+package() {
+  cargo install \
+    --frozen \
+    --offline \
+    --no-track \
+    --path nitrocli \
+    --bin nitrocli \
+    --root "${pkgdir}"/usr
+  install -Dm 644 nitrocli/doc/nitrocli.1 "${pkgdir}"/usr/share/man/man1/nitrocli.1
+  install -Dm 644 nitrocli.bash "${pkgdir}"/usr/share/bash-completion/completions/nitrocli
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list