From 6062ec43eb88e47e5144e45ce50929c4dce92ddc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Sep 2017 10:59:55 +0200 Subject: v1.7.1 from Fedora --- .gitignore | 8 ++++ composer.json | 14 ++++--- php-doctrine-cache-get-source.sh | 64 +++++++++++++++++++++++++++++++ php-doctrine-cache.spec | 83 +++++++++++++++++++--------------------- 4 files changed, 121 insertions(+), 48 deletions(-) create mode 100644 .gitignore create mode 100755 php-doctrine-cache-get-source.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index 7ef1727..893012e 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,16 @@ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { - "php": "~5.5|~7.0" + "php": "~7.1" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "satooshi/php-coveralls": "~0.6", - "predis/predis": "~1.0" + "alcaeus/mongo-php-adapter": "^1.1", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^5.7", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "conflict": { "doctrine/common": ">2.2,<2.4" @@ -31,7 +35,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } } } diff --git a/php-doctrine-cache-get-source.sh b/php-doctrine-cache-get-source.sh new file mode 100755 index 0000000..f8f69e8 --- /dev/null +++ b/php-doctrine-cache-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-doctrine-cache.spec b/php-doctrine-cache.spec index 520158a..3581e74 100644 --- a/php-doctrine-cache.spec +++ b/php-doctrine-cache.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-doctrine-cache # -# Copyright (c) 2013-2016 Shawn Iwinski +# Copyright (c) 2013-2017 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,14 +12,14 @@ %global github_owner doctrine %global github_name cache -%global github_version 1.6.1 -%global github_commit b6f544a20f4807e81f7044d31e679ccbb1866dc3 +%global github_version 1.7.1 +%global github_commit b3217d58609e9c8e661cd41357a54d926c4a2a1a %global composer_vendor doctrine %global composer_project cache -# "php": "~5.5|~7.0" -%global php_min_ver 5.5 +# "php": "~7.1" +%global php_min_ver 7.1 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -34,42 +34,42 @@ Summary: Doctrine Cache Group: Development/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# GitHub export does not include tests. +# Run php-doctrine-cache-get-source.sh to create full source. +Source0: %{name}-%{version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh + BuildArch: noarch # Tests %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) -## phpcompatinfo (computed from version 1.6.1) +## phpcompatinfo (computed from version 1.7.1) BuildRequires: php-date BuildRequires: php-hash +BuildRequires: php-pecl(igbinary) BuildRequires: php-reflection BuildRequires: php-spl -%if 0%{?rhel} != 5 BuildRequires: php-sqlite3 -%endif ## Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 1.6.1) +# phpcompatinfo (computed from version 1.7.1) Requires: php-date Requires: php-hash Requires: php-spl -%if 0%{?rhel} != 5 -Requires: php-sqlite3 -%endif # Autoloader Requires: php-composer(fedora/autoloader) # Weak dependencies %if 0%{?fedora} > 21 Suggests: php-composer(predis/predis) Suggests: php-pecl(apcu) +Suggests: php-pecl(igbinary) Suggests: php-pecl(memcache) Suggests: php-pecl(memcached) Suggests: php-pecl(mongo) @@ -114,19 +114,18 @@ AUTOLOAD %install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{phpdir} -cp -rp lib/* %{buildroot}%{phpdir}/ +mkdir -p %{buildroot}%{phpdir}/Doctrine/Common +cp -rp lib/Doctrine/Common/Cache %{buildroot}%{phpdir}/Doctrine/Common/ %check %if %{with_tests} -: Create tests autoloader -cat <<'AUTOLOAD' | tee autoload.php +: Create tests bootstrap +cat <<'BOOTSTRAP' | tee bootstrap.php - 1.7.1-1 +- Update to 1.7.1 (RHBZ #1485327) + +* Sat Aug 05 2017 Shawn Iwinski - 1.7.0-1 +- Update to 1.7.0 (RHBZ #1473989) +- Add "get source" script +- Test with SCLs if available + * Fri Nov 04 2016 Shawn Iwinski - 1.6.1-1 - Updated to 1.6.1 (RHBZ #1389915) - Removed PHP max version dependency -- cgit