Log in New API Help About

fingerprint-gui

1.8 KB of Bash
Created 2 months, 1 week ago by yochanan — expires in 296 days
https://dpaste.com/8GCL5TDXX
COPY TO CLIPBOARD SOFT WRAP RAW TEXT DUPLICATE DIFF
pkgname=fingerprint-gui
pkgver=1.09+g85a376e
_pkgver=1.09
pkgrel=1
pkgdesc="Use fingerprint readers with a Linux desktop environment"
arch=('x86_64')
url="https://github.com/RogueScholar/fingerprint-gui"
license=('GPL3' 'MPL2' 'CC0')
depends=('hicolor-icon-theme' 'libfakekey' 'libfprint-1' 'libusb' 'polkit-qt5' 'qca-qt5'
         'qt5-x11extras')
makedepends=('cmake' 'git' 'qt5-tools')
provides=('libbsapi.so=4.0' 'libbsapi.so=4.3')
_commit=85a376e908b1daee0e3e0760574b19dccd84afd4
source=("git+https://github.com/RogueScholar/fingerprint-gui.git#commit=$_commit"
        "92-$pkgname-usbdev.rules")
install="$pkgname.install"
sha256sums=('SKIP'
            '9102b06ab8118605fb7e29a0176592f36d82c7581eeb811fea8084eb3ca635ab')

pkgver() {
  cd "$srcdir/$pkgname"
  printf "%s+g%s" "$_pkgver" "$(git describe --long --tags --always | sed 's/^v//;s/-/+/g')"
}

prepare() {
  cd "$srcdir/$pkgname"

  # fix license filename
  sed -i 's/COPYING/LICENSE.md/g' CMakeLists.txt

  # fix rules path
  sed -i 's|91-fingerprint-gui-upek.rules|../conf/udev/91-fingerprint-gui-upek.rules|g' \
    upek/CMakeLists.txt
  sed -i 's|fingerprint-helper/92-fingerprint-gui-uinput.rules|../conf/udev/92-fingerprint-gui-uinput.rules|g' \
    bin/CMakeLists.txt
}

build() {
  cmake -B build -S "$pkgname" \
    -DCMAKE_BUILD_TYPE='None' \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -Wno-dev
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build

  cd "$srcdir/$pkgname"
  install -Dm644 LICENSES/CC0-1.0.txt -t "$pkgdir/usr/share/licenses/$pkgname/"

  install -m644 "$srcdir/92-$pkgname-usbdev.rules" -t "$pkgdir/usr/lib/udev/rules.d/"
  rm "$pkgdir/usr/lib/udev/rules.d/92-$pkgname-uinput.rules"

  # remove stray file
  rm "$pkgdir/etc/upek.cfg"
}

Share: