summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-02-07 18:18:08 +0100
committerRemi Collet <fedora@famillecollet.com>2013-02-07 18:18:08 +0100
commit415d19672816a3f8c00990477e131fcd6a1cb5e6 (patch)
tree9cf43977b6d045b436f1bd6950143bb32102b1cd
parent225416a85bd6b67768fc97027c36853be99a81aa (diff)
php-EasyRdf: backport
-rw-r--r--Makefile10
-rw-r--r--php-EasyRdf.spec39
2 files changed, 43 insertions, 6 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d095534
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+INCL1 := $(shell php-config --includes)
+INCL2 := -I $(shell php-config --include-dir)/sapi/embed
+LIBS := -lphp5 $(shell php-config --libs)
+
+include ../../common/Makefile
+
+tembed: tembed.c
+ gcc -Wall $(INCL1) $(INCL2) tembed.c $(LIBS) -o tembed
diff --git a/php-EasyRdf.spec b/php-EasyRdf.spec
index 9d889bf..8672863 100644
--- a/php-EasyRdf.spec
+++ b/php-EasyRdf.spec
@@ -2,6 +2,15 @@
# lib/EasyRdf/Parser/Json.php are conditional
%global php_min_ver 5.2.8
+%if 0%{?fedora} > 9 || 0%{?rhel} > 5
+%global with_test 1
+%else
+# need raptor 1.4.17
+%global with_test 0
+%endif
+
+# TODO see for php-redland not yet available in remirepo
+
Name: php-EasyRdf
Version: 0.7.2
Release: 3%{?dist}
@@ -12,29 +21,32 @@ License: BSD
URL: http://www.easyrdf.org
Source0: %{url}/downloads/easyrdf-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
-BuildRequires: php-common >= %{php_min_ver}
+BuildRequires: php(language) >= %{php_min_ver}
+%if %{with_test}
BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
-BuildRequires: graphviz-gd
-BuildRequires: raptor
+BuildRequires: graphviz
+BuildRequires: raptor >= 1.4.17
# phpci
BuildRequires: php-ctype
BuildRequires: php-date
BuildRequires: php-dom
BuildRequires: php-json
BuildRequires: php-pcre
-BuildRequires: php-redland
+#BuildRequires: php-redland
BuildRequires: php-spl
BuildRequires: php-xml
+%endif
-Requires: php-common >= %{php_min_ver}
+Requires: php(language) >= %{php_min_ver}
# phpci requires
Requires: php-ctype
Requires: php-date
Requires: php-dom
Requires: php-json
Requires: php-pcre
-Requires: php-redland
+#Requires: php-redland
Requires: php-spl
Requires: php-xml
@@ -129,23 +141,38 @@ sed 's/testSerialiseSvg/SKIP_TEST_testSerialiseSvg/' \
-i test/EasyRdf/Serialiser/GraphVizTest.php
%endif
+%if %{with_test}
+: graphviz have optional gif support
+sed 's/testSerialiseGif/SKIP_TEST_testSerialiseGif/' \
+ -i test/EasyRdf/Serialiser/GraphVizTest.php
+
make test-lib
+%else
+: test suite disabled
+%endif
%files
+%defattr(-,root,root,-)
%doc *.md composer.json
%{_datadir}/php/EasyRdf.php
%{_datadir}/php/EasyRdf
%files doc
+%defattr(-,root,root,-)
%doc LICENSE.md docs examples
%files test
+%defattr(-,root,root,-)
%dir %{_datadir}/tests
%{_datadir}/tests/%{name}
%changelog
+* Thu Feb 7 2013 Remi Collet <remi@fedoraproject.org> - 0.7.2-3
+- backport 0.7.2 for remi repo.
+- disable tests on RHEL-5 (requires raptor 1.4.17)
+
* Mon Feb 04 2013 Shawn Iwinski <shawn.iwinski@gmail.com> 0.7.2-3
- Added note in %%description about optional dependencies
- Temporarily skip "EasyRdf_Serialiser_GraphVizTest::testSerialiseSvg" test