1 %define php_name php%{?php_suffix}
4 Summary: %{modname} - Map IP address to geographic places
5 Summary(pl.UTF-8): %{modname} - odwzorowanie adresów IP w miejsca geograficzne
6 Name: %{php_name}-pecl-%{modname}
10 Group: Development/Languages/PHP
11 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
12 # Source0-md5: 65263ac6d1c335f22ce818b3253912a5
13 Patch0: find_libgeoip.patch
14 URL: http://pecl.php.net/package/geoip/
15 BuildRequires: %{php_name}-devel >= 3:5.0.0
16 BuildRequires: GeoIP-devel >= 1.4.0
17 BuildRequires: rpmbuild(macros) >= 1.650
18 Suggests: GeoIP-db-City
19 Suggests: GeoIP-db-Country
20 Suggests: GeoIP-db-IPASNum
21 %{?requires_php_extension}
22 Requires: php(core) >= 5.0.4
23 Provides: php(geoip) = %{version}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 This PHP extension allows you to find the location of an IP address -
28 City, State, Country, Longitude, Latitude, and other information as
29 all, such as ISP and connection type.
31 In PECL status of this extension is: %{status}.
33 %description -l pl.UTF-8
34 To rozszerzenie pozwala na znalezienie miejsca, któremu odpowiada dany
35 adres IP - miasto, stan, kraj, szerokość i długość geograficzna czy
36 inne informacje, takie jak ISP czy typ połączenia.
38 To rozszerzenie ma w PECL status: %{status}.
42 mv %{modname}-%{version}/* .
45 sed -i -e 's,GEOIP_DIR/lib,GEOIP_DIR/%{_lib},g' config.m4
53 rm -rf $RPM_BUILD_ROOT
55 EXTENSION_DIR=%{php_extensiondir} \
56 INSTALL_ROOT=$RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
59 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
60 ; Enable %{modname} extension module
61 extension=%{modname}.so
65 rm -rf $RPM_BUILD_ROOT
68 %php_webserver_restart
72 %php_webserver_restart
76 %defattr(644,root,root,755)
78 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
79 %attr(755,root,root) %{php_extensiondir}/%{modname}.so