]> git.pld-linux.org Git - packages/php-facedetect.git/blob - php-facedetect.spec
- release 2 (by relup.sh)
[packages/php-facedetect.git] / php-facedetect.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname facedetect
7 Summary:        PHP Facedetect Extension
8 Name:           %{php_name}-%{modname}
9 Version:        1.1.0
10 Release:        2
11 License:        PHP 3.0
12 Group:          Development/Languages/PHP
13 Source0:        https://github.com/infusion/PHP-Facedetect/archive/v%{version}/%{modname}-%{version}.tar.gz
14 # Source0-md5:  4ce5e01bf0933957b37f0d0c5735393a
15 URL:            http://www.xarg.org/project/php-facedetect/
16 BuildRequires:  %{php_name}-devel
17 BuildRequires:  opencv-devel
18 BuildRequires:  rpmbuild(macros) >= 1.650
19 %{?requires_php_extension}
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 This extension provides a PHP implementation of the OpenCV library.
24 The extension offers two new functions. In princible, they differ only
25 by their return value. The first returns only the number of faces
26 found on the given image and the other an associative array of their
27 coordinates.
28
29 %prep
30 %setup -q -n PHP-Facedetect-%{version}
31
32 %build
33 export LIBS=%{_libdir}/libopencv_*.so.*
34 phpize
35 %configure
36 %{__make}
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
41 %{__make} install \
42         EXTENSION_DIR=%{php_extensiondir} \
43         INSTALL_ROOT=$RPM_BUILD_ROOT
44
45 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
46 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
47 ; Enable %{modname} extension module
48 extension=%{modname}.so
49 EOF
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 %php_webserver_restart
56
57 %postun
58 if [ "$1" = 0 ]; then
59         %php_webserver_restart
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc CREDITS
65 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
66 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.060914 seconds and 3 git commands to generate.