summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-06-20 13:09:50 +0200
committerRemi Collet <fedora@famillecollet.com>2016-06-20 13:09:50 +0200
commitb84a7e0b80a221082aa7bb6e596e730644cab794 (patch)
treec12d8367cd5624ffb603cfb6259acc4f496c8195
parentb3d61e320a21a70ee22f068823aa567aab6a3e51 (diff)
php-nette-robot-loader: 2.3.2
-rw-r--r--composer.json32
-rw-r--r--php-nette-robot-loader-rpm.patch15
-rw-r--r--php-nette-robot-loader.spec22
3 files changed, 65 insertions, 4 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..92d3d12
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,32 @@
+{
+ "name": "nette/robot-loader",
+ "description": "Nette RobotLoader: comfortable autoloading",
+ "homepage": "https://nette.org",
+ "license": ["BSD-3-Clause", "GPL-2.0", "GPL-3.0"],
+ "authors": [
+ {
+ "name": "David Grudl",
+ "homepage": "https://davidgrudl.com"
+ },
+ {
+ "name": "Nette Community",
+ "homepage": "https://nette.org/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.1",
+ "nette/caching": "~2.2",
+ "nette/finder": "~2.3",
+ "nette/utils": "~2.2"
+ },
+ "require-dev": {
+ "nette/tester": "~1.4"
+ },
+ "conflict": {
+ "nette/nette": "<2.2"
+ },
+ "autoload": {
+ "classmap": ["src/"]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/php-nette-robot-loader-rpm.patch b/php-nette-robot-loader-rpm.patch
new file mode 100644
index 0000000..4aba2ed
--- /dev/null
+++ b/php-nette-robot-loader-rpm.patch
@@ -0,0 +1,15 @@
+diff -up tests/bootstrap.php.rpm tests/bootstrap.php
+--- tests/bootstrap.php.rpm 2016-06-20 12:18:26.000000000 +0200
++++ tests/bootstrap.php 2016-06-20 13:03:04.814182986 +0200
+@@ -16,8 +16,6 @@ date_default_timezone_set('Europe/Prague
+
+ // create temporary directory
+ define('TEMP_DIR', __DIR__ . '/tmp/' . lcg_value());
+-@mkdir(TEMP_DIR, 0777, TRUE); // @ - base directory may already exist
+-register_shutdown_function(function () {
+- Tester\Helpers::purge(TEMP_DIR);
+- rmdir(TEMP_DIR);
+-});
++@mkdir(__DIR__ . '/tmp/');
++@mkdir(TEMP_DIR); // @ - base directory may already exist
++
diff --git a/php-nette-robot-loader.spec b/php-nette-robot-loader.spec
index 2916591..a05e52e 100644
--- a/php-nette-robot-loader.spec
+++ b/php-nette-robot-loader.spec
@@ -6,7 +6,7 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 69331d359bbc9e5f911c12b82187cac914d983fb
+%global gh_commit 0dbed866df47fd0425ce9a3cc9085779d8ada143
#global gh_date 20150728
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner nette
@@ -17,8 +17,8 @@
%global with_tests 0%{!?_without_tests:1}
Name: php-%{gh_owner}-%{gh_project}
-Version: 2.3.1
-%global specrel 2
+Version: 2.3.2
+%global specrel 1
Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Nette RobotLoader: comfortable autoloading
@@ -29,6 +29,9 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
# pull a git snapshot to get test sutie
Source1: makesrc.sh
+# Ensure TEMP_DIR exists
+Patch0: %{name}-rpm.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-composer(theseer/autoload)
@@ -38,6 +41,7 @@ BuildRequires: php-composer(%{gh_owner}/caching) >= 2.2
BuildRequires: php-composer(%{gh_owner}/finder) >= 2.3
BuildRequires: php-composer(%{gh_owner}/utils) >= 2.2
BuildRequires: php-pcre
+BuildRequires: php-phar
BuildRequires: php-spl
# From composer.json, "require-dev": {
# "nette/tester": "~1.4"
@@ -79,6 +83,8 @@ To use this library, you just have to add, in your project:
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p0 -b .rpm
+
%build
: Generate a classmap autoloader
@@ -114,6 +120,11 @@ EOF
: Run test suite in sources tree
nette-tester --colors 0 -p php -c ./php.ini tests -s
+
+if which php70; then
+ cat /etc/opt/remi/php70/php.ini /etc/opt/remi/php70/php.d/*ini >php.ini
+ php70 %{_bindir}/nette-tester --colors 0 -p php70 -c ./php.ini tests -s
+fi
%else
: Test suite disabled
%endif
@@ -133,8 +144,11 @@ rm -rf %{buildroot}
%changelog
+* Mon Jun 20 2016 Remi Collet <remi@fedoraproject.org> - 2.3.2-1
+- update to 2.3.2
+
* Tue Nov 3 2015 Remi Collet <remi@fedoraproject.org> - 2.3.1-2
- fix package summary
* Fri Oct 30 2015 Remi Collet <remi@fedoraproject.org> - 2.3.1-1
-- initial package \ No newline at end of file
+- initial package