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