aboutsummaryrefslogtreecommitdiffstats
path: root/community/lastpass-cli/APKBUILD
blob: e4ee0fdd3e402ed7bb1fbb12b4cc528413a4c3f4 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lastpass-cli
pkgver=1.3.3
pkgrel=0
pkgdesc="LastPass command line interface tool"
url="https://lastpass.com"
arch="all"
license="GPL-2.0-or-later"
makedepends="asciidoc bash cmake curl-dev openssl-dev libxml2-dev"
subpackages="$pkgname-doc
	$pkgname-zsh-completion:zshcomp:noarch
	$pkgname-bash-completion:bashcomp:noarch
	$pkgname-fish-completion:fishcomp:noarch
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname/-*/}/$pkgname/archive/v${pkgver}.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make all
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install install-doc
}

check() {
	cd "$builddir"
	make test
}

zshcomp() {
	depends=""
	pkgdesc="Zsh completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	install -D -m644 "$builddir"/contrib/lpass_zsh_completion \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash"

	install -D -m644 "$builddir"/contrib/lpass_bash_completion \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname.bash
}

fishcomp() {
	pkgdesc="Fish completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel fish"

	install -D -m644 "$builddir"/contrib/completions-lpass.fish \
		"$subpkgdir"/usr/share/fish/completions/$pkgname.fish
}

sha512sums="9b9274cae1fe4045b7df4402170c522ab5765929739e76141b35a75ce3c8af824acd881e194face45e8721d6ce778bde97ff1a1ac23515de0c6dba28d61a8c7e  lastpass-cli-1.3.3.tar.gz"