summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-05-17 16:23:13 +0200
committerRemi Collet <remi@remirepo.net>2021-05-17 16:23:13 +0200
commit9b373cc08a6e4d8a7c402eb9a50668f1f36d1693 (patch)
tree20f25e6b78aae6f10f2decd0637a5746a44fe576
parent0621a8256314942e07ccce715714e4876dd7e793 (diff)
update to 2.0.0
rename to php-doctrine-cache2 install in /usr/share/php/Doctrine/Common/Cache2
-rw-r--r--.gitignore9
-rw-r--r--Makefile4
-rw-r--r--php-doctrine-cache2.spec68
3 files changed, 37 insertions, 44 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..01f0400
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.bz2
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
+
diff --git a/php-doctrine-cache2.spec b/php-doctrine-cache2.spec
index 130eba3..15e8e3d 100644
--- a/php-doctrine-cache2.spec
+++ b/php-doctrine-cache2.spec
@@ -1,8 +1,7 @@
-# remirepo spec file for php-doctrine-cache, from:
-#
-# Fedora spec file for php-doctrine-cache
+# remirepo/fedora spec file for php-doctrine-cache2
#
# Copyright (c) 2013-2021 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Remi Collet <remi@fedoraproject.org>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,8 +11,10 @@
%global github_owner doctrine
%global github_name cache
-%global github_version 1.11.0
-%global github_commit a9c1b59eba5a08ca2770a76eddb88922f504e8e0
+%global github_version 2.0.0
+%global github_commit 64d8b1dedd6ae7bb6b4c3094a44c585ec04e86b2
+%global github_short %(c=%{github_commit}; echo ${c:0:7})
+%global major 2
%global composer_vendor doctrine
%global composer_project cache
@@ -37,18 +38,18 @@
%{!?phpdir: %global phpdir %{_datadir}/php}
-Name: php-%{composer_vendor}-%{composer_project}
+Name: php-%{composer_vendor}-%{composer_project}%{major}
Version: %{github_version}
Release: 1%{?dist}
-Summary: Doctrine Cache
+Summary: Doctrine Cache version %{major}
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
# GitHub export does not include tests.
-# Run php-doctrine-cache-get-source.sh to create full source.
-Source0: %{name}-%{version}-%{github_commit}.tar.gz
-Source9: %{name}-get-source.sh
+# Run makesrc.sh to create full source.
+Source0: %{name}-%{version}-%{github_short}.tgz
+Source9: makesrc.sh
BuildArch: noarch
# Tests
@@ -56,13 +57,8 @@ BuildArch: noarch
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: phpunit9
-## phpcompatinfo (computed from version 1.7.1)
+## phpcompatinfo (computed from version 2.0.0)
BuildRequires: php-date
-BuildRequires: php-hash
-BuildRequires: php-pecl(igbinary)
-BuildRequires: php-reflection
-BuildRequires: php-spl
-BuildRequires: php-sqlite3
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
# remirepo:1
@@ -79,23 +75,15 @@ BuildRequires: php-composer(cache/integration-tests) >= %{cache_integration_test
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 1.7.1)
+# phpcompatinfo (computed from version 2.0.0)
Requires: php-date
-Requires: php-hash
-Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
# Weak dependencies
+# remirepo:1
%if 0%{?fedora} > 21 || 0%{?rhel} >= 8
Suggests: php-composer(alcaeus/mongo-php-adapter)
-Suggests: php-composer(mongodb/mongodb)
-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)
-Suggests: php-pecl(redis)
+# remirepo:1
%endif
# Composer
@@ -144,7 +132,7 @@ AUTOLOAD
%install
mkdir -p %{buildroot}%{phpdir}/Doctrine/Common
-cp -rp lib/Doctrine/Common/Cache %{buildroot}%{phpdir}/Doctrine/Common/
+cp -rp lib/Doctrine/Common/Cache %{buildroot}%{phpdir}/Doctrine/Common/Cache%{major}
%check
@@ -152,7 +140,7 @@ cp -rp lib/Doctrine/Common/Cache %{buildroot}%{phpdir}/Doctrine/Common/
: Create tests bootstrap
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
-require_once '%{buildroot}%{phpdir}/Doctrine/Common/Cache/autoload.php';
+require_once '%{buildroot}%{phpdir}/Doctrine/Common/Cache%{major}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Tests\\', __DIR__.'/tests/Doctrine/Tests');
\Fedora\Autoloader\Dependencies::required([
'%{phpdir}/Cache/IntegrationTests/autoload.php',
@@ -166,21 +154,8 @@ require_once '%{buildroot}%{phpdir}/Doctrine/Common/Cache/autoload.php';
]);
BOOTSTRAP
-: Skip tests known to fail
-rm -f tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
-
: Skip tests requiring a server to connect to
-rm -f \
- tests/Doctrine/Tests/Common/Cache/Psr6/CacheAdapterTest.php \
- tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/CouchbaseBucketCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/ExtMongoDBCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/LegacyMongoDBCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/PredisCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/XcacheCacheTest.php
+rm tests/Doctrine/Tests/Common/Cache/Psr6/CacheAdapterTest.php
: Upstream tests
RETURN_CODE=0
@@ -203,10 +178,15 @@ exit $RETURN_CODE
%doc composer.json
%dir %{phpdir}/Doctrine
%dir %{phpdir}/Doctrine/Common
- %{phpdir}/Doctrine/Common/Cache
+ %{phpdir}/Doctrine/Common/Cache%{major}
%changelog
+* Mon May 17 2021 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- update to 2.0.0
+- rename to php-doctrine-cache2
+- install in /usr/share/php/Doctrine/Common/Cache2
+
* Fri Apr 23 2021 Remi Collet <remi@remirepo.net> - 1.11.0-1
- update to 1.11.0
- switch to phpunit9