From ed15dca18f49fcdd75012f7fcaeaf8dd25469ae7 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sun, 27 Nov 2016 09:11:04 +0100 Subject: [PATCH] Last upstream release --- .gitignore | 1 + composer-1.4.3.json | 40 +++++++++++++++++++++++ php-simplepie-makesrc.sh | 28 ++++++++++++++++ php-simplepie-php533.patch | 20 ------------ php-simplepie.spec | 66 ++++++++++++++++++++++---------------- sources | 2 +- 6 files changed, 109 insertions(+), 48 deletions(-) create mode 100644 composer-1.4.3.json create mode 100755 php-simplepie-makesrc.sh delete mode 100644 php-simplepie-php533.patch diff --git a/.gitignore b/.gitignore index be5476c..d898e6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ simplepie_1.1.3.zip /simplepie_1.2.zip /simplepie_1.3.1.zip +/php-simplepie-1.4.3-2a24b6e.tgz 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/php-simplepie-makesrc.sh b/php-simplepie-makesrc.sh new file mode 100755 index 0000000..080b7ad --- /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-$VERSION.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-simplepie-php533.patch b/php-simplepie-php533.patch deleted file mode 100644 index eea640e..0000000 --- a/php-simplepie-php533.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/library/SimplePie/Registry.php b/library/SimplePie/Registry.php -index bd9c1f5..dac55e3 100755 ---- a/library/SimplePie/Registry.php -+++ b/library/SimplePie/Registry.php -@@ -113,7 +113,7 @@ class SimplePie_Registry - */ - public function register($type, $class, $legacy = false) - { -- if (!is_subclass_of($class, $this->default[$type])) -+ if (!@is_subclass_of($class, $this->default[$type])) - { - return false; - } -@@ -222,4 +222,4 @@ class SimplePie_Registry - $result = call_user_func_array(array($class, $method), $parameters); - return $result; - } --} -\ No newline at end of file -+} diff --git a/php-simplepie.spec b/php-simplepie.spec index 3176196..aa515e7 100644 --- a/php-simplepie.spec +++ b/php-simplepie.spec @@ -4,38 +4,47 @@ %global with_tests 0 %endif -Name: php-simplepie -Version: 1.3.1 -Release: 8%{?dist} -Summary: Simple RSS Library in PHP +%global gh_commit 2a24b6e74aa9bf33243020f52895fe77efe94ccf +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner simplepie +%global gh_project simplepie +%global gh_version 1.4.3 -Group: Development/Libraries -License: BSD -URL: http://simplepie.org/ -Source0: http://simplepie.org/downloads/simplepie_%{version}.zip +Name: php-%{gh_project} +Version: %{gh_version} +Release: 1%{?dist} +Summary: Simple RSS Library in PHP -# https://github.com/simplepie/simplepie/pull/258 -Patch0: php-simplepie-php533.patch +Group: Development/Libraries +License: BSD +URL: http://simplepie.org/ -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -BuildArch: noarch +# 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 + +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildArch: noarch %if %{with_tests} -BuildRequires: php-phpunit-PHPUnit > 3.6 +BuildRequires: php-phpunit-PHPUnit > 3.6 %endif -Requires: php-IDNA_Convert -Requires: php-curl -Requires: php-date -Requires: php-dom -Requires: php-iconv -Requires: php-libxml -Requires: php-mbstring -Requires: php-pcre -Requires: php-pdo -Requires: php-reflection -Requires: php-xml +Requires: php-IDNA_Convert +Requires: php-curl +Requires: php-date +Requires: php-dom +Requires: php-iconv +Requires: php-libxml +Requires: php-mbstring +Requires: php-pcre +Requires: php-pdo +Requires: php-reflection +Requires: php-xml # Optional: memcache, xmlreader, zlib +Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} + %description SimplePie is a very fast and easy-to-use class, written in PHP, that puts the 'simple' back into 'really simple syndication'. Flexible enough to suit @@ -43,9 +52,7 @@ beginners and veterans alike, SimplePie is focused on speed, ease of use, compatibility and standards compliance. %prep -%setup -qn simplepie-simplepie-e9472a1 - -%patch0 -p1 +%setup -qn %{gh_project}-%{gh_commit} # fix rpmlint warnings find . -type f -exec chmod -x {} \; @@ -84,6 +91,11 @@ rm -rf %{buildroot} %changelog +* 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) + * Thu Feb 04 2016 Fedora Release Engineering - 1.3.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 07a8829..972ff3c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fae363964a80b21bc2d0bc616fe0f40d simplepie_1.3.1.zip +4d0a755d16c126931ab0da19f41b39f0 php-simplepie-1.4.3-2a24b6e.tgz