From 0695ab2a566913a313f8b3982da5d5fbdde95c17 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 10 Sep 2017 11:01:21 +0200 Subject: v3.0.1 from Fedora --- composer.json | 2 +- php-robrichards-xmlseclibs3-get-source.sh | 64 +++++++++++++++++++++++++++++++ php-robrichards-xmlseclibs3.spec | 21 ++++++---- 3 files changed, 79 insertions(+), 8 deletions(-) create mode 100755 php-robrichards-xmlseclibs3-get-source.sh diff --git a/composer.json b/composer.json index 5a81ccd..3d77709 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } }, "require": { - "php": ">= 5.6" + "php": ">= 5.4" }, "suggest": { "ext-openssl": "OpenSSL extension" diff --git a/php-robrichards-xmlseclibs3-get-source.sh b/php-robrichards-xmlseclibs3-get-source.sh new file mode 100755 index 0000000..f8f69e8 --- /dev/null +++ b/php-robrichards-xmlseclibs3-get-source.sh @@ -0,0 +1,64 @@ +#/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" +} + +SPEC=`ls *.spec` +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 +popd + +rm -rf $TEMP_DIR diff --git a/php-robrichards-xmlseclibs3.spec b/php-robrichards-xmlseclibs3.spec index 1817e25..127013e 100644 --- a/php-robrichards-xmlseclibs3.spec +++ b/php-robrichards-xmlseclibs3.spec @@ -12,14 +12,14 @@ %global github_owner robrichards %global github_name xmlseclibs -%global github_version 3.0.0 -%global github_commit a29eb3100eb6c5a427d6a3f9e61aff37492405ae +%global github_version 3.0.1 +%global github_commit d937712f70f93a584eb0299ccd87dc6374003781 %global composer_vendor robrichards %global composer_project xmlseclibs -# "php": ">= 5.6" -%global php_min_ver 5.6 +# "php": ">= 5.4" +%global php_min_ver 5.4 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -34,7 +34,11 @@ Summary: A PHP library for XML Security (version 3) Group: Development/Libraries License: BSD URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz + +# GitHub export does not include tests. +# Run php-robrichards-xmlseclibs3-get-source.sh to create full source. +Source0: %{name}-%{version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh BuildArch: noarch # Tests @@ -44,7 +48,7 @@ BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php(language) >= %{php_min_ver} ## composer.json: optional BuildRequires: php-openssl -## phpcompatinfo (computed from version 3.0.0) +## phpcompatinfo (computed from version 3.0.1) BuildRequires: php-dom BuildRequires: php-hash ## Autoloader @@ -55,7 +59,7 @@ BuildRequires: php-composer(fedora/autoloader) Requires: php(language) >= %{php_min_ver} # composer.json: suggest Requires: php-openssl -# phpcompatinfo (computed from version 3.0.0) +# phpcompatinfo (computed from version 3.0.1) Requires: php-dom Requires: php-hash # Autoloader @@ -134,5 +138,8 @@ exit $RETURN_CODE %changelog +* Fri Sep 08 2017 Shawn Iwinski - 3.0.1-1 +- Update to 3.0.1 (RHBZ #1487196) + * Wed Jul 12 2017 Shawn Iwinski - 3.0.0-1 - Initial package -- cgit