aboutsummaryrefslogblamecommitdiffstats
path: root/community/pdfgrep/APKBUILD
blob: b6af4abc1cf80f5ec8805e9634d27eb68ec4aad0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                                                              

                                                    
               
            
        




                                                                  


                                                 




                                                                 







                                         







                                                  



















                                                                               
                                                                                                                                                                   
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=pdfgrep
pkgver=2.0.1
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
	$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 \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	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="4285f8cb514975a0040cdd6b82133090e27ba5c2f95ca880dccc3dd4fa3427260a5fc73d807df9124a79fa36ac6ed8c11380cde11e00599ed7134d92c50df4a0  pdfgrep-2.0.1.tar.gz"