]> git.pld-linux.org Git - SPECS.git/blob - php-facedetect.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.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:        5
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 Patch0:         opencv3.patch
16 URL:            http://www.xarg.org/project/php-facedetect/
17 BuildRequires:  %{php_name}-devel
18 BuildRequires:  opencv-devel
19 BuildRequires:  rpmbuild(macros) >= 1.650
20 %{?requires_php_extension}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 This extension provides a PHP implementation of the OpenCV library.
25 The extension offers two new functions. In princible, they differ only
26 by their return value. The first returns only the number of faces
27 found on the given image and the other an associative array of their
28 coordinates.
29
30 %prep
31 %setup -q -n PHP-Facedetect-%{version}
32 %patch0 -p1
33
34 %build
35 export LIBS=%{_libdir}/libopencv_*.so.*
36 phpize
37 %configure
38 %{__make}
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
43 %{__make} install \
44         EXTENSION_DIR=%{php_extensiondir} \
45         INSTALL_ROOT=$RPM_BUILD_ROOT
46
47 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
48 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
49 ; Enable %{modname} extension module
50 extension=%{modname}.so
51 EOF
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 %php_webserver_restart
58
59 %postun
60 if [ "$1" = 0 ]; then
61         %php_webserver_restart
62 fi
63
64 %files
65 %defattr(644,root,root,755)
66 %doc CREDITS
67 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
68 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.395175 seconds and 3 git commands to generate.