aboutsummaryrefslogtreecommitdiffstats
path: root/main/herbstluftwm
diff options
context:
space:
mode:
authorEivind Uggedal <eivind@uggedal.com>2015-09-09 13:56:59 +0000
committerEivind Uggedal <eivind@uggedal.com>2015-09-09 13:56:59 +0000
commita1ff53f00c267cbda63759e41877b7cfab98a006 (patch)
tree3282ef2425cddbde7d652466b3a5152a903da6ae /main/herbstluftwm
parenta61791fceb526369c62945d0ff50b1d8f7325a9f (diff)
downloadaports-a1ff53f00c267cbda63759e41877b7cfab98a006.tar.bz2
aports-a1ff53f00c267cbda63759e41877b7cfab98a006.tar.xz
herbstluftwm: add zsh-completion subpackage
Also add install_if on existing bash-completion subpackage
Diffstat (limited to 'main/herbstluftwm')
-rw-r--r--main/herbstluftwm/APKBUILD36
1 files changed, 27 insertions, 9 deletions
diff --git a/main/herbstluftwm/APKBUILD b/main/herbstluftwm/APKBUILD
index e4a34564ee..8b84daeac5 100644
--- a/main/herbstluftwm/APKBUILD
+++ b/main/herbstluftwm/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=herbstluftwm
pkgver=0.6.2
-pkgrel=0
+pkgrel=1
pkgdesc="Manual tiling window manager"
url="http://herbstluftwm.org"
arch="all"
@@ -11,7 +11,11 @@ depends_dev=""
makedepends="glib-dev libx11-dev libxinerama-dev"
options=""
install=""
-subpackages="$pkgname-doc $pkgname-bash-completion:completion"
+subpackages="
+ $pkgname-doc
+ $pkgname-bash-completion:bashcomp
+ $pkgname-zsh-completion:zshcomp
+ "
source="$url/tarballs/$pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -25,18 +29,32 @@ build() {
package() {
cd "$_builddir"
- make PREFIX=/usr DESTDIR="$pkgdir" install || return 1
+ make \
+ PREFIX=/usr \
+ DESTDIR="$pkgdir" \
+ ZSHCOMPLETIONDIR=/usr/share/zsh/site-functions \
+ BASHCOMPLETIONDIR=/usr/share/bash-completion/completions \
+ install || return 1
+}
+
+bashcomp() {
+ pkgdesc="Bash completion for $pkgname"
+ arch="noarch"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel bash"
- rm -r "$pkgdir"/usr/share/zsh
+ install -dm755 "$subpkgdir"/usr/share || return 1
+ mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
}
-completion() {
- pkgdesc="Bash completion script for herbstluftwm"
+zshcomp() {
+ pkgdesc="Zsh completion for $pkgname"
arch="noarch"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
- install -dm755 "$subpkgdir"/usr/share/bash-completion/completions
- mv "$pkgdir"/etc/bash_completion.d/herbstclient-completion \
- "$subpkgdir"/usr/share/bash-completion/completions/herbstclient
+ install -dm755 "$subpkgdir"/usr/share || return 1
+ mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share
}
md5sums="8bfbbdb16cf88821c8dacd5165590fd2 herbstluftwm-0.6.2.tar.gz"