summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorNick Milosevic2018-03-16 10:08:37 -0700
committerNick Milosevic2018-03-16 10:08:37 -0700
commitf31c310457ec2a78888d67641bcba58f5ea15191 (patch)
tree27e16efeb0371e9e3063009d506a00a08f0a23c6 /PKGBUILD
downloadaur-php-facedetect-git.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6b37b56c8449
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,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"
+}