SPECS: php-json.spec (NEW) - new

glen glen at pld-linux.org
Mon Jul 31 16:35:31 CEST 2006


Author: glen                         Date: Mon Jul 31 14:35:31 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- new

---- Files affected:
SPECS:
   php-json.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/php-json.spec
diff -u /dev/null SPECS/php-json.spec:1.1
--- /dev/null	Mon Jul 31 16:35:31 2006
+++ SPECS/php-json.spec	Mon Jul 31 16:35:26 2006
@@ -0,0 +1,71 @@
+# $Revision$, $Date$
+%define		_modname	json
+%define		_sysconfdir	/etc/php
+%define		extensionsdir	%(php-config --extension-dir 2>/dev/null)
+
+Summary:	%{_pearname} - PHP C extension for JSON
+Name:		php-%{_modname}
+Version:	1.2.1
+Release:	0.1
+License:	GPL v2
+Group:		Development/Languages/PHP
+Source0:	http://www.aurore.net/projects/php-json/php-json-ext-%{version}.tar.bz2
+# Source0-md5:	e06e701412a055f3372775216ec3d604
+URL:		http://www.aurore.net/projects/php-json/
+BuildRequires:	php-devel >= 3:5.0.3
+BuildRequires:	rpmbuild(macros) >= 1.254
+%{?requires_php_extension}
+Requires:	%{_sysconfdir}/conf.d
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+php-json is an extremely fast PHP C extension for JSON (JavaScript
+Object Notation) serialisation.
+
+%prep
+%setup -q -n php-%{_modname}-ext-%{version}
+
+%build
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
+
+%{__make} install \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+; Enable %{_modname} extension module
+extension=%{_modname}.so
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+
+%postun
+if [ "$1" = 0 ]; then
+	[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+	[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc README
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
+%attr(755,root,root) %{extensionsdir}/%{_modname}.so
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2006/07/31 14:35:26  glen
+- new
+
================================================================


More information about the pld-cvs-commit mailing list