diff --git a/.cvsignore b/.cvsignore index e69de29..641116b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +geoip-1.0.7.tgz diff --git a/import.log b/import.log new file mode 100644 index 0000000..66f454b --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +php-pecl-geoip-1_0_7-2_fc11:F-10:php-pecl-geoip-1.0.7-2.fc11.src.rpm:1245780729 diff --git a/php-pecl-geoip.spec b/php-pecl-geoip.spec new file mode 100644 index 0000000..2973b69 --- /dev/null +++ b/php-pecl-geoip.spec @@ -0,0 +1,90 @@ +%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) +%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}} + +%define pecl_name geoip + +Name: php-pecl-geoip +Version: 1.0.7 +Release: 2%{?dist} +Summary: Extension to map IP addresses to geographic places +Group: Development/Languages +License: PHP +URL: http://pecl.php.net/package/%{pecl_name} +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: GeoIP-devel php-devel php-pear >= 1:1.4.0 +Requires(post): %{__pecl} +Requires(postun): %{__pecl} +Provides: php-pecl(geoip) = %{version} + +%if %{?php_zend_api}0 +Requires: php(zend-abi) = %{php_zend_api} +Requires: php(api) = %{php_core_api} +%else +Requires: php-api = %{php_apiver} +%endif + +%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. It makes use of Maxminds geoip +database + +%prep +%setup -c -q +[ -f package2.xml ] || %{__mv} package.xml package2.xml +%{__mv} package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml + +%build +cd %{pecl_name}-%{version} +phpize +%configure +%{__make} %{?_smp_mflags} + + +%install +cd %{pecl_name}-%{version} +%{__rm} -rf %{buildroot} +%{__make} install INSTALL_ROOT=%{buildroot} INSTALL="install -p" + +%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d +%{__cat} > %{buildroot}%{_sysconfdir}/php.d/%{pecl_name}.ini << 'EOF' +; Enable %{pecl_name} extension module +extension=%{pecl_name}.so +EOF + +%{__mkdir_p} %{buildroot}%{pecl_xmldir} +%{__install} -p -m 644 %{pecl_name}.xml %{buildroot}%{pecl_xmldir}/%{name}.xml + + +%clean +%{__rm} -rf %{buildroot} + +%if 0%{?pecl_install:1} +%post +%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +%endif + + +%if 0%{?pecl_uninstall:1} +%postun +if [ $1 -eq 0 ]; then +%{pecl_uninstall} %{pecl_name} >/dev/null || : +fi +%endif + +%files +%defattr(-,root,root,-) +%doc %{pecl_name}-%{version}/{README,ChangeLog} +%config(noreplace) %{_sysconfdir}/php.d/%{pecl_name}.ini +%{php_extdir}/%{pecl_name}.so +%{pecl_xmldir}/%{name}.xml + +%changelog +* Mon Jun 22 2009 Andrew Colin Kissa - 1.0.7-2 +- Fix timestamps on installed files + +* Sun Jun 14 2009 Andrew Colin Kissa - 1.0.7-1 +- Initial RPM package diff --git a/sources b/sources index e69de29..47591ca 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ca5397a1dacb62afd426c2065fc1e106 geoip-1.0.7.tgz