From f66cf34b3771ac2cfb648ed7764af3d2ac6ef9fe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Sep 2020 09:10:12 +0200 Subject: v0.144 from Fedora --- composer.json | 2 +- makesrc.sh | 2 +- php-google-apiclient-services-get-source.sh | 74 +++++++++++++++++++++++++++++ php-google-apiclient-services.spec | 26 ++++++---- 4 files changed, 94 insertions(+), 10 deletions(-) create mode 100755 php-google-apiclient-services-get-source.sh diff --git a/composer.json b/composer.json index 7c319d0..d995500 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "php": ">=5.4" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8|^5" }, "autoload": { "psr-0": { diff --git a/makesrc.sh b/makesrc.sh index 16dfc78..d20204d 120000 --- a/makesrc.sh +++ b/makesrc.sh @@ -1 +1 @@ -*sh \ No newline at end of file +php-google-apiclient-services-get-source.sh \ No newline at end of file diff --git a/php-google-apiclient-services-get-source.sh b/php-google-apiclient-services-get-source.sh new file mode 100755 index 0000000..c614ff3 --- /dev/null +++ b/php-google-apiclient-services-get-source.sh @@ -0,0 +1,74 @@ +#/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" +} + +if [ -n "$1" ] +then + SPEC=$1 +else + SPEC=`ls *.spec | head -1` +fi + +SPEC_DIR=`pwd` + +print "SPEC_DIR = $SPEC_DIR" + +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) + +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 ${SPEC_DIR}/ + popd + + TAR_DIR=${GIT_NAME}-${GIT_COMMIT} + print "TAR_DIR = $TAR_DIR" + + mv $GIT_DIR $TAR_DIR + + TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz + print "TAR_FILE = $TAR_FILE" + + [ -e $TAR_FILE ] && rm -f $TAR_FILE + tar --exclude-vcs -czf $TAR_FILE $TAR_DIR + chmod 0644 $TAR_FILE +popd + +rm -rf $TEMP_DIR diff --git a/php-google-apiclient-services.spec b/php-google-apiclient-services.spec index 20d3b63..40ea329 100644 --- a/php-google-apiclient-services.spec +++ b/php-google-apiclient-services.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-google-apiclient-services # -# Copyright (c) 2017-2019 Shawn Iwinski +# Copyright (c) 2017-2020 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,8 +12,8 @@ %global github_owner googleapis %global github_name google-api-php-client-services -%global github_version 0.102 -%global github_commit 82274e12b08c6828ebcc45a6bc01adbac63de8e9 +%global github_version 0.144 +%global github_commit 74c5fc850d9ce441c6b3e52af11b986cd11d379a %global composer_vendor google %global composer_project apiclient-services @@ -28,12 +28,16 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 2%{?github_release}%{?dist} Summary: Google PHP API Client Services License: ASL 2.0 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-google-apiclient-services-get-source.sh to create full source +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh BuildArch: noarch # Tests @@ -41,7 +45,7 @@ BuildArch: noarch ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) -## phpcompatinfo (computed from version 0.102) +## phpcompatinfo (computed from version 0.144) ## ## Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -49,7 +53,7 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 0.102) +# phpcompatinfo (computed from version 0.144) # # Autoloader Requires: php-composer(fedora/autoloader) @@ -107,7 +111,7 @@ BOOTSTRAP : Upstream tests RETURN_CODE=0 PHPUNIT=$(which phpunit) -for PHP_EXEC in "" php71 php72 php73 php74; do +for PHP_EXEC in "" php72 php73 php74; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --bootstrap bootstrap.php --verbose \ -d memory_limit="512M" || RETURN_CODE=1 @@ -129,6 +133,12 @@ exit $RETURN_CODE %changelog +* Sun Sep 06 2020 Shawn Iwinski - 0.144-2 +- Fix source + +* Sun Sep 06 2020 Shawn Iwinski - 0.144-1 +- Update to 0.144 (RHBZ #1720970) + * Sun Jun 16 2019 Shawn Iwinski - 0.102-1 - Update to 0.102 (RHBZ #1584457) -- cgit