From f116f9cc1ff19f1edc0a9e0776fb544d186b9133 Mon Sep 17 00:00:00 2001 From: nigelj Date: Aug 08 2008 04:47:56 +0000 Subject: Initial Import --- diff --git a/.cvsignore b/.cvsignore index e69de29..918940e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +json-1.2.1.tgz diff --git a/php-pecl-json.spec b/php-pecl-json.spec new file mode 100644 index 0000000..2c434ba --- /dev/null +++ b/php-pecl-json.spec @@ -0,0 +1,84 @@ +%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 json + + +Name: php-pecl-json +Version: 1.2.1 +Release: 2%{?dist} +Summary: PECL library to implement JSON in PHP + +Group: Development/Libraries +License: PHP +URL: http://pecl.php.net/package/json +Source0: http://pecl.php.net/get/json-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: php-devel, php-pear +Requires(post): %{__pecl} +Requires(postun): %{__pecl} + +%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 + +Provides: php-pecl(json) = %{version} + + +%description +PHP support for JSON (JavaScript Object Notation) serialization. + +%prep +%setup -q -c + + +%build +cd json-%{version} +%{_bindir}/phpize +%configure +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +cd json-%{version} +make install INSTALL_ROOT=$RPM_BUILD_ROOT +# Install the package XML file +%{__mkdir_p} %{buildroot}%{pecl_xmldir} +%{__install} -m 644 ../package.xml %{buildroot}%{pecl_xmldir}/%{pecl_name}.xml + + + +%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 + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc json-%{version}/README +%{php_extdir}/json.so +%{pecl_xmldir}/%{pecl_name}.xml + +%changelog +* Fri Aug 08 2008 Nigel Jones - 1.2.1-2 +- Fix Requires: +* Thu Aug 07 2008 Nigel Jones - 1.2.1-1 +- Initial RPM (EL4/EL5) diff --git a/sources b/sources index e69de29..61abccb 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +d8904d2f004ceec85eeacf524cd25539 json-1.2.1.tgz