aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2017-02-22 02:00:50 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2017-02-22 02:00:50 +0100
commit3fd7a225149288f7f8c9edb4334866106b54415a (patch)
tree27e7989edf9b459c2f053a27764bf5cd14043294 /testing
parentd985d5708e4a4829f794db16817da61e787d073f (diff)
downloadaports-3fd7a225149288f7f8c9edb4334866106b54415a.tar.bz2
aports-3fd7a225149288f7f8c9edb4334866106b54415a.tar.xz
testing/pdfgrep: move bash and zsh completions to a subpackage
Diffstat (limited to 'testing')
-rw-r--r--testing/pdfgrep/APKBUILD36
1 files changed, 33 insertions, 3 deletions
diff --git a/testing/pdfgrep/APKBUILD b/testing/pdfgrep/APKBUILD
index deb3352efb..bf4ca5fbc1 100644
--- a/testing/pdfgrep/APKBUILD
+++ b/testing/pdfgrep/APKBUILD
@@ -1,20 +1,30 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Andre Klitzing <aklitzing@gmail.com>
# Maintainer: Andre Klitzing <aklitzing@gmail.com>
pkgname=pdfgrep
pkgver=2.0
-pkgrel=0
+pkgrel=1
pkgdesc="Commandline utility to search text in PDF files"
url="https://pdfgrep.org/"
arch="all"
license="GPL"
makedepends="autoconf automake pcre-dev poppler-dev libgcrypt-dev"
-subpackages="$pkgname-doc"
+subpackages="$pkgname-doc
+ $pkgname-zsh-completion:zshcomp:noarch
+ $pkgname-bash-completion:bashcomp:noarch"
source="https://pdfgrep.org/download/${pkgname}-${pkgver}.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
- ./configure --prefix=/usr || return 1
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ || return 1
make || return 1
}
@@ -23,4 +33,24 @@ package() {
make DESTDIR="$pkgdir" install || return 1
}
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/
+ mv "$pkgdir"/usr/share/bash-completion/completions/* \
+ "$subpkgdir"/usr/share/bash-completion/completions/ || return 1
+}
+
+zshcomp() {
+ depends=""
+ pkgdesc="Zsh completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
+
+ mkdir -p "$subpkgdir"/usr/share/zsh/site-functions/
+ mv "$pkgdir"/usr/share/zsh/site-functions/* \
+ "$subpkgdir"/usr/share/zsh/site-functions || return 1
+}
+
sha512sums="e289a5202c500a794ad4b17c4b07aa4e4592a17818010d90ffbdb1d4db5ee61557bb35ecebeee2bc7595275e27c82bbd98c68fe6148b50f0bc60296c479c578e pdfgrep-2.0.tar.gz"