aboutsummaryrefslogtreecommitdiffstats
path: root/main/etckeeper/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/etckeeper/APKBUILD')
-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