Logoj0ke.net Open Build Service > Projects > internetx:php5:extensions > php5-geoip > Changes
Sign Up | Log In

Changes of Revision 4

[-] Added php5-geoip.spec
x
 
1
@@ -0,0 +1,73 @@
2
+# norootforbuild
3
+%define pkg_name    geoip
4
+%define php_version %(php-config --version 2>/dev/null)
5
+#
6
+Name: php5-geoip
7
+Version: 1.0.2
8
+Release: 0
9
+License: PHP
10
+Group: Productivity/Networking/Web/Servers
11
+BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-build
12
+BuildRequires: GeoIP-devel php5-devel
13
+Requires: php5 = %{php_version}
14
+URL: http://pecl.php.net/geoip
15
+Source: http://pecl.php.net/package/geoip/%{pkg_name}-%{version}.tgz
16
+Summary: PHP module for MaxMind GeoIP libraries
17
+Patch0:   geoip-1.0.1-lib64.patch
18
+
19
+%description
20
+
21
+This PHP extension allows you to find the location of an IP address - City, State,
22
+Country, Longitude, Latitude, and other information as all, such as ISP and connection type.
23
+For more info, please visit Maxmind's website.
24
+
25
+Authors:
26
+---------
27
+
28
+   Olivier Hill <ohill@php.net>
29
+
30
+%prep
31
+%setup -q -n %{pkg_name}-%{version}
32
+%patch0
33
+
34
+%build
35
+
36
+%{__mkdir} %{name}
37
+
38
+/usr/bin/phpize
39
+pushd %{name}
40
+
41
+CFLAGS="%{optflags} -fno-strict-aliasing"
42
+%if 0%{?suse_version} > 1000
43
+CFLAGS="$CFLAGS -fstack-protector"
44
+%endif
45
+
46
+export CFLAGS
47
+
48
+../configure --with-geoip=%{_usr} --with-libdir=%{_lib}
49
+
50
+%{__make} %{?jobs:-j%jobs}
51
+popd
52
+
53
+%install
54
+%makeinstall -C %{name} INSTALL_ROOT=%{buildroot}
55
+%{__mkdir_p} %{buildroot}%{_sysconfdir}/php5/conf.d
56
+echo "; comment out next line to disable geoip extension in php" > %{buildroot}%{_sysconfdir}/php5/conf.d/geoip.ini
57
+echo 'extension = geoip.so' >> %{buildroot}%{_sysconfdir}/php5/conf.d/geoip.ini
58
+echo 'geoip.database_standard = /usr/share/GeoIP/GeoIP.dat' >> %{buildroot}%{_sysconfdir}/php5/conf.d/geoip.ini
59
+
60
+
61
+%clean
62
+
63
+%{__rm} -rf %{buildroot}
64
+
65
+%files
66
+%defattr(-,root,root,-)
67
+%{_libdir}/php5/extensions/geoip.so
68
+%config(noreplace) %{_sysconfdir}/php5/conf.d/geoip.ini
69
+
70
+%doc README ChangeLog
71
+
72
+%changelog -n php5-geoip
73
+* Thu Nov 16 2006 - soporte@onfocus.cl
74
+- very first build
75