summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6b37b56c8449c3af697703ac09d86aa261fab646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Nick Milosevic <nick000@gmail.com>

_pkgname=php-facedetect
pkgname=${_pkgname}-git
pkgver=1.1.0.r15.gc717941
pkgrel=1
pkgdesc="PHP extension for opencv face detection"
license=('BSD')
arch=('any')
url="https://github.com/infusion/PHP-Facedetect"
depends=( 'php>=5.3' 'opencv>=2.0' 'gtkglext')
makedepends=('git')
backup=('etc/php/conf.d/facedetect.ini')
install=php-facedetect.install
source=("${_pkgname}"::"git+https://github.com/infusion/PHP-Facedetect.git")
sha512sums=('SKIP')

pkgver() {
	#cd "${_pkgname}-${pkgver}"
	cd $srcdir/${_pkgname}
	git describe --long --tags | sed 's/\([^v-]*-g\)/r\1/;s/-/./g' | sed 's/^v//g'
}

build() {
	cd "${srcdir}/${_pkgname}"

	phpize || return 1
	./configure --prefix=/usr
	make || return 1
}

package() {
	cd "$srcdir/${_pkgname}"

	echo ';extension=facedetect.so' > facedetect.ini
	install -D -m744 "$srcdir/${_pkgname}/modules/facedetect.so" "$pkgdir/usr/lib/php/modules/facedetect.so"
	install -D -m644 facedetect.ini "$pkgdir/etc/php/conf.d/facedetect.ini"
}