aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2018-03-15 21:47:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-26 19:15:55 +0000
commitf73e489b63d44b96bb73e83d84d9d1ec3ee34af2 (patch)
treeec7a3a305d9180da247eb334ca06303edd283465 /community
parentcd0f7dce03ab95b48d00da69bdc9a0d29f86832f (diff)
downloadaports-f73e489b63d44b96bb73e83d84d9d1ec3ee34af2.tar.bz2
aports-f73e489b63d44b96bb73e83d84d9d1ec3ee34af2.tar.xz
community/lastpass-cli: upgrade to 1.3.0, add completions for fish & zsh
Diffstat (limited to 'community')
-rw-r--r--community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch35
-rw-r--r--community/lastpass-cli/APKBUILD51
2 files changed, 35 insertions, 51 deletions
diff --git a/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch b/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch
deleted file mode 100644
index 6cc03a787f..0000000000
--- a/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d170eb7809501ef16108c27be24ba4ab5797a9c3 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 26 Oct 2017 14:49:07 +0000
-Subject: [PATCH] generate: fix type for option parsing
-
-char may or may not be signed depending on architecture. If char is
-unsigned on a given architecture, then will the testing the return value
-from getopt_long (which is int) always fail. This happened on some
-architectures like ppc64le, aarch64 and s390x.
-
-To fix this we use same type as getopt_long return value: int.
-
-fixes #345
-
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
----
- cmd-generate.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmd-generate.c b/cmd-generate.c
-index ce16c25..9eff89a 100644
---- a/cmd-generate.c
-+++ b/cmd-generate.c
-@@ -61,7 +61,7 @@ int cmd_generate(int argc, char **argv)
- {"clip", no_argument, NULL, 'c'},
- {0, 0, 0, 0}
- };
-- char option;
-+ int option;
- int option_index;
- char *username = NULL;
- char *url = NULL;
---
-2.14.3
-
diff --git a/community/lastpass-cli/APKBUILD b/community/lastpass-cli/APKBUILD
index d043add160..e6fcacaf34 100644
--- a/community/lastpass-cli/APKBUILD
+++ b/community/lastpass-cli/APKBUILD
@@ -1,22 +1,23 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lastpass-cli
-pkgver=1.2.2
+pkgver=1.3.0
pkgrel=0
pkgdesc="LastPass command line interface tool"
-url="https://lastpass.com/"
+url="https://lastpass.com"
arch="all"
-license="GPL-2.0"
-makedepends="libressl-dev curl-dev libxml2-dev asciidoc cmake bash"
-subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
-source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname/-*/}/$pkgname/archive/v${pkgver}.tar.gz
- 0001-generate-fix-type-for-option-parsing.patch
+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() {
- cd "$builddir"
- make all
+ make -C "$builddir" all
}
package() {
@@ -25,16 +26,34 @@ package() {
}
check() {
- cd "$builddir"
- make test
+ 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="bash"
+ depends=""
pkgdesc="Bash completions for $pkgname"
- install -Dm 644 "$builddir"/contrib/lpass_bash_completion \
- "$subpkgdir"/usr/share/bash-completion/completions/lpass
+ 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="7d211c7669fe2de3e3f34cf00025376fd39a7f96c8573a0eaff64f322daab03de21e25d5875d3286a794580ac75d330c7bfe1005b377afc2b13e4ded9d78012c lastpass-cli-1.2.2.tar.gz
-7d40b54d6378ef2f79850f444113157334f5a7e76030cb2f5d0b962d0ebe87958859d3799420d19790b33deaf0453daab5645c8157a0e2d7eead158bb002c675 0001-generate-fix-type-for-option-parsing.patch"
+sha512sums="7a147e08ac4b8e4e895744f80c484db9da895f4439bccbc141fe17e480285c76479753c2b879c60258d740af39775a3fae225ad193b5e6379a1cae8862c2a3ae lastpass-cli-1.3.0.tar.gz"