summaryrefslogtreecommitdiff
path: root/pcr/nitrokey-app-git/PKGBUILD
blob: 507a1aab63f64ecf8a18d0db21e9c54a8b3b1852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
}