mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 12:01:41 +02:00
testing/tpm: split completion package
This commit is contained in:
parent
8d1c52cec7
commit
4788d4e12e
@ -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 zsh_completion \
|
||||
"${subpkgdir}/usr/share/zsh/site-functions/_${pkgname}"
|
||||
install -Dm644 bash_completion \
|
||||
"${subpkgdir}/usr/share/bash-completion/completions/${pkgname}"
|
||||
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 "$_builddir"/zsh_completion \
|
||||
"$subpkgdir"/usr/share/zsh/site-functions/_${pkgname}
|
||||
}
|
||||
|
||||
md5sums="d522223a0776d337b75ec686dca3d50b tpm-1.2.tar.gz"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user