3 %bcond_without tests # testing
5 %define php_name php%{?php_suffix}
6 Summary: PHP extension for interfacing with the GEOS library
7 Summary(pl.UTF-8): Rozszerzenie PHP do współpracy z biblioteką GEOS
12 License: LGPL v2.1 (GEOS code), MIT (PHP interfaces)
13 Group: Development/Languages/PHP
14 # http://git.osgeo.org/gogs/geos/php-geos
15 Source0: https://git.osgeo.org/gogs/geos/php-geos/archive/%{version}.tar.gz?/php-geos-%{version}.tar.gz
16 # Source0-md5: 5107e7062b12cccca5903b83c90c2955
17 URL: http://geos.osgeo.org/
18 %{?with_tests:BuildRequires: %{php_name}-cli >= 5}
19 BuildRequires: %{php_name}-devel >= 5
20 %{?with_tests:BuildRequires: %{php_name}-pcre >= 5}
21 BuildRequires: geos-devel >= 3.5
22 BuildRequires: rpmbuild(macros) >= 1.666
23 %{?requires_php_extension}
24 Provides: php(geos) = %{version}
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 PHP extension for interfacing with the GEOS library.
30 %description -l pl.UTF-8
31 Rozszerzenie PHP do współpracy z biblioteką GEOS.
43 PHP_EXECUTABLE=%{__php} \
44 RUN_TESTS_SETTINGS="-q -w failed.log"
46 test -f failed.log -a ! -s failed.log
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
54 EXTENSION_DIR=%{php_extensiondir} \
55 INSTALL_ROOT=$RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
58 cat <<EOF > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/geos.ini
59 ; Enable GEOS extension module
64 rm -rf $RPM_BUILD_ROOT
67 %php_webserver_restart
71 %php_webserver_restart
75 %defattr(644,root,root,755)
76 %doc COPYING MIT-LICENSE NEWS README.md TODO
77 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/geos.ini
78 %attr(755,root,root) %{php_extensiondir}/geos.so