[php-EasyRdf] Added php-composer(easyrdf/easyrdf) virtual provide
Shawn Iwinski
siwinski at fedoraproject.org
Fri Nov 14 00:21:06 UTC 2014
commit 4a9a9347831b94c84876870c87a2d24ddc1af7b2
Author: Shawn Iwinski <shawn.iwinski at gmail.com>
Date: Thu Nov 13 19:20:46 2014 -0500
Added php-composer(easyrdf/easyrdf) virtual provide
- Added option to build without tests ("--without tests")
- Reduce PHP min version from 5.3.3 to 5.2.8 (per composer.json)
- %license usage
php-EasyRdf.spec | 87 ++++++++++++++++++++++++++++++++++-------------------
1 files changed, 56 insertions(+), 31 deletions(-)
---
diff --git a/php-EasyRdf.spec b/php-EasyRdf.spec
index 7dca981..f87dc6d 100644
--- a/php-EasyRdf.spec
+++ b/php-EasyRdf.spec
@@ -1,8 +1,28 @@
-%global php_min_ver 5.3.3
+#
+# RPM spec file for php-EasyRdf
+#
+# Copyright (c) 2013-2014 Shawn Iwinski <shawn.iwinski at gmail.com>
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
+#
+
+%global composer_vendor easyrdf
+%global composer_project easyrdf
+
+# ">=5.2.8"
+%global php_min_ver 5.2.8
+
+# Build using "--without tests" to disable tests
+%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+
+%{!?phpdir: %global phpdir %{_datadir}/php}
+%{!?__phpunit: %global __phpunit %{_bindir}/phpunit}
Name: php-EasyRdf
Version: 0.8.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A PHP library designed to make it easy to consume and produce RDF
Group: Development/Libraries
@@ -11,12 +31,13 @@ URL: http://www.easyrdf.org
Source0: %{url}/downloads/easyrdf-%{version}.tar.gz
BuildArch: noarch
-# For tests
-BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
+%if %{with_tests}
BuildRequires: graphviz-gd
BuildRequires: raptor
-# For tests: phpcompatinfo (computed from 0.8.0)
+# compose.json
+BuildRequires: php(language) >= %{php_min_ver}
+BuildRequires: php-phpunit-PHPUnit
+# phpcompatinfo (computed from version 0.8.0)
BuildRequires: php-ctype
BuildRequires: php-date
BuildRequires: php-dom
@@ -29,9 +50,10 @@ BuildRequires: php-reflection
BuildRequires: php-simplexml
BuildRequires: php-spl
BuildRequires: php-xml
+%endif
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo requires (computed from 0.8.0)
+# phpcompatinfo requires (computed from version 0.8.0)
Requires: php-ctype
Requires: php-date
Requires: php-dom
@@ -44,6 +66,8 @@ Requires: php-simplexml
Requires: php-spl
Requires: php-xml
+Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
+
Obsoletes: %{name}-test
%description
@@ -77,7 +101,7 @@ Group: Documentation
%prep
-%setup -q -n easyrdf-%{version}
+%setup -qn easyrdf-%{version}
%build
@@ -85,11 +109,12 @@ Group: Documentation
%install
-mkdir -p -m 755 %{buildroot}%{_datadir}/php
-cp -rp lib/* %{buildroot}%{_datadir}/php/
+mkdir -p -m 0755 %{buildroot}%{phpdir}
+cp -rp lib/* %{buildroot}%{phpdir}/
%check
+%if %{with_tests}
: Temporarily skipping tests that sometimes cause timeout exceptions
sed -e 's/testSerialiseSvg/SKIP_testSerialiseSvg/' \
-e 's/testSerialiseSvg/SKIP_testSerialisePng/' \
@@ -98,18 +123,7 @@ sed -e 's/testSerialiseSvg/SKIP_testSerialiseSvg/' \
# Create PHPUnit config
cat > phpunit.xml <<'PHPUNIT'
<?xml version="1.0" encoding="UTF-8"?>
-<phpunit
- backupGlobals="false"
- backupStaticAttributes="false"
- colors="false"
- convertErrorsToExceptions="true"
- convertNoticesToExceptions="true"
- convertWarningsToExceptions="true"
- processIsolation="false"
- stopOnFailure="false"
- strict="true"
- syntaxCheck="false"
- verbose="false">
+<phpunit>
<testsuites>
<testsuite name="EasyRdf Library">
<directory suffix="Test.php">./test/EasyRdf/</directory>
@@ -118,23 +132,34 @@ cat > phpunit.xml <<'PHPUNIT'
</phpunit>
PHPUNIT
-phpunit -d date.timezone="UTC"
+%{__phpunit}
+%else
+: Tests skipped
+%endif
%files
-%doc *.md composer.json
-%{_datadir}/php/EasyRdf.php
-%{_datadir}/php/EasyRdf
+%{!?_licensedir:%global license %%doc}
+%license LICENSE.md
+%doc README.md CHANGELOG.md composer.json doap.rdf
+%{phpdir}/EasyRdf.php
+%{phpdir}/EasyRdf
%files doc
%doc LICENSE.md docs examples
%changelog
+* Thu Nov 13 2014 Shawn Iwinski <shawn.iwinski at gmail.com> - 0.8.0-3
+- Added php-composer(easyrdf/easyrdf) virtual provide
+- Added option to build without tests ("--without tests")
+- Reduce PHP min version from 5.3.3 to 5.2.8 (per composer.json)
+- %%license usage
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
-* Thu Jan 02 2014 Shawn Iwinski <shawn.iwinski at gmail.com> 0.8.0-1
+* Thu Jan 02 2014 Shawn Iwinski <shawn.iwinski at gmail.com> - 0.8.0-1
- Updated to 0.8.0
- Updated PHP min version from 5.2.8 to 5.3.3
- Added php-[libxml,mbstring,reflection,simplexml] requires
@@ -142,23 +167,23 @@ phpunit -d date.timezone="UTC"
- Updated %%check to use PHPUnit directly and skip tests that sometimes cause
timeout exceptions
-* Fri Nov 15 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 0.7.2-5
+* Fri Nov 15 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 0.7.2-5
- Removed test sub-package
- php-common => php(language)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
-* Mon Feb 04 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 0.7.2-3
+* Mon Feb 04 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 0.7.2-3
- Added note in %%description about optional dependencies
- Temporarily skip "EasyRdf_Serialiser_GraphVizTest::testSerialiseSvg" test
for Fedora > 18
-* Mon Jan 28 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 0.7.2-2
+* Mon Jan 28 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 0.7.2-2
- Tests run by default (i.e. without "--with tests")
- Fixes for tests
- Removed Mac files
- Separated docs into sub-package
-* Sun Jan 27 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 0.7.2-1
+* Sun Jan 27 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 0.7.2-1
- Initial package
More information about the scm-commits
mailing list