[php-simplepie] - fix for php 5.3.3 (RHEL-6) - disable test suite on RHEL-5 - better fix for rpmlint warnings (versi

Remi Collet remi at fedoraproject.org
Wed Jan 2 10:25:12 UTC 2013


commit 393e6285828d524cf26561cdac9a2511b4e9d953
Author: Remi Collet <remi at fedoraproject.org>
Date:   Wed Jan 2 11:24:41 2013 +0100

    - fix for php 5.3.3 (RHEL-6)
    - disable test suite on RHEL-5
    - better fix for rpmlint warnings (version-control-internal-file and script-without-shebang)

 php-simplepie.spec |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)
---
diff --git a/php-simplepie.spec b/php-simplepie.spec
index 10f765e..cabb341 100644
--- a/php-simplepie.spec
+++ b/php-simplepie.spec
@@ -1,6 +1,12 @@
+%if 0%{?fedora} > 14 || 0%{?rhel} > 5
+%global with_tests 1
+%else
+%global with_tests 0
+%endif
+
 Name:		php-simplepie
 Version:	1.3.1
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Simple RSS Library in PHP
 
 Group:		Development/Libraries
@@ -8,9 +14,14 @@ License:	BSD
 URL:		http://simplepie.org/
 Source0:	http://simplepie.org/downloads/simplepie_%{version}.zip
 
+# https://github.com/simplepie/simplepie/pull/258
+Patch0:	php-simplepie-php533.patch
+
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildArch:	noarch
-BuildRequires:	php-phpunit-PHPUnit
+%if %{with_tests}
+BuildRequires:	php-phpunit-PHPUnit > 3.6
+%endif
 
 Requires:	php-IDNA_Convert
 Requires:	php-curl
@@ -33,8 +44,12 @@ compatibility and standards compliance.
 
 %prep
 %setup -qn simplepie-simplepie-e9472a1
-chmod -x demo/cli_test.php
-chmod -x demo/for_the_demo/mediaplayer_readme.htm
+
+%patch0 -p1
+
+# fix rpmlint warnings
+find . -type f -exec chmod -x {} \;
+find . -name .git\* -exec rm -f {} \;
 
 
 %build
@@ -51,7 +66,11 @@ sed -e '/__FILE__/s/\..*$/;/' autoloader.php \
 
 
 %check
+%if %{with_tests}
 phpunit .
+%else
+: test suite disabled
+%endif
 
 
 %clean
@@ -65,6 +84,12 @@ rm -rf  %{buildroot}
 
 
 %changelog
+* Wed Jan  2 2013 Remi Collet <remi at fedoraproject.org> - 1.3.1-3
+- fix for php 5.3.3 (RHEL-6)
+- disable test suite on RHEL-5
+- better fix for rpmlint warnings
+  (version-control-internal-file and script-without-shebang)
+
 * Sun Dec 16 2012 Remi Collet <remi at fedoraproject.org> - 1.3.1-2
 - really install library
 - provides autoloader.php


More information about the scm-commits mailing list