aboutsummaryrefslogtreecommitdiffstats
path: root/community/lastpass-cli/APKBUILD
blob: e8bd51074c946abd47c1beb2de998fe2a3e1666b (plain) (blame)
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.2
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="b293e86d70988aa5860a94fdc2bc65341bb253d2423c8f745730419400adc91ff860017d35657d283458c477c2385ff2532b8aefa752f886b207da8d10bf9018  lastpass-cli-1.3.2.tar.gz"