aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Riomar <henrik.riomar@gmail.com>2019-12-23 16:38:45 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-12-23 22:47:53 +0100
commitc74d01eae91c8fd7290f43b09138df497cf0c0f8 (patch)
treee575a6d28577c3c818b8a19bb50c196458f2bb6d
parent5bac803a5577a68282818e3fb407b0bee241e00f (diff)
downloadaports-c74d01eae91c8fd7290f43b09138df497cf0c0f8.tar.gz
aports-c74d01eae91c8fd7290f43b09138df497cf0c0f8.tar.bz2
aports-c74d01eae91c8fd7290f43b09138df497cf0c0f8.tar.xz
main/etckeeper: split completion
Split bash and zsh completions into subpkgs
-rw-r--r--main/etckeeper/APKBUILD29
1 files changed, 27 insertions, 2 deletions
diff --git a/main/etckeeper/APKBUILD b/main/etckeeper/APKBUILD
index 6a055467dd..f818c0f99e 100644
--- a/main/etckeeper/APKBUILD
+++ b/main/etckeeper/APKBUILD
@@ -3,14 +3,18 @@
pkgname=etckeeper
pkgver=1.18.13
-pkgrel=1
+pkgrel=2
pkgdesc="Store /etc in git."
url="http://etckeeper.branchable.com"
arch="noarch"
license="GPL-2.0-or-later"
checkdepends="bats fakeroot"
depends="findutils git"
-subpackages="$pkgname-doc"
+subpackages="
+ $pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-zsh-completion:zshcomp:noarch
+ "
options="!checkroot"
install="$pkgname.post-install $pkgname.pre-deinstall"
source="$pkgname-$pkgver.tar.gz::https://git.joeyh.name/index.cgi/etckeeper.git/snapshot/etckeeper-$pkgver.tar.gz
@@ -28,6 +32,27 @@ check() {
make test
}
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ install -dm755 "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/bash-completion \
+ "$subpkgdir"/usr/share/
+}
+
+zshcomp() {
+ depends=""
+ pkgdesc="Zsh completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
+
+ install -dm755 "$subpkgdir"/usr/share/zsh
+ mv "$pkgdir"/usr/share/zsh/vendor-completions \
+ "$subpkgdir"/usr/share/zsh/site-functions
+ rmdir "$pkgdir"/usr/share/zsh
+}
+
package() {
make install DESTDIR="$pkgdir"
rm -rf "$pkgdir"/lib/systemd