]> git.pld-linux.org Git - packages/php-pecl-geoip.git/blob - php-pecl-geoip.spec
- php 5.5 rebuild
[packages/php-pecl-geoip.git] / php-pecl-geoip.spec
1 %define         php_name        php%{?php_suffix}
2 %define         modname geoip
3 %define         status          status
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}
7 Version:        1.0.8
8 Release:        7
9 License:        PHP 3.01
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)
25
26 %description
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.
30
31 In PECL status of this extension is: %{status}.
32
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.
37
38 To rozszerzenie ma w PECL status: %{status}.
39
40 %prep
41 %setup -qc
42 mv %{modname}-%{version}/* .
43 %patch0 -p1
44
45 sed -i -e 's,GEOIP_DIR/lib,GEOIP_DIR/%{_lib},g' config.m4
46
47 %build
48 phpize
49 %configure
50 %{__make}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 %{__make} install \
55         EXTENSION_DIR=%{php_extensiondir} \
56         INSTALL_ROOT=$RPM_BUILD_ROOT
57
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
62 EOF
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 %php_webserver_restart
69
70 %postun
71 if [ "$1" = 0 ]; then
72         %php_webserver_restart
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc README ChangeLog
78 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
79 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.043596 seconds and 3 git commands to generate.