summaryrefslogtreecommitdiffstats
path: root/php-Assetic.spec
blob: 2701dad4af69babd3e5a101520696fa82ddf987a (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
%global github_owner        kriswallsmith
%global github_name         assetic
%global github_version      1.1.0
%global github_commit       df03baa337ae1c87803a7b1a76a393f8a59813f3
%global github_date         20130224

%global github_release      alpha4

%global php_min_ver         5.3.1

%global symfony_min_ver     2.1.0
%global symfony_max_ver     2.3
%global twig_min_ver        1.6.0
%global twig_max_ver        2.0

Name:          php-Assetic
Version:       %{github_version}
Release:       0.2.%{github_release}%{?dist}
Summary:       Asset Management for PHP

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

Requires:      php(language) >= %{php_min_ver}
Requires:      php-pear(pear.symfony.com/Process) >= %{symfony_min_ver}
Requires:      php-pear(pear.symfony.com/Process) <  %{symfony_max_ver}
# phpci
Requires:      php-ctype
Requires:      php-curl
Requires:      php-date
Requires:      php-hash
Requires:      php-json
Requires:      php-pcre
Requires:      php-spl
Requires:      php-standard
Requires:      php-tokenizer
# Optional
Requires:      php-pear(pear.twig-project.org/Twig) >= %{twig_min_ver}
Requires:      php-pear(pear.twig-project.org/Twig) <  %{twig_max_ver}
Requires:      php-lessphp
# TODO:        leafo/scssphp
#                  In progress, but waiting for upstream.
#                  https://bugzilla.redhat.com/show_bug.cgi?id=880880

%description
Assetic is an asset management framework for PHP.

Optional dependency: APC (php-pecl-apc)

Optional packages:
* https://github.com/leafo/scssphp
* https://github.com/leafo/scssphp-compass
* https://github.com/krichprollsch/phpCssEmbed


%prep
%setup -q -n %{github_name}-%{github_commit}

# Move functions file
mv src/functions.php src/Assetic/

# Remove executable bit
chmod a-x CHANGELOG-1.1.md


%build
# Empty build section, nothing to build


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


%check
# TODO: Work with upstream to figure out why tests are ignored for export
#       (and therefore not included in a GitHub archive)
#       https://github.com/kriswallsmith/assetic/blob/v1.1.0-alpha4/.gitattributes


%files
%defattr(-,root,root,-)
%doc LICENSE *.md composer.json
%{_datadir}/php/Assetic


%changelog
* Mon Mar 11 2013 Remi Collet <remi@fedoraproject.org> - 1.1.0-0.2.alpha4
- backport for remi repo.

* Sat Mar 09 2013 Shawn Iwinski <shawn.iwinski@gmail.com> 1.1.0-0.2.alpha4
- Updated to upstream pre-release version 1.1.0-alpha4

* Wed Feb 27 2013 Shawn Iwinski <shawn.iwinski@gmail.com> 1.1.0-0.1.alpha3
- Initial package