]>
Commit | Line | Data |
---|---|---|
340a992b | 1 | %define _modname geoip |
61515c07 | 2 | %define _status status |
340a992b | 3 | Summary: %{_modname} - Map IP address to geographic places |
69468aad | 4 | Summary(pl.UTF-8): %{_modname} - odwzorowanie adresów IP w miejsca geograficzne |
340a992b | 5 | Name: php-pecl-%{_modname} |
0ec27305 AG |
6 | Version: 1.0.3 |
7 | Release: 1 | |
c4605439 | 8 | License: PHP 3.0.1 |
340a992b AG |
9 | Group: Development/Languages/PHP |
10 | Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz | |
0ec27305 | 11 | # Source0-md5: 7c534b67f4eb0fe38f0f0f46a8b2ab52 |
340a992b AG |
12 | URL: http://pecl.php.net/package/geoip/ |
13 | BuildRequires: GeoIP-devel | |
14 | BuildRequires: php-devel >= 3:5.0.0 | |
1bc96849 | 15 | BuildRequires: rpmbuild(macros) >= 1.344 |
340a992b | 16 | %{?requires_php_extension} |
1bc96849 | 17 | Requires: php-common >= 4:5.0.4 |
340a992b AG |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
20 | %description | |
21 | This PHP extension allows you to find the location of an IP address - | |
22 | City, State, Country, Longitude, Latitude, and other information as | |
23 | all, such as ISP and connection type. | |
24 | ||
25 | In PECL status of this extension is: %{_status}. | |
26 | ||
726c40a9 JR |
27 | %description -l pl.UTF-8 |
28 | To rozszerzenie pozwala na znalezienie miejsca, któremu odpowiada dany | |
29 | adres IP - miasto, stan, kraj, szerokość i długość geograficzna czy | |
30 | inne informacje, takie jak ISP czy typ połączenia. | |
340a992b | 31 | |
340a992b AG |
32 | To rozszerzenie ma w PECL status: %{_status}. |
33 | ||
34 | %prep | |
35 | %setup -q -c | |
36 | ||
37 | %build | |
38 | cd %{_modname}-%{version} | |
39 | phpize | |
40 | %configure | |
41 | %{__make} | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
1bc96849 | 45 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d |
340a992b AG |
46 | |
47 | %{__make} install \ | |
48 | -C %{_modname}-%{version} \ | |
49 | INSTALL_ROOT=$RPM_BUILD_ROOT \ | |
1bc96849 ER |
50 | EXTENSION_DIR=%{php_extensiondir} |
51 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini | |
340a992b AG |
52 | ; Enable %{_modname} extension module |
53 | extension=%{_modname}.so | |
54 | EOF | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %post | |
1bc96849 | 60 | %php_webserver_restart |
340a992b AG |
61 | |
62 | %postun | |
63 | if [ "$1" = 0 ]; then | |
1bc96849 | 64 | %php_webserver_restart |
340a992b AG |
65 | fi |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc %{_modname}-%{version}/{README,ChangeLog} | |
1bc96849 ER |
70 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini |
71 | %attr(755,root,root) %{php_extensiondir}/%{_modname}.so |