siwinski pushed to php-Faker (epel7). "Updated to 1.5.0 (BZ #1226339) (..more)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Sat May 30 18:24:36 UTC 2015
From 69d0999513e5fa847aace4c1d51c08b69dfc2fd7 Mon Sep 17 00:00:00 2001
From: Shawn Iwinski <siwinski at redhat.com>
Date: Sat, 30 May 2015 14:23:44 -0400
Subject: Updated to 1.5.0 (BZ #1226339)
- Packaged autoloader
- %license usage
diff --git a/.gitignore b/.gitignore
index ace449a..b5dc6ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/php-Faker-1.2.0-4ad4bc4b5c8d3c0f3cf55d2fedc2f65b313ec62f.tar.gz
/php-Faker-1.3.0-1d143fd8caf4d264602450bc01d7484af788706b.tar.gz
/php-Faker-1.4.0-010c7efedd88bf31141a02719f51fb44c732d5a0.tar.gz
+/php-Faker-1.5.0-d0190b156bcca848d401fb80f31f504f37141c8d.tar.gz
diff --git a/php-Faker.spec b/php-Faker.spec
index 3dbe7c7..9c36406 100644
--- a/php-Faker.spec
+++ b/php-Faker.spec
@@ -1,7 +1,7 @@
#
# RPM spec file for php-Faker
#
-# Copyright (c) 2012-2014 Shawn Iwinski <shawn.iwinski at gmail.com>
+# Copyright (c) 2012-2015 Shawn Iwinski <shawn.iwinski at gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -11,8 +11,8 @@
%global github_owner fzaninotto
%global github_name Faker
-%global github_version 1.4.0
-%global github_commit 010c7efedd88bf31141a02719f51fb44c732d5a0
+%global github_version 1.5.0
+%global github_commit d0190b156bcca848d401fb80f31f504f37141c8d
# "php": ">=5.3.3"
%global php_min_ver 5.3.3
@@ -20,6 +20,8 @@
# Build using "--without tests" to disable tests
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%{!?phpdir: %global phpdir %{_datadir}/php}
+
Name: php-%{github_name}
Version: %{github_version}
Release: 1%{?dist}
@@ -31,14 +33,19 @@ URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
BuildArch: noarch
+# Autoload generation
+BuildRequires: %{_bindir}/phpab
+# Tests
%if %{with_tests}
-# For tests: composer.json
+## composer.json
+BuildRequires: %{_bindir}/phpunit
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-phpunit-PHPUnit
-# For tests: phpcompatinfo (computed from version 1.4.0)
+## phpcompatinfo (computed from version 1.5.0)
BuildRequires: php-curl
BuildRequires: php-date
+BuildRequires: php-filter
BuildRequires: php-hash
+BuildRequires: php-intl
BuildRequires: php-mbstring
BuildRequires: php-pcre
BuildRequires: php-reflection
@@ -47,6 +54,8 @@ BuildRequires: php-spl
# composer.json
Requires: php(language) >= %{php_min_ver}
+# composer.json: optional
+Requires: php-intl
# phpcompatinfo (computed from version 1.4.0)
Requires: php-curl
Requires: php-date
@@ -64,55 +73,77 @@ to bootstrap your database, create good-looking XML documents, fill-in your
persistence to stress test it, or anonymize data taken from a production
service, Faker is for you.
-Faker is heavily inspired by Perl's Data::Faker
-(http://search.cpan.org/~jasonk/Data-Faker/), and by Ruby's Faker
-(http://faker.rubyforge.org/).
+Faker is heavily inspired by Perl's Data::Faker [1], and by Ruby's Faker [2].
Optional:
+* CakePHP (http://cakephp.org/)
* Doctrine ORM (php-doctrine-orm)
+* Mandango (http://mandango.org/)
+* Propel (http://propelorm.org/)
+
+[1] http://search.cpan.org/~jasonk/Data-Faker/
+[2] http://faker.rubyforge.org/
%prep
%setup -qn %{github_name}-%{github_commit}
-
-%build
-# Empty build section, nothing to build
+: Remove executable bits
+: https://github.com/fzaninotto/Faker/pull/593
+chmod a-x \
+ src/Faker/Provider/sl_SI/Address.php \
+ src/Faker/Provider/sl_SI/Internet.php \
+ src/Faker/Provider/sl_SI/Payment.php \
+ src/Faker/Provider/sl_SI/PhoneNumber.php \
+ test/Faker/Provider/ja_JP/PersonTest.php
-%install
-mkdir -p %{buildroot}%{_datadir}/php
-cp -rp src/%{github_name} %{buildroot}%{_datadir}/php/
+%build
+: Generate autoloader
+%{_bindir}/phpab --nolower --output src/Faker/autoload.php src/Faker
+(cat <<'AUTOLOAD'
-%check
-%if %{with_tests}
-# Create autoloader
-mkdir vendor
-cat > vendor/autoload.php <<'AUTOLOAD'
-<?php
+// TODO: Add optional package autoloaders from their packages when they are available
spl_autoload_register(function ($class) {
- $src = str_replace('\\', '/', $class).'.php';
+ $src = str_replace('\\', '/', $class) . '.php';
@include_once $src;
});
AUTOLOAD
+) | tee -a src/Faker/autoload.php
-# Skip tests that require downloading content
+
+%install
+mkdir -p %{buildroot}%{phpdir}
+cp -rp src/%{github_name} %{buildroot}%{phpdir}/
+
+
+%check
+%if %{with_tests}
+: Skip tests that require downloading content
sed 's/function testDownloadWithDefaults/function SKIP_testDownloadWithDefaults/' \
-i test/Faker/Provider/ImageTest.php
-%{_bindir}/phpunit --include-path="./src:./test" -d date.timezone="UTC"
+%{_bindir}/phpunit --bootstrap %{buildroot}%{phpdir}/Faker/autoload.php
%else
: Tests skipped
%endif
%files
-%doc LICENSE CHANGELOG *.md composer.json
-%{_datadir}/php/%{github_name}
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc *.md
+%doc composer.json
+%{phpdir}/%{github_name}
%changelog
+* Sat May 30 2015 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.5.0-1
+- Updated to 1.5.0 (BZ #1226339)
+- Packaged autoloader
+- %%license usage
+
* Sun Jun 08 2014 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.4.0-1
- Updated to 1.4.0 (BZ #1105815)
- Added php-composer(fzaninotto/faker) virtual provide
diff --git a/sources b/sources
index eba63c8..95a4797 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-5169f54e8cff7de8cc90141f17ba89b1 php-Faker-1.4.0-010c7efedd88bf31141a02719f51fb44c732d5a0.tar.gz
+b0eb45ac13eb420580f67090dd68e114 php-Faker-1.5.0-d0190b156bcca848d401fb80f31f504f37141c8d.tar.gz
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/php-Faker.git/commit/?h=epel7&id=69d0999513e5fa847aace4c1d51c08b69dfc2fd7
More information about the scm-commits
mailing list