summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--composer.json42
-rw-r--r--php-masterminds-html5.spec43
3 files changed, 68 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..f4f43d3
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,42 @@
+{
+ "name": "masterminds/html5",
+ "description": "An HTML5 parser and serializer.",
+ "type": "library",
+ "homepage": "http://masterminds.github.io/html5-php",
+ "license": "MIT",
+ "keywords": ["xml", "html", "html5", "dom", "parser", "serializer", "querypath"],
+ "authors": [
+ {
+ "name": "Matt Butcher",
+ "email": "technosophos@gmail.com"
+ },
+ {
+ "name": "Matt Farina",
+ "email": "matt@mattfarina.com"
+ },
+ {
+ "name": "Asmir Mustafic",
+ "email": "goetas@gmail.com"
+ }
+ ],
+ "require" : {
+ "ext-libxml" : "*",
+ "php" : ">=5.3.0"
+ },
+ "require-dev": {
+ "satooshi/php-coveralls": "1.0.*",
+ "phpunit/phpunit" : "4.*",
+ "sami/sami": "~2.0"
+ },
+ "autoload": {
+ "psr-4": {"Masterminds\\": "src"}
+ },
+ "autoload-dev": {
+ "psr-4": {"Masterminds\\HTML5\\Tests\\": "test/HTML5"}
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.2-dev"
+ }
+ }
+}
diff --git a/php-masterminds-html5.spec b/php-masterminds-html5.spec
index 4fbfe45..89df76d 100644
--- a/php-masterminds-html5.spec
+++ b/php-masterminds-html5.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-masterminds-html5
#
-# Copyright (c) 2015-2016 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2015-2017 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +12,8 @@
%global github_owner Masterminds
%global github_name html5-php
-%global github_version 2.2.2
-%global github_commit 7866e93dcf0245de22378414e0c2c7350abc45af
+%global github_version 2.3.0
+%global github_commit 2c37c6c520b995b761674de3be8455a381679067
%global composer_vendor masterminds
%global composer_project html5
@@ -37,7 +37,6 @@ URL: http://masterminds.github.io/html5-php
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# Autoload generation
BuildRequires: %{_bindir}/phpab
# Tests
@@ -45,7 +44,7 @@ BuildRequires: %{_bindir}/phpab
## composer.json
BuildRequires: %{_bindir}/phpunit
BuildRequires: php(language) >= %{php_min_ver}
-## phpcompatinfo (computed from version 2.2.2)
+## phpcompatinfo (computed from version 2.3.0)
BuildRequires: php-ctype
BuildRequires: php-dom
BuildRequires: php-iconv
@@ -59,7 +58,7 @@ BuildRequires: php-xml
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 2.2.2)
+# phpcompatinfo (computed from version 2.3.0)
Requires: php-ctype
Requires: php-dom
Requires: php-iconv
@@ -101,7 +100,6 @@ mv src/HTML5/Serializer/*.md docs/Serializer/
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{phpdir}/Masterminds
cp -pr src/* %{buildroot}%{phpdir}/Masterminds/
# Project-level autoloader for consistency with other pkgs
@@ -122,30 +120,21 @@ require '%{buildroot}%{phpdir}/Masterminds/HTML5/autoload.php';
require __DIR__ . '/../test/autoload.php';
AUTOLOAD
-: Run tests
-run=0
-if which php56; then
- php56 %{_bindir}/phpunit
- run=1
-fi
-if which php71; then
- php71 %{_bindir}/phpunit
- run=1
-fi
-if [ $run -eq 0 ]; then
- %{_bindir}/phpunit -v
-fi
+: Upstream tests
+RETURN_CODE=0
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose || RETURN_CODE=1
+ fi
+done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE.txt
%doc docs/*
@@ -153,6 +142,10 @@ rm -rf %{buildroot}
%changelog
+* Fri Sep 08 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.3.0-1
+- Update to 2.3.0 (RHBZ #1488271)
+- Test with SCLs if available
+
* Sun Sep 25 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 2.2.2-1
- Updated to 2.2.2 (RHBZ #1378444)