diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2015-08-18 19:39:54 +0200 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2015-08-20 11:12:26 +0000 |
commit | 4788d4e12e26b18afbfb80e2f99b9153cb0db7b3 (patch) | |
tree | fe392d18e0facc65deda74bae1bfcfc576df36b0 /testing/tpm | |
parent | 8d1c52cec7ea0eebe76e66f0e81950949dcde6b2 (diff) | |
download | aports-4788d4e12e26b18afbfb80e2f99b9153cb0db7b3.tar.bz2 aports-4788d4e12e26b18afbfb80e2f99b9153cb0db7b3.tar.xz |
testing/tpm: split completion package
Diffstat (limited to 'testing/tpm')
-rw-r--r-- | testing/tpm/APKBUILD | 41 |
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" |