]>
Commit | Line | Data |
---|---|---|
fa62d6b4 | 1 | %define pearname Twig |
8e6c4521 | 2 | %define php_min_version 5.2.4 |
8e6c4521 ER |
3 | Summary: The flexible, fast, and secure template engine for PHP |
4 | Name: php-twig-%{pearname} | |
b27ab11f | 5 | Version: 1.29.0 |
fa62d6b4 ER |
6 | Release: 1 |
7 | License: BSD Style | |
8 | Group: Development/Languages/PHP | |
9 | Source0: http://pear.twig-project.org/get/%{pearname}-%{version}.tgz | |
b27ab11f | 10 | # Source0-md5: 728dd236dfa82f30fcb1d54ab1bf2672 |
8e6c4521 | 11 | URL: http://twig.sensiolabs.org/ |
fa62d6b4 | 12 | BuildRequires: php-channel(pear.twig-project.org) |
fa62d6b4 ER |
13 | BuildRequires: php-pear-PEAR |
14 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
15 | BuildRequires: rpmbuild(macros) >= 1.610 | |
f821a87f ER |
16 | Requires: php(core) >= %{php_min_version} |
17 | Requires: php(ctype) | |
18 | Requires: php(date) | |
19 | Requires: php(dom) | |
20 | Requires: php(hash) | |
21 | Requires: php(json) | |
22 | Requires: php(mbstring) | |
23 | Requires: php(pcre) | |
24 | Requires: php(spl) | |
fa62d6b4 ER |
25 | Requires: php-channel(pear.twig-project.org) |
26 | Requires: php-pear | |
8e6c4521 | 27 | Suggests: php(xdebug) |
fa62d6b4 ER |
28 | BuildArch: noarch |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Twig is a template language for PHP. | |
33 | ||
34 | Twig uses a syntax similar to the Django and Jinja template languages | |
35 | which inspired the Twig runtime environment. | |
36 | ||
8e6c4521 ER |
37 | - Fast: Twig compiles templates down to plain optimized PHP code. The |
38 | overhead compared to regular PHP code was reduced to the very minimum. | |
39 | - Secure: Twig has a sandbox mode to evaluate untrusted template code. | |
40 | This allows Twig to be used as a template language for applications | |
41 | where users may modify the template design. | |
42 | - Flexible: Twig is powered by a flexible lexer and parser. This | |
43 | allows the developer to define its own custom tags and filters, and | |
44 | create its own DSL. | |
fa62d6b4 ER |
45 | |
46 | %prep | |
47 | %pear_package_setup | |
48 | ||
8e6c4521 | 49 | mv docs/Twig/* . |
fa62d6b4 ER |
50 | |
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | install -d $RPM_BUILD_ROOT%{php_pear_dir} | |
54 | %pear_package_install | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %files | |
60 | %defattr(644,root,root,755) | |
8e6c4521 ER |
61 | %doc install.log |
62 | %doc README.rst CHANGELOG LICENSE | |
fa62d6b4 ER |
63 | %{php_pear_dir}/.registry/.channel.*/*.reg |
64 | %{php_pear_dir}/Twig |