packages: php-phpquery/php-phpquery.spec (NEW), php-phpquery/sys-mbstring.p...

glen glen at pld-linux.org
Wed Feb 8 21:25:28 CET 2012


Author: glen                         Date: Wed Feb  8 20:25:28 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new

---- Files affected:
packages/php-phpquery:
   php-phpquery.spec (NONE -> 1.1)  (NEW), sys-mbstring.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/php-phpquery/php-phpquery.spec
diff -u /dev/null packages/php-phpquery/php-phpquery.spec:1.1
--- /dev/null	Wed Feb  8 21:25:28 2012
+++ packages/php-phpquery/php-phpquery.spec	Wed Feb  8 21:25:22 2012
@@ -0,0 +1,86 @@
+# $Revision$, $Date$
+%define		pkgname	phpQuery
+%define		php_min_version 5.2.0
+%include	/usr/lib/rpm/macros.php
+Summary:	phpQuery - jQuery port to PHP
+Name:		php-phpquery
+Version:	0.9.5.386
+Release:	0.10
+License:	The MIT License
+Group:		Development/Languages/PHP
+Source0:	https://phpquery.googlecode.com/files/phpQuery-%{version}.zip
+# Source0-md5:	3ddab515c82a1a102a87f90ab319e7d1
+Patch0:		sys-mbstring.patch
+URL:		https://code.google.com/p/phpquery/
+BuildRequires:	rpm-php-pearprov >= 4.4.2-11
+BuildRequires:	rpmbuild(macros) >= 1.610
+BuildRequires:	unzip
+BuildRequires:	sed >= 4.0
+Requires:	php-common >= 4:%{php_min_version}
+Requires:	php-date
+Requires:	php-dom
+Requires:	php-json
+Requires:	php-mbstring
+Requires:	php-pcre
+Requires:	php-pear
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+# bad depsolver
+%define		_noautopear	pear(phpQuery.php/phpQuery/.*) pear(phpQuery/plugins/Scripts/__config.php)
+
+# put it together for rpmbuild
+%define		_noautoreq	%{?_noautophp} %{?_noautopear}
+
+%description
+phpQuery is a server-side, chainable, CSS3 selector driven Document
+Object Model (DOM) API based on jQuery JavaScript Library.
+
+%prep
+%setup -qc
+mv phpQuery .pq; mv .pq/* .
+%patch0 -p1
+
+# fix shebang
+%{__sed} -i -e '1s,^#!.*env php,#!/usr/bin/php,' cli/phpquery
+
+# use ext
+rm %{pkgname}/%{pkgname}/compat/mbstring.php
+rmdir %{pkgname}/%{pkgname}/compat
+
+# use Zend packages directly
+mv %{pkgname}/%{pkgname}/Zend .
+
+# separate examples
+install -d examples/plugins/Scripts
+mv %{pkgname}/%{pkgname}/bootstrap.example.php examples
+mv %{pkgname}/%{pkgname}/plugins/Scripts/*example.php examples/plugins/Scripts
+mv %{pkgname}/%{pkgname}/plugins/*example.php examples/plugins
+mv demo.php examples
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{php_data_dir}/%{pkgname},%{_bindir},%{_examplesdir}/%{name}-%{version}}
+
+cp -a %{pkgname}/* $RPM_BUILD_ROOT%{php_data_dir}
+install -p cli/phpquery $RPM_BUILD_ROOT%{_bindir}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/phpquery
+%{php_data_dir}/phpQuery.php
+%{php_data_dir}/phpQuery
+%{_examplesdir}/%{name}-%{version}
+
+%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  2012/02/08 20:25:22  glen
+- new

================================================================
Index: packages/php-phpquery/sys-mbstring.patch
diff -u /dev/null packages/php-phpquery/sys-mbstring.patch:1.1
--- /dev/null	Wed Feb  8 21:25:28 2012
+++ packages/php-phpquery/sys-mbstring.patch	Wed Feb  8 21:25:22 2012
@@ -0,0 +1,10 @@
+--- phpQuery-0.9.5.386/phpQuery/phpQuery.php~	2012-02-08 20:41:06.000000000 +0200
++++ phpQuery-0.9.5.386/phpQuery/phpQuery.php	2012-02-08 20:43:11.480245153 +0200
+@@ -23,7 +23,6 @@
+ require_once(dirname(__FILE__).'/phpQuery/phpQueryEvents.php');
+ require_once(dirname(__FILE__).'/phpQuery/Callback.php');
+ require_once(dirname(__FILE__).'/phpQuery/phpQueryObject.php');
+-require_once(dirname(__FILE__).'/phpQuery/compat/mbstring.php');
+ /**
+  * Static namespace for phpQuery functions.
+  *
================================================================


More information about the pld-cvs-commit mailing list