Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
:
extensions
>
php5-geoip
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 4
[-]
[+]
Added
php5-geoip.spec
@@ -0,0 +1,73 @@ +# norootforbuild +%define pkg_name geoip +%define php_version %(php-config --version 2>/dev/null) +# +Name: php5-geoip +Version: 1.0.2 +Release: 0 +License: PHP +Group: Productivity/Networking/Web/Servers +BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-build +BuildRequires: GeoIP-devel php5-devel +Requires: php5 = %{php_version} +URL: http://pecl.php.net/geoip +Source: http://pecl.php.net/package/geoip/%{pkg_name}-%{version}.tgz +Summary: PHP module for MaxMind GeoIP libraries +Patch0: geoip-1.0.1-lib64.patch + +%description + +This PHP extension allows you to find the location of an IP address - City, State, +Country, Longitude, Latitude, and other information as all, such as ISP and connection type. +For more info, please visit Maxmind's website. + +Authors: +--------- + + Olivier Hill <ohill@php.net> + +%prep +%setup -q -n %{pkg_name}-%{version} +%patch0 + +%build + +%{__mkdir} %{name} + +/usr/bin/phpize +pushd %{name} + +CFLAGS="%{optflags} -fno-strict-aliasing" +%if 0%{?suse_version} > 1000 +CFLAGS="$CFLAGS -fstack-protector" +%endif + +export CFLAGS + +../configure --with-geoip=%{_usr} --with-libdir=%{_lib} + +%{__make} %{?jobs:-j%jobs} +popd + +%install +%makeinstall -C %{name} INSTALL_ROOT=%{buildroot} +%{__mkdir_p} %{buildroot}%{_sysconfdir}/php5/conf.d +echo "; comment out next line to disable geoip extension in php" > %{buildroot}%{_sysconfdir}/php5/conf.d/geoip.ini +echo 'extension = geoip.so' >> %{buildroot}%{_sysconfdir}/php5/conf.d/geoip.ini +echo 'geoip.database_standard = /usr/share/GeoIP/GeoIP.dat' >> %{buildroot}%{_sysconfdir}/php5/conf.d/geoip.ini + + +%clean + +%{__rm} -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_libdir}/php5/extensions/geoip.so +%config(noreplace) %{_sysconfdir}/php5/conf.d/geoip.ini + +%doc README ChangeLog + +%changelog -n php5-geoip +* Thu Nov 16 2006 - soporte@onfocus.cl +- very first build