aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tpm
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tpm')
-rw-r--r--testing/tpm/APKBUILD41
1 files changed, 29 insertions, 12 deletions
diff --git a/testing/tpm/APKBUILD b/testing/tpm/APKBUILD
index c7531469b1..0a04112ded 100644
--- a/testing/tpm/APKBUILD
+++ b/testing/tpm/APKBUILD
@@ -2,31 +2,48 @@
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=tpm
pkgver=1.2
-pkgrel=0
+pkgrel=1
pkgdesc="A tiny password manager"
-url="http://github.com/nmeum/tpm"
+url="http://github.com/nmeum/$pkgname"
arch="noarch"
license="GPL3"
depends="bash gnupg"
makedepends="perl"
install=""
-subpackages="$pkgname-doc $pkgname-completion"
-source="tpm-${pkgver}.tar.gz::https://github.com/nmeum/tpm/archive/${pkgver}.tar.gz"
+subpackages="
+ $pkgname-doc
+ $pkgname-zsh-completion:bashcomp
+ $pkgname-bash-completion:zshcomp"
+source="$pkgname-$pkgver.tar.gz::https://github.com/nmeum/$pkgname/archive/$pkgver.tar.gz"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+build() {
+ make -C "$_builddir"
+}
-_builddir="$srcdir/tpm-$pkgver"
package() {
make DESTDIR="$pkgdir" PREFIX="/usr" \
-C "$_builddir" install
}
-completion() {
- pkgdesc="bash/zsh completion files for tpm"
- cd "$_builddir"
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash"
+ arch="noarch"
+
+ install -Dm644 "$_builddir"/bash_completion \
+ "$subpkgdir"/usr/share/bash-completion/completions/${pkgname}
+}
+
+zshcomp() {
+ depends=""
+ pkgdesc="Zsh completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
+ arch="noarch"
- install -Dm644 zsh_completion \
- "${subpkgdir}/usr/share/zsh/site-functions/_${pkgname}"
- install -Dm644 bash_completion \
- "${subpkgdir}/usr/share/bash-completion/completions/${pkgname}"
+ install -Dm644 "$_builddir"/zsh_completion \
+ "$subpkgdir"/usr/share/zsh/site-functions/_${pkgname}
}
md5sums="d522223a0776d337b75ec686dca3d50b tpm-1.2.tar.gz"