summaryrefslogtreecommitdiff
path: root/pcr/nitrokey-app-git
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/nitrokey-app-git')
-rw-r--r--pcr/nitrokey-app-git/PKGBUILD38
-rw-r--r--pcr/nitrokey-app-git/nitrokey-app.install20
2 files changed, 58 insertions, 0 deletions
diff --git a/pcr/nitrokey-app-git/PKGBUILD b/pcr/nitrokey-app-git/PKGBUILD
new file mode 100644
index 000000000..507a1aab6
--- /dev/null
+++ b/pcr/nitrokey-app-git/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer (Arch): Christoph J. Thompson <thompsonc@protonmail.ch>
+
+_pkgname=nitrokey-app
+pkgname=nitrokey-app-git
+pkgver=r626.g3b9d633
+pkgrel=1
+pkgdesc="Nitrokey management application"
+arch=('i686' 'x86_64')
+url="https://www.nitrokey.com"
+license=('GPL3')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+depends=('qt5-base' 'libusb>=1.0.0')
+makedepends=('git' 'cmake')
+source=("${_pkgname}::git+https://github.com/Nitrokey/nitrokey-app")
+install=nitrokey-app.install
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.g%s" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "${_pkgname}"
+ sed -i 's|/etc/udev/rules.d|/usr/lib/udev/rules.d|g' CMakeLists.txt
+ sed -i 's|/etc/bash_completion.d|/usr/share/bash-completion/completions|g' \
+ CMakeLists.txt
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DHAVE_LIBAPPINDICATOR=NO
+ make
+}
+
+package() {
+ cd "${_pkgname}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/pcr/nitrokey-app-git/nitrokey-app.install b/pcr/nitrokey-app-git/nitrokey-app.install
new file mode 100644
index 000000000..1d8842bbd
--- /dev/null
+++ b/pcr/nitrokey-app-git/nitrokey-app.install
@@ -0,0 +1,20 @@
+post_install() {
+ /usr/bin/getent group nitrokey >/dev/null 2>&1 || usr/sbin/groupadd -r nitrokey &>/dev/null
+ udevadm control --reload
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+ echo "Don't forget to add users to the nitrokey group."
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+ if /usr/bin/getent group nitrokey >/dev/null 2>&1; then
+ /usr/sbin/groupdel nitrokey
+ fi
+}
+