summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 483201bf58853f9ff710edf4cb56ea9673ee184a (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
# Maintainer: Gamma <GammaFunction@vivaldi.net>
pkgname=bwutil-git
pkgver=v0.1
pkgrel=3
license=('MIT')
pkgdesc='A wrapper for bitwarden'
url='https://github.com/xPMo/bwutil'
arch=('any')
provides=('bwutil')
conflicts=('bwutil')
depends=('zsh' 'bitwarden-cli')
makedepends=('git')
optdepends=('keyutils: Save BW_SESSION in kernel keyring')
source=("${pkgname}::git+${url}")
sha512sums=('SKIP')

pkgver () {
	cd "${pkgname}"
	(
		set -o pipefail
		git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

package () {
	cd "${pkgname}"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	PREFIX="${pkgdir}/usr" make install
}