From a3b050dd528fa1d0d27912ebe60ed4e81d3cca07 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 30 Oct 2016 11:52:49 +0100 Subject: [PATCH] - Mardown PSR-0 library version 1.7.0 - switch to fedora/autoloader - add minimal %check for version and autoloader --- .gitignore | 1 + php-markdown.spec | 29 +++++++++++++++++++++++++---- sources | 2 +- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f5cd3c4..277d0de 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ php-markdown-1.0.1n.zip /php-markdown-lib-1.4.1.zip /php-markdown-lib-1.5.0.zip /php-markdown-lib-1.6.0.zip +/php-markdown-lib-1.7.0.zip diff --git a/php-markdown.spec b/php-markdown.spec index e860da3..1f6029c 100644 --- a/php-markdown.spec +++ b/php-markdown.spec @@ -2,8 +2,8 @@ %global classic_version 1.0.2 Name: php-markdown -Version: 1.6.0 -Release: 2%{?dist} +Version: 1.7.0 +Release: 1%{?dist} Summary: Markdown implementation in PHP Group: Development/Languages @@ -14,10 +14,13 @@ Source1: http://littoral.michelf.ca/code/php-markdown/%{name}-%{classic_vers BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: %{_bindir}/phpab +BuildRequires: php-fedora-autoloader-devel +# For tests +BuildRequires: php-cli Requires: php(language) >= 5.3 Requires: php-pcre +Requires: php-composer(fedora/autoloader) Provides: php-composer(michelf/php-markdown) = %{version} @@ -48,7 +51,10 @@ mv "PHP Markdown Readme.text" ../classic/Readme.text %build # Generate simple autoloader -%{_bindir}/phpab -o Michelf/markdown-autoload.php Michelf +%{_bindir}/phpab \ + --template fedora \ + --output Michelf/markdown-autoload.php \ + Michelf cat Michelf/markdown-autoload.php @@ -62,6 +68,16 @@ cp -pr Michelf %{buildroot}%{_datadir}/php/Michelf # Old classic install -p -m 644 "PHP Markdown %{classic_version}/markdown.php" %{buildroot}%{_datadir}/php/ + +%check +php -r ' +require_once "%{buildroot}%{_datadir}/php/Michelf/markdown-autoload.php"; + $ver = Michelf\Markdown::MARKDOWNLIB_VERSION; + echo "Version=$ver, expected=%{version}\n"; + return (version_compare($ver, "%{version}", "=") ? 0 : 1); +' + + %clean rm -rf %{buildroot} @@ -78,6 +94,11 @@ rm -rf %{buildroot} %changelog +* Sun Oct 30 2016 Remi Collet - 1.7.0-1 +- Mardown PSR-0 library version 1.7.0 +- switch to fedora/autoloader +- add minimal %%check for version and autoloader + * Thu Feb 04 2016 Fedora Release Engineering - 1.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 3a31b7a..a7d1b73 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ 29b35c72e60d8ab92a5f7eedbe368cc3 php-markdown-1.0.2.zip -267bbe00a5362efa7f7be925e341ad81 php-markdown-lib-1.6.0.zip +157820b2be3a023370a0958cc7ccbcff php-markdown-lib-1.7.0.zip