]> git.pld-linux.org Git - packages/php-pecl-geoip.git/blob - php-pecl-geoip.spec
- BR GeoIP 1.4.0
[packages/php-pecl-geoip.git] / php-pecl-geoip.spec
1 %define         modname geoip
2 %define         status          status
3 Summary:        %{modname} - Map IP address to geographic places
4 Summary(pl.UTF-8):      %{modname} - odwzorowanie adresów IP w miejsca geograficzne
5 Name:           php-pecl-%{modname}
6 Version:        1.0.8
7 Release:        1
8 License:        PHP 3.01
9 Group:          Development/Languages/PHP
10 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
11 # Source0-md5:  65263ac6d1c335f22ce818b3253912a5
12 Patch0:         find_libgeoip.patch
13 URL:            http://pecl.php.net/package/geoip/
14 BuildRequires:  GeoIP-devel > 1.4.0
15 BuildRequires:  php-devel >= 3:5.0.0
16 BuildRequires:  rpmbuild(macros) >= 1.344
17 %{?requires_php_extension}
18 Requires:       php-common >= 4:5.0.4
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 This PHP extension allows you to find the location of an IP address -
23 City, State, Country, Longitude, Latitude, and other information as
24 all, such as ISP and connection type.
25
26 In PECL status of this extension is: %{status}.
27
28 %description -l pl.UTF-8
29 To rozszerzenie pozwala na znalezienie miejsca, któremu odpowiada dany
30 adres IP - miasto, stan, kraj, szerokość i długość geograficzna czy
31 inne informacje, takie jak ISP czy typ połączenia.
32
33 To rozszerzenie ma w PECL status: %{status}.
34
35 %prep
36 %setup -qc
37 mv %{modname}-%{version}/* .
38 %patch0 -p1
39
40 sed -i -e 's,GEOIP_DIR/lib,GEOIP_DIR/%{_lib},g' config.m4
41
42 %build
43 phpize
44 %configure
45 %{__make}
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 %{__make} install \
50         EXTENSION_DIR=%{php_extensiondir} \
51         INSTALL_ROOT=$RPM_BUILD_ROOT
52
53 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
54 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
55 ; Enable %{modname} extension module
56 extension=%{modname}.so
57 EOF
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 %php_webserver_restart
64
65 %postun
66 if [ "$1" = 0 ]; then
67         %php_webserver_restart
68 fi
69
70 %files
71 %defattr(644,root,root,755)
72 %doc README ChangeLog
73 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
74 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.134115 seconds and 3 git commands to generate.