diff --git a/.gitignore b/.gitignore index 9e96f5d..43e4b4a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ /php-masterminds-html5-2.1.2-8f782e0f01a6e33a319bdc8f6de9cfd6569979a4.tar.gz /php-masterminds-html5-2.2.2-7866e93dcf0245de22378414e0c2c7350abc45af.tar.gz /php-masterminds-html5-2.3.0-2c37c6c520b995b761674de3be8455a381679067.tar.gz +/php-masterminds-html5-2.6.0-c961ca6a0a81dc6b55b6859b3f9ea7f402edf9ad.tar.gz +/php-masterminds-html5-2.7.0-104443ad663d15981225f99532ba73c2f1d6b6f2.tar.gz +/php-masterminds-html5-2.7.4-9227822783c75406cfe400984b2f095cdf03d417.tar.gz +/php-masterminds-html5-2.7.5-f640ac1bdddff06ea333a920c95bbad8872429ab.tar.gz +/php-masterminds-html5-2.7.6-897eb517a343a2281f11bc5556d6548db7d93947.tar.gz diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..fb7674e --- /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-ctype": "*", + "ext-dom": "*", + "ext-libxml" : "*", + "php" : ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit" : "^4.8.35 || ^5.7.21 || ^6 || ^7" + }, + "autoload": { + "psr-4": {"Masterminds\\": "src"} + }, + "autoload-dev": { + "psr-4": {"Masterminds\\HTML5\\Tests\\": "test/HTML5"} + }, + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + } +} diff --git a/php-masterminds-html5-get-source.sh b/php-masterminds-html5-get-source.sh new file mode 100755 index 0000000..4ad1051 --- /dev/null +++ b/php-masterminds-html5-get-source.sh @@ -0,0 +1,71 @@ +#/bin/sh + +GIT=`which git` +RPM=`which rpm` + +if [ -z "$GIT" ] +then + echo "ERROR: 'git' command not found" 1>&2 + exit 1 +elif [ -z "$RPM" ] +then + echo "ERROR: 'rpm' command not found" 1>&2 + exit 1 +fi + +function print { + echo -e "\e[0;33m>>>>> ${1}\e[0m" +} + +if [ -x "$1" ] +then + SPEC=$1 +else + SPEC=`ls *.spec | head -1` +fi + +NAME=`echo $SPEC | sed 's#\.spec##'` +VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'` + +print "SPEC = $SPEC" +print "NAME = $NAME" + +GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'` +GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'` +GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'` +GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME} +GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'` + +print "GIT_OWNER = $GIT_OWNER" +print "GIT_NAME = $GIT_NAME" +print "GIT_COMMIT = $GIT_COMMIT" +print "GIT_REPO = $GIT_REPO" +print "GIT_DIR = $GIT_DIR" + +TEMP_DIR=$(mktemp --dir) +TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz +CMP_FILE=$PWD/composer.json + +pushd $TEMP_DIR + print "Cloning git repo..." + $GIT clone $GIT_REPO + + pushd $GIT_DIR + print "Checking out commit..." + $GIT checkout $GIT_COMMIT + cp composer.json $CMP_FILE + popd + + TAR_DIR=${GIT_NAME}-${GIT_COMMIT} + print "TAR_DIR = $TAR_DIR" + + mv $GIT_DIR $TAR_DIR + + print "TAR_FILE = $TAR_FILE" + + [ -e $TAR_FILE ] && rm -f $TAR_FILE + tar --exclude-vcs -czf $TAR_FILE $TAR_DIR + chmod 0644 $TAR_FILE +popd + +rm -rf $TEMP_DIR diff --git a/php-masterminds-html5.spec b/php-masterminds-html5.spec index d9d4b18..dda8e98 100644 --- a/php-masterminds-html5.spec +++ b/php-masterminds-html5.spec @@ -1,7 +1,7 @@ # # Fedora spec file for php-masterminds-html5 # -# Copyright (c) 2015-2017 Shawn Iwinski +# Copyright (c) 2015-2022 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -11,8 +11,8 @@ %global github_owner Masterminds %global github_name html5-php -%global github_version 2.3.0 -%global github_commit 2c37c6c520b995b761674de3be8455a381679067 +%global github_version 2.7.6 +%global github_commit 897eb517a343a2281f11bc5556d6548db7d93947 %global composer_vendor masterminds %global composer_project html5 @@ -27,13 +27,15 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?dist} +Release: 8%{?dist} Summary: An HTML5 parser and serializer -Group: Development/Libraries License: MIT 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 +# GitHub export does not include tests. +# Run php-league-container-get-source.sh to create full source. +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh BuildArch: noarch # Autoload generation @@ -41,30 +43,29 @@ BuildRequires: %{_bindir}/phpab # Tests %if %{with_tests} ## composer.json -BuildRequires: %{_bindir}/phpunit BuildRequires: php(language) >= %{php_min_ver} -## phpcompatinfo (computed from version 2.3.0) +BuildRequires: phpunit8 BuildRequires: php-ctype BuildRequires: php-dom +## phpcompatinfo (computed from version 2.7.0) BuildRequires: php-iconv BuildRequires: php-json BuildRequires: php-mbstring BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl -BuildRequires: php-xml %endif # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 2.3.0) Requires: php-ctype Requires: php-dom +# phpcompatinfo (computed from version 2.7.0) Requires: php-iconv Requires: php-mbstring Requires: php-pcre Requires: php-spl -Requires: php-xml +# notice: xml only detected for utf8_decode # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -119,10 +120,23 @@ require '%{buildroot}%{phpdir}/Masterminds/HTML5/autoload.php'; require __DIR__ . '/../test/autoload.php'; AUTOLOAD +: fix for phpunit8 +find test \ + -name \*.php \ + -exec sed \ + -e 's/function setUp()/function setUp():void/' \ + -i {} \; + +sed -e 's/assertContains(/assertStringContainsString(/' \ + -i test/HTML5/Html5Test.php + +grep -v blacklist < phpunit.xml.dist | \ + grep -v ' phpunit.xml + : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do +PHPUNIT=$(which phpunit8) +for PHP_EXEC in "" php74 php80 php81 php82; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --verbose || RETURN_CODE=1 fi @@ -141,6 +155,76 @@ exit $RETURN_CODE %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.7.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 2.7.6-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 19 2024 Fedora Release Engineering - 2.7.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 2.7.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 2.7.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.7.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 2.7.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Sep 12 2022 Remi Collet - 2.7.6-1 +- update to 2.7.6 + +* Fri Jul 22 2022 Fedora Release Engineering - 2.7.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 2.7.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 2.7.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jul 2 2021 Remi Collet - 2.7.5-1 +- update to 2.7.5 + +* Wed Mar 17 2021 Remi Collet - 2.7.4-1 +- update to 2.7.4 +- drop patch merged upstream +- switch to phpunit8 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 2.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 2.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Oct 11 2019 Remi Collet - 2.7.0-1 +- update to 2.7.0 +- add patch for PHP 7.4 from + https://github.com/Masterminds/html5-php/pull/170 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat May 25 2019 Shawn Iwinski - 2.6.0-1 +- Update to 2.6.0 (RHBZ #1687215) + +* Sat Feb 02 2019 Fedora Release Engineering - 2.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 2.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 2.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Fri Sep 08 2017 Shawn Iwinski - 2.3.0-1 - Update to 2.3.0 (RHBZ #1488271) - Test with SCLs if available diff --git a/sources b/sources index afb2aa1..e4ae224 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-masterminds-html5-2.3.0-2c37c6c520b995b761674de3be8455a381679067.tar.gz) = 29ceee25763bfaa428b44736d6516bbf563539f66a4523ddb37147ff57989ea41d34d470352451fecee9a2c4a86b05942ffe6b693df87cea13152beb4452ec05 +SHA512 (php-masterminds-html5-2.7.6-897eb517a343a2281f11bc5556d6548db7d93947.tar.gz) = 7a9117ff159bf396c529eb79941d18fb78f91f91dcdeedbe7cfced31e42252b94c67ead86e08145c6b6c3c5d0726c94cf5852a79afa22895099c9cdb676472a1