summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0e732f8f60b8248e17a4ad9a8b7427442d274ead (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
39
40
41
42
43
44
45
# Maintainer: Scott Hansen (firecat53) tech at firecat53 dot net

_pkgname=bitwarden-menu
_gitname=bitwarden-menu
pkgname=$_pkgname-git
pkgver=r50.7cb8386
pkgrel=1
pkgdesc="Dmenu/Rofi frontend for Bitwarden/Vaultwarden."

arch=('any')
url="https://github.com/firecat53/bitwarden-menu"
license=('MIT')
depends=('python' 'python-pynput' 'bitwarden-cli' 'python-xdg')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel'
             'python-hatchling' 'python-hatch-vcs')
optdepends=('dmenu: either dmenu or rofi is required'
            'rofi: either dmenu or rofi is required'
            'xdotool: required for typing non-U.S. Unicode characters'
            'ydotool: required for Wayland support')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+https://github.com/firecat53/$_gitname.git")
md5sums=('SKIP')
install="$_pkgname.install"

prepare() {
  git -C "$_gitname" clean -dfx
}

pkgver() {
  cd "$_gitname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$_gitname"
  python -m build --wheel --no-isolation
}

package() {
  cd "$_gitname"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 "$srcdir/$_gitname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 "$srcdir/$_gitname/bwm.1" "$pkgdir/usr/share/man/man1/bwm.1"
}