]>
Commit | Line | Data |
---|---|---|
59f7b3ce JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # testing | |
4 | ||
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 | |
8 | Name: %{php_name}-geos | |
9 | Version: 1.0.0 | |
4a754648 JB |
10 | Release: 2 |
11 | Epoch: 1 | |
59f7b3ce JB |
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 | |
4a754648 | 20 | %{?with_tests:BuildRequires: %{php_name}-pcre >= 5} |
59f7b3ce JB |
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) | |
26 | ||
27 | %description | |
28 | PHP extension for interfacing with the GEOS library. | |
29 | ||
30 | %description -l pl.UTF-8 | |
31 | Rozszerzenie PHP do współpracy z biblioteką GEOS. | |
32 | ||
33 | %prep | |
34 | %setup -q -n php-geos | |
35 | ||
36 | %build | |
37 | phpize | |
38 | %configure | |
39 | %{__make} | |
40 | ||
41 | %if %{with tests} | |
42 | %{__make} check \ | |
43 | PHP_EXECUTABLE=%{__php} \ | |
44 | RUN_TESTS_SETTINGS="-q -w failed.log" | |
45 | ||
46 | test -f failed.log -a ! -s failed.log | |
47 | %endif | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} | |
52 | ||
53 | %{__make} install \ | |
54 | EXTENSION_DIR=%{php_extensiondir} \ | |
55 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
56 | ||
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 | |
60 | extension=geos.so | |
61 | EOF | |
62 | ||
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %post | |
67 | %php_webserver_restart | |
68 | ||
69 | %postun | |
70 | if [ "$1" = 0 ]; then | |
71 | %php_webserver_restart | |
72 | fi | |
73 | ||
74 | %files | |
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 |