diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 1c97b5b..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -simplepie_1.1.3.zip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2946fba --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +clog +/php-simplepie-1.4.3-2a24b6e.tgz +/php-simplepie-1.5-5de5551.tgz +/php-simplepie-1.5.1-db9fff2.tgz +/php-simplepie-1.5.2-0e8fe72.tgz +/php-simplepie-1.5.3-1736633.tgz +/php-simplepie-1.5.4-20b30e4.tgz +/php-simplepie-1.5.6-1c68e14.tgz +/php-simplepie-1.6.0-2bdbc51.tgz +/php-simplepie-1.7.0-9e9add3.tgz +/php-simplepie-1.8.0-65b095d.tgz +/php-simplepie-1.8.1-a567b8a.tgz +/php-simplepie-1.9.0-76cccb1.tgz diff --git a/Makefile b/Makefile deleted file mode 100644 index f804ed0..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: php-simplepie -# $Id$ -NAME := php-simplepie -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/composer-1.4.3.json b/composer-1.4.3.json new file mode 100644 index 0000000..b5965b2 --- /dev/null +++ b/composer-1.4.3.json @@ -0,0 +1,40 @@ +{ + "name": "simplepie/simplepie", + "description": "A simple Atom/RSS parsing library for PHP", + "type": "library", + "keywords": ["rss", "atom", "feeds"], + "homepage": "http://simplepie.org/", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Ryan Parman", + "homepage": "http://ryanparman.com/", + "role": "Creator, alumnus developer" + }, + { + "name": "Geoffrey Sneddon", + "homepage": "http://gsnedders.com/", + "role": "Alumnus developer" + }, + { + "name": "Ryan McCue", + "email": "me@ryanmccue.info", + "homepage": "http://ryanmccue.info/", + "role": "Developer" + } + ], + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4 || ~5" + }, + "suggest": { + "mf2/mf2": "Microformat module that allows for parsing HTML for microformats" + }, + "autoload": { + "psr-0": { + "SimplePie": "library" + } + } +} diff --git a/import.log b/import.log deleted file mode 100644 index f7bf6ad..0000000 --- a/import.log +++ /dev/null @@ -1,2 +0,0 @@ -php-simplepie-1_1_3-2_fc10:HEAD:php-simplepie-1.1.3-2.fc10.src.rpm:1241736504 -php-simplepie-1_1_3-3_fc10:HEAD:php-simplepie-1.1.3-3.fc10.src.rpm:1241963415 diff --git a/php-simplepie-makesrc.sh b/php-simplepie-makesrc.sh new file mode 100755 index 0000000..fa1f97c --- /dev/null +++ b/php-simplepie-makesrc.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^%global gh_version/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Commit:$COMMIT\n" + +echo "Cloning..." +rm -rf $PROJECT-$COMMIT +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-simplepie-rpm.patch b/php-simplepie-rpm.patch new file mode 100644 index 0000000..35e3fe1 --- /dev/null +++ b/php-simplepie-rpm.patch @@ -0,0 +1,30 @@ +diff -up ./autoloader.php.rpm ./autoloader.php +--- ./autoloader.php.rpm 2016-07-07 08:03:48.148863182 +0200 ++++ ./autoloader.php 2016-07-07 08:04:13.777994006 +0200 +@@ -63,7 +63,7 @@ class SimplePie_Autoloader + */ + public function __construct() + { +- $this->path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'library'; ++ $this->path = dirname(__FILE__); + } + + /** +@@ -82,4 +82,4 @@ class SimplePie_Autoloader + $filename = $this->path . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php'; + include $filename; + } +-} +\ Pas de fin de ligne à la fin du fichier ++} +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2016-07-07 08:03:52.644886131 +0200 ++++ ./tests/bootstrap.php 2016-07-07 08:04:51.301185544 +0200 +@@ -1,6 +1,6 @@ + assertFalse(SimplePie_Misc::change_encoding('', 'TESTENC', 'UTF-8')); + } + +- public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) ++ public static function assertEquals($expected, $actual, string $message = '', float $delta = 0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false): void + { + if (is_string($expected)) + { diff --git a/php-simplepie.spec b/php-simplepie.spec index 884b381..8a6c2b4 100644 --- a/php-simplepie.spec +++ b/php-simplepie.spec @@ -1,15 +1,74 @@ -Name: php-simplepie -Version: 1.1.3 -Release: 4%{?dist} -Summary: Simple RSS Library in PHP +# +# Fedora spec file for php-simplepie +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please preserve changelog entries +# +%global gh_commit 76cccb1b2c5dcaf44f304c925ab30c0f48643992 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner simplepie +%global gh_project simplepie +%global gh_version 1.9.0 +%bcond_with tests + +Name: php-%{gh_project} +Version: 1.9.0 +Release: 2%{?dist} +Summary: A simple Atom/RSS parsing library for PHP + +Group: Development/Libraries +License: BSD-3-Clause +URL: http://simplepie.org/ + +# Use a git snapshot as upstream remove tests from distribution +Source0: %{name}-%{gh_version}-%{gh_short}.tgz +# Script to pull the git snapshot +Source1: %{name}-makesrc.sh + +# Adapt autoloader for installation tree +Patch0: %{name}-rpm.patch +# Adpat to phpunit7 and php 8 +Patch1: %{name}-tests.patch + +BuildArch: noarch +%if %{with tests} +# From composer.json, "require-dev" +# "phpunit/phpunit": "~5.4.3 || ~6.5" +BuildRequires: phpunit8 +%global phpunit %{_bindir}/phpunit8 +%endif + +# from composer.json, "require" +# "php": ">=5.6.0", +# "ext-pcre": "*", +# "ext-xml": "*", +# "ext-xmlreader": "*" +Requires: php(language) >= 5.6 +Requires: php-pcre +Requires: php-xml +Requires: php-xmlreader +# from composer.json, "suggests" +# "ext-curl": "", +# "ext-iconv": "", +# "ext-intl": "", +# "ext-mbstring": "", +Requires: php-curl +Requires: php-iconv +Requires: php-intl +Requires: php-mbstring +# from phpcompatinfo +Requires: php-IDNA_Convert +Requires: php-date +Requires: php-dom +Requires: php-libxml +Requires: php-pdo +Requires: php-reflection +# Optional: memcache, memcached, redis, zlib + +Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} -Group: Development/Libraries -License: BSD -URL: http://simplepie.org/ -Source0: http://simplepie.org/downloads/simplepie_%{version}.zip -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -BuildArch: noarch -Requires: php-IDNA_Convert %description SimplePie is a very fast and easy-to-use class, written in PHP, that puts the @@ -17,10 +76,19 @@ SimplePie is a very fast and easy-to-use class, written in PHP, that puts the beginners and veterans alike, SimplePie is focused on speed, ease of use, compatibility and standards compliance. +Autoloader: %{_datadir}/php/%{name}/autoloader.php + + %prep -%setup -qn %{version} -chmod -x demo/cli_test.php -chmod -x demo/for_the_demo/mediaplayer_readme.htm +%setup -qn %{gh_project}-%{gh_commit} + +#%patch0 -p1 -b .rpm +#%patch1 -p1 -b .php8 + +# fix rpmlint warnings +find . -type f -exec chmod -x {} \; +# drop demo; contains flash files +rm -rf demo %build @@ -28,25 +96,193 @@ chmod -x demo/for_the_demo/mediaplayer_readme.htm %install -rm -rf %{buildroot} mkdir -p %{buildroot}/%{_datadir}/php/%{name} -cp -a create.php simplepie.inc %{buildroot}/%{_datadir}/php/%{name}/ - +cp -ar library src -t %{buildroot}/%{_datadir}/php/%{name} + +install -pm 644 autoloader.php \ + %{buildroot}/%{_datadir}/php/%{name}/autoloader.php +%if %{with tests} +%check +sed -e 's:@PATH@:%{buildroot}/%{_datadir}/php/%{name}:' \ + -i tests/bootstrap.php -%clean -rm -rf %{buildroot} +ret=0 +for cmdarg in "php %{phpunit}" php; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit8} --verbose || ret=1 + fi +done +exit $ret +%endif %files -%defattr(-,root,root,-) -%doc LICENSE.txt README.txt demo +%license LICENSES/ +%doc composer.json +%doc README.markdown %{_datadir}/php/%{name} - %changelog +* Wed Dec 31 2025 Artur Frenszek-Iwicki - 1.9.0-2 +- Fix files missing (rhbz#2426462) + +* Fri Sep 12 2025 Gwyn Ciesla - 1.9.0-1 +- 1.9.0 + +* Fri Jul 25 2025 Fedora Release Engineering - 1.8.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 1.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Nov 22 2024 Gwyn Ciesla - 1.8.1-1 +- 1.8.1 + +* Fri Jul 19 2024 Fedora Release Engineering - 1.8.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 1.8.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.8.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 1.8.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Mar 08 2023 Gwyn Ciesla - 1.8.0-2 +- migrated to SPDX license + +* Mon Jan 23 2023 Gwyn Ciesla - 1.8.0-1 +- 1.8.0 + +* Fri Jan 20 2023 Fedora Release Engineering - 1.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Sep 30 2022 Gwyn Ciesla - 1.7.0-1 +- 1.7.0 + +* Mon Aug 01 2022 Gwyn Ciesla - 1.6.0-1 +- 1.6.0 + +* Fri Jul 22 2022 Fedora Release Engineering - 1.5.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 1.5.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jul 27 2021 Fedora Release Engineering - 1.5.6-2 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 23 2021 Remi Collet - 1.5.6-1 +- update to 1.5.6 +- switch to phpunit7 and fix FTBFS with PHP 8 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.5.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.5.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 1.5.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Dec 18 2019 Remi Collet - 1.5.4-1 +- update to 1.5.4 +- drop patch merged upstream + +* Wed Oct 9 2019 Remi Collet - 1.5.3-1 +- update to 1.5.3 +- add patch for PHP 7.4 from + https://github.com/simplepie/simplepie/pull/628 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.5.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Oct 2 2018 Remi Collet - 1.5.2-1 +- update to 1.5.2 +- raise dependency on PHP 5.6 +- switch to phpunit6 +- fix LICENSE installation + +* Fri Jul 13 2018 Fedora Release Engineering - 1.5.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 1.5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Nov 14 2017 Remi Collet - 1.5.1-1 +- Update to 1.5.1 +- run test suite with all version when SCL available +- add spec file License headers (MIT per FPCA) + +* Thu Jul 27 2017 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Apr 25 2017 Johan Cwiklinski - 1.5-1 +- Last upstream release + +* Sat Feb 11 2017 Fedora Release Engineering - 1.4.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Jan 07 2017 Johan Cwiklinski - 1.4.3-2 +- Drop demo directory that contains flash files (bz #1000260) + +* Sun Nov 27 2016 Johan Cwiklinski - 1.4.3-1 +- Last upstream release +- Change upstream download URL, use script to get tests +- provide php-composer(simplepie/simplepie) +- Backport some changes from Remi's specfile + +* Thu Feb 04 2016 Fedora Release Engineering - 1.3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering - 1.3.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.3.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jan 2 2013 Remi Collet - 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 - 1.3.1-2 +- really install library +- provides autoloader.php +- run tests + +* Wed Dec 12 2012 Nick Bebout - 1.3.1-1 +- Update to 1.3.1 + +* Sat Jul 21 2012 Fedora Release Engineering - 1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Aug 30 2011 Adam Williamson - 1.2-1 +- bump to 1.2 (a mere two years late!) + +* Wed Feb 09 2011 Fedora Release Engineering - 1.1.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Jul 26 2009 Fedora Release Engineering - 1.1.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index c4e6722..bd1f948 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ec48020d3ee5cd0d907635fdb0d86a08 simplepie_1.1.3.zip +SHA512 (php-simplepie-1.9.0-76cccb1.tgz) = d002992edc96d849130fd270cd3a9ec94a56143991ff37d0a3b9218f93e9dc4f7beba1336019874065e5875e5751233d6a404bc2b7f8d69a2382d708aae96d96