summaryrefslogtreecommitdiffstats
path: root/php-Faker.spec
blob: bd93b724bf6591cdad56b04b6963f15cf0da6cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
%global libname     Faker
%global php_min_ver 5.3.3

Name:          php-%{libname}
Version:       1.1.0
Release:       2%{?dist}
Summary:       A PHP library that generates fake data

Group:         Development/Libraries
License:       MIT
URL:           https://github.com/fzaninotto/%{libname}
Source0:       %{url}/archive/v%{version}.tar.gz

BuildArch:     noarch
# Test build requires
BuildRequires: php-common >= %{php_min_ver}
BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
# Test build requires: phpci
Requires:      php-date
Requires:      php-hash
Requires:      php-pcre
Requires:      php-reflection
Requires:      php-spl

Requires:      php-common >= %{php_min_ver}
Requires:      php-pear(pear.doctrine-project.org/DoctrineCommon)
# phpci requires
Requires:      php-date
Requires:      php-hash
Requires:      php-pcre
Requires:      php-reflection
Requires:      php-spl

%description
Faker is a PHP library that generates fake data for you. Whether you need
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/).


%prep
%setup -q -n %{libname}-%{version}

# Remove executable bit from all PHP files
# https://github.com/fzaninotto/Faker/pull/84
find . -name '*.php' -executable | xargs chmod a-x


%build
# Empty build section, nothing to build


%install
mkdir -p -m 755 %{buildroot}%{_datadir}/php
cp -rp src/%{libname} %{buildroot}%{_datadir}/php/


%check
%{_bindir}/phpunit -d date.timezone="UTC" .


%files
%doc LICENSE CHANGELOG readme.md composer.json
%{_datadir}/php/%{libname}


%changelog
* Sun Dec  9 2012 Shawn Iwinski <shawn.iwinski@gmail.com> 1.1.0-2
- Added php-pear(pear.doctrine-project.org/DoctrineCommon) require

* Sun Dec  9 2012 Shawn Iwinski <shawn.iwinski@gmail.com> 1.1.0-1
- Initial package