aboutsummaryrefslogtreecommitdiffstats
path: root/community/lastpass-cli/APKBUILD
blob: e6fcacaf34ca4d868f54f4b842edd867c2ddd688 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lastpass-cli
pkgver=1.3.0
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 libressl-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() {
	make -C "$builddir" all
}

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

check() {
	make -C "$builddir" 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="7a147e08ac4b8e4e895744f80c484db9da895f4439bccbc141fe17e480285c76479753c2b879c60258d740af39775a3fae225ad193b5e6379a1cae8862c2a3ae  lastpass-cli-1.3.0.tar.gz"