From 109cfa1d74f7db3956d3770ba25f1f5bace7f528 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 21 Apr 2017 16:25:02 +0200 Subject: v1.6.4 --- composer.json | 3 +-- makesrc.sh | 28 ++++++++++++++++++++++++++++ php-theseer-fDOMDocument.spec | 22 +++++++++++++++++----- 3 files changed, 46 insertions(+), 7 deletions(-) create mode 100755 makesrc.sh diff --git a/composer.json b/composer.json index ad9d3db..cd88df3 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,7 @@ "require": { "php": ">=5.3.3", "ext-dom": "*", - "lib-libxml": "*", - "phpunit/phpunit": "^4.8.35|^5.6|^6.0" + "lib-libxml": "*" }, "autoload": { "classmap": [ diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..87d223d --- /dev/null +++ b/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 '/^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\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 .git $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-theseer-fDOMDocument.spec b/php-theseer-fDOMDocument.spec index c6449a6..d670f2b 100644 --- a/php-theseer-fDOMDocument.spec +++ b/php-theseer-fDOMDocument.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # -%global gh_commit 07aa549924fa5d12fbf7c08401931363558e4523 +%global gh_commit cf219ede922fb47956726f35e2127277ebd302ca %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner theseer %global gh_project fDOMDocument @@ -16,14 +16,15 @@ %global pear_channel pear.netpirates.net Name: php-theseer-fDOMDocument -Version: 1.6.3 +Version: 1.6.4 Release: 1%{?dist} Summary: An Extension to PHP standard DOM Group: Development/Libraries License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: makesrc.sh BuildArch: noarch BuildRequires: php(language) >= 5.3.3 @@ -36,6 +37,8 @@ BuildRequires: php(language) >= 5.3.3 BuildRequires: %{phpunit} BuildRequires: php-dom BuildRequires: php-libxml +# Autoloader +BuildRequires: php-fedora-autoloader-devel # From composer.json, requires # "php": ">=5.3.3", @@ -47,6 +50,8 @@ Requires: php-libxml # From phpcompatinfo report for version 1.6.0 Requires: php-pcre Requires: php-spl +# Autoloader +Requires: php-composer(fedora/autoloader) Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} Provides: php-composer(theseer/fdomdocument) = %{version} @@ -62,7 +67,8 @@ and exceptions by default %build -# Empty build section, most likely nothing required. +: Generate a simple classmap autoloader +%{_bindir}/phpab --template fedora --output src/autoload.php src %install @@ -75,7 +81,9 @@ ret=0 for cmd in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do if which $cmd; then set $cmd - $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 + $1 ${2:-%{_bindir}/phpunit6} \ + --bootstrap %{buildroot}%{php_home}/%{gh_project}/autoload.php \ + --verbose || ret=1 fi done exit $ret @@ -96,6 +104,10 @@ fi %changelog +* Fri Apr 21 2017 Remi Collet - 1.6.4-1 +- Update to 1.6.4 (no change) +- sources from git snapshot to retrieve test suite + * Fri Apr 14 2017 Remi Collet - 1.6.3-1 - Update to 1.6.3 - drop patch merged upstream -- cgit