summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-12-01 10:32:28 +0100
committerRemi Collet <remi@remirepo.net>2017-12-01 10:32:28 +0100
commit6c362a772380e7437688fe0a830ad195bd5c75de (patch)
tree8f15bb5853d888d77298ef2188ec28ea06345a23
parent04b3c621c73810fb805ca0b7a72cfd6d7e97c82f (diff)
rename to php-phpunit-mock-objects5
update to 5.0.0 boostrap build
-rw-r--r--Makefile4
-rw-r--r--composer.json15
-rw-r--r--php-phpunit-mock-objects5-rpm.patch13
-rw-r--r--php-phpunit-mock-objects5.spec31
4 files changed, 44 insertions, 19 deletions
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/composer.json b/composer.json
index a31a583..8b01215 100644
--- a/composer.json
+++ b/composer.json
@@ -11,14 +11,15 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
"support": {
- "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues",
- "irc": "irc://irc.freenode.net/phpunit"
+ "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues"
},
+ "prefer-stable": true,
+ "minimum-stability": "dev",
"require": {
"php": "^7.0",
"phpunit/php-text-template": "^1.2.1",
@@ -26,11 +27,15 @@
"sebastian/exporter": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^6.5"
},
"conflict": {
"phpunit/phpunit": "<6.0"
},
+ "config": {
+ "optimize-autoloader": true,
+ "sort-packages": true
+ },
"suggest": {
"ext-soap": "*"
},
@@ -46,7 +51,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "5.0.x-dev"
}
}
}
diff --git a/php-phpunit-mock-objects5-rpm.patch b/php-phpunit-mock-objects5-rpm.patch
new file mode 100644
index 0000000..2b3b5ba
--- /dev/null
+++ b/php-phpunit-mock-objects5-rpm.patch
@@ -0,0 +1,13 @@
+diff -up ./src/Generator.php.rpm ./src/Generator.php
+--- ./src/Generator.php.rpm 2017-12-01 10:18:01.270374273 +0100
++++ ./src/Generator.php 2017-12-01 10:18:06.056400373 +0100
+@@ -22,6 +22,9 @@ use SoapClient;
+ use Text_Template;
+ use Traversable;
+
++# temporary workaround
++require_once 'Text/Template.php';
++
+ /**
+ * Mock Object Code Generator
+ */
diff --git a/php-phpunit-mock-objects5.spec b/php-phpunit-mock-objects5.spec
index 33b2876..3783392 100644
--- a/php-phpunit-mock-objects5.spec
+++ b/php-phpunit-mock-objects5.spec
@@ -6,9 +6,9 @@
#
# Please, preserve the changelog entries
#
-%global bootstrap 0
+%global bootstrap 1
# Github
-%global gh_commit 2f789b59ab89669015ad984afa350c4ec577ade0
+%global gh_commit f72a0da31f2bee0b3d90259cacc12f2b0b8b8f5f
#global gh_date 20150902
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_vendor sebastianbergmann
@@ -21,10 +21,10 @@
%global ns_top Framework
%global ns_project MockObject
%global php_home %{_datadir}/php
-%global ver_major 4
+%global ver_major 5
%global ver_minor 0
-%global ver_patch 4
-%global specrel 2
+%global ver_patch 0
+%global specrel 0
%if %{bootstrap}
%global with_tests 0%{?_with_tests:1}
%else
@@ -42,8 +42,7 @@ URL: https://github.com/%{gh_vendor}/%{gh_project}
Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
# Temporary workaround, under investigation
-Patch0: %{gh_project}-4.0.0-rpm.patch
-Patch1: a669a8e3569e62e542812e0620f3d0f7e53870b2.patch
+Patch0: %{name}-rpm.patch
BuildArch: noarch
BuildRequires: php-fedora-autoloader-devel
@@ -56,8 +55,8 @@ BuildRequires: php-composer(doctrine/instantiator) >= 1.0.5
BuildRequires: php-composer(sebastian/exporter) < 4
BuildRequires: php-composer(sebastian/exporter) >= 3.0
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^6.4.3"
-BuildRequires: phpunit6 >= 6.4.3
+# "phpunit/phpunit": "^6.5"
+BuildRequires: phpunit6 >= 6.5
%endif
# From composer.json, "require": {
@@ -89,14 +88,13 @@ Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
%description
Mock Object library for PHPUnit
-Autoloader: %{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}/autoload.php
+Autoloader: %{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}%{ver_major}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p0
-%patch1 -p1
find . -name \*.orig -exec rm {} \; -print
@@ -116,7 +114,7 @@ EOF
%install
mkdir -p %{buildroot}%{php_home}/%{ns_vendor}/%{ns_top}
-cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}
+cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}%{ver_major}
%if %{with_tests}
@@ -128,7 +126,7 @@ phpab \
tests/_fixture/
cat << 'EOF' | tee -a vendor/autoload.php
-require_once '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}/autoload.php';
+require_once '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}%{ver_major}/autoload.php';
EOF
ret=0
@@ -149,10 +147,15 @@ exit $ret
%doc composer.json
%dir %{php_home}/%{ns_vendor}/
%dir %{php_home}/%{ns_vendor}/%{ns_top}/
- %{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}/
+ %{php_home}/%{ns_vendor}/%{ns_top}/%{ns_project}%{ver_major}/
%changelog
+* Fri Dec 1 2017 Remi Collet <remi@remirepo.net> - 5.0.0-0
+- rename to php-phpunit-mock-objects5
+- update to 5.0.0
+- boostrap build
+
* Fri Nov 3 2017 Remi Collet <remi@remirepo.net> - 4.0.4-2
- fix FTBFS from Koschei, add upstream patch