aboutsummaryrefslogblamecommitdiffstats
path: root/community/pdfgrep/APKBUILD
blob: bbb650e178607f5744d4de79135cd04424f031ed (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.1.1
pkgrel=0
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"
checkdepends="dejagnu texlive"
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
	make
}

check() {
	cd "$builddir"
	make -k check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

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/
}

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
}

sha512sums="8c92967e3fe28587551a9226bb3b4066fd88a6cf440bff70a06bec94c6331f3954682e50d307c40a294baa4afdf6f0469f20c72f917c83e3db7f45a59c95c615  pdfgrep-2.1.1.tar.gz"