blob: 2d7a22b52c7e33a16e1fa21a56ff6c043d0a843c (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
%global github_owner fabpot
%global github_name Goutte
%global github_version 1.0.6
%global github_commit 06a5451288ffddd204b10fa6c6f9ab2b86dd515d
# "php": ">=5.3.0"
%global php_min_ver 5.3.0
# "guzzle/*": "~3.1"
%global guzzle_min_ver 3.1
%global guzzle_max_ver 4.0
# "symfony/*": "~2.1"
%global symfony_min_ver 2.1
%global symfony_max_ver 3.0
Name: php-goutte
Version: %{github_version}
Release: 1%{?github_release}%{?dist}
Summary: A simple PHP web scraper
Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# For tests
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-symfony-browserkit >= %{symfony_min_ver}
BuildRequires: php-symfony-browserkit < %{symfony_max_ver}
BuildRequires: php-symfony-cssselector >= %{symfony_min_ver}
BuildRequires: php-symfony-cssselector < %{symfony_max_ver}
BuildRequires: php-symfony-domcrawler >= %{symfony_min_ver}
BuildRequires: php-symfony-domcrawler < %{symfony_max_ver}
BuildRequires: php-symfony-finder >= %{symfony_min_ver}
BuildRequires: php-symfony-finder < %{symfony_max_ver}
BuildRequires: php-symfony-process >= %{symfony_min_ver}
BuildRequires: php-symfony-process < %{symfony_max_ver}
BuildRequires: php-pear(guzzlephp.org/pear/Guzzle) >= %{guzzle_min_ver}
BuildRequires: php-pear(guzzlephp.org/pear/Guzzle) < %{guzzle_max_ver}
BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
# For tests: phpcompatinfo (computed from v1.0.6)
BuildRequires: php-curl
Requires: php(language) >= %{php_min_ver}
Requires: php-symfony-browserkit >= %{symfony_min_ver}
Requires: php-symfony-browserkit < %{symfony_max_ver}
Requires: php-symfony-cssselector >= %{symfony_min_ver}
Requires: php-symfony-cssselector < %{symfony_max_ver}
Requires: php-symfony-domcrawler >= %{symfony_min_ver}
Requires: php-symfony-domcrawler < %{symfony_max_ver}
Requires: php-symfony-finder >= %{symfony_min_ver}
Requires: php-symfony-finder < %{symfony_max_ver}
Requires: php-symfony-process >= %{symfony_min_ver}
Requires: php-symfony-process < %{symfony_max_ver}
Requires: php-pear(guzzlephp.org/pear/Guzzle) >= %{guzzle_min_ver}
Requires: php-pear(guzzlephp.org/pear/Guzzle) < %{guzzle_max_ver}
# phpcompatinfo (computed from v1.0.6)
Requires: php-curl
%description
Goutte is a screen scraping and web crawling library for PHP.
Goutte provides a nice API to crawl websites and extract data
from the HTML/XML responses.
%prep
%setup -qn %{github_name}-%{github_commit}
%build
# Empty build section, nothing required
%install
rm -rf %{buildroot}
mkdir -pm 0755 %{buildroot}/%{_datadir}/php/%{github_name}
cp -p %{github_name}/Client.php %{buildroot}/%{_datadir}/php/%{github_name}/
%check
# Create tests' bootstrap
mkdir vendor
cat > vendor/autoload.php <<'AUTOLOAD'
<?php
spl_autoload_register(function ($class) {
$src = str_replace(array('\\', '_'), '/', $class).'.php';
@include_once $src;
});
AUTOLOAD
# Create PHPUnit config w/ colors turned off
sed 's/colors="true"/colors="false"/' phpunit.xml.dist > phpunit.xml
%{_bindir}/phpunit -d date.timezone="UTC"
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst composer.json
%{_datadir}/php/%{github_name}
%changelog
* Sat May 17 2014 Remi Collet <remi@fedoraproject.org> 1.0.6-1
- backport 1.0.6 for remi repo
* Fri May 16 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.0.6-1
- Updated to 1.0.6
* Fri Feb 21 2014 Remi Collet <remi@fedoraproject.org> 1.0.5-1
- backport for remi repo
* Wed Feb 19 2014 Shawn Iwinski <shawn.iwinski@gmail.com> 1.0.5-1
- Updated to 1.0.5
- Conditional release dist
- Fixed %%files
* Mon Jan 27 2014 Shawn Iwinski <shawn.iwinski@gmail.com> 1.0.3-1.20140118gite83f8f9
- Initial package
|