]>
Commit | Line | Data |
---|---|---|
f3d439f8 | 1 | # |
2 | # Conditional build: | |
f400c2f7 | 3 | %bcond_without tests # do not perform "make test" |
4 | # | |
f9cd280a | 5 | %define pdir HTML |
6 | %define pnam Template | |
73658af2 | 7 | Summary: HTML::Template - Perl module to use HTML templates from CGI scripts |
2dccf969 | 8 | Summary(pl.UTF-8): HTML::Template - moduł Perla do obsługi szablonów HTML w skryptach CGI |
9911ee26 | 9 | Name: perl-HTML-Template |
8703b738 | 10 | Version: 2.97 |
c1d5ca8f | 11 | Release: 1 |
797ee7f8 | 12 | License: GPL v1+ or Artistic |
9911ee26 | 13 | Group: Development/Languages/Perl |
0d9a7791 | 14 | Source0: http://www.cpan.org/modules/by-module/HTML/%{pdir}-%{pnam}-%{version}.tar.gz |
8703b738 | 15 | # Source0-md5: ee5f4a78102d2ffe089e047d2dbb0ff8 |
4c7aefe1 | 16 | URL: https://github.com/mpeters/html-template/ |
0d9a7791 | 17 | BuildRequires: perl-ExtUtils-MakeMaker >= 6.30 |
4ca5456b | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
0d9a7791 | 19 | BuildRequires: rpm-perlprov >= 4.1-13 |
f400c2f7 | 20 | %if %{with tests} |
0d9a7791 | 21 | BuildRequires: perl(File::Spec) >= 0.82 |
f3d439f8 | 22 | BuildRequires: perl-Digest-MD5 |
23 | BuildRequires: perl-IPC-SharedCache | |
f3d439f8 | 24 | %endif |
d4906482 | 25 | BuildArch: noarch |
5daf04a9 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
9911ee26 | 27 | |
28 | %description | |
f3d439f8 | 29 | This module attempts make using HTML templates simple and natural. |
30 | ||
31 | It extends standard HTML with a few new HTML-esque tags - <TMPL_VAR>, | |
0d9a7791 JB |
32 | <TMPL_LOOP>, <TMPL_INCLUDE>, <TMPL_IF> and <TMPL_ELSE>. The file |
33 | written with HTML and these new tags is called a template. It is | |
34 | usually saved separate from your script - possibly even created by | |
35 | someone else! | |
f3d439f8 | 36 | |
37 | Using this module you fill in the values for the variables, loops and | |
0d9a7791 JB |
38 | branches declared in the template. This allows you to seperate design |
39 | - the HTML - from the data, which you generate in the Perl script. | |
9911ee26 | 40 | |
f838fd34 | 41 | %description -l pl.UTF-8 |
0d9a7791 JB |
42 | Ten moduł próbuje uczynić wykorzystywanie szablonów HTML prostym i |
43 | naturalnym. | |
44 | ||
45 | Rozszerza standardowy HTML o kilka znaczników HTML-opodobnych: | |
46 | <TMPL_VAR>, <TMPL_LOOP>, <TMPL_INCLUDE>, <TMPL_IF> oraz <TMPL_ELSE>. | |
47 | Plik napisany w HTML-u z użyciem tych nowych znaczników nazywa się | |
48 | szablonem. Zwykle jest oddzielony od skryptu - a nawet tworzony przez | |
49 | kogoś innego. | |
50 | ||
51 | Przy użyciu tego modułu wypełnia się wartościami zmienne, pętle oraz | |
52 | warunki zadeklarowane w szablonie. Pozwala to oddzielić projekt (HTML) | |
53 | od danych generowanych w skrypcie perlowym. | |
9911ee26 | 54 | |
55 | %prep | |
72a86e92 | 56 | %setup -q -n %{pdir}-%{pnam}-%{version} |
9911ee26 | 57 | |
58 | %build | |
8a2a7325 | 59 | %{__perl} Makefile.PL \ |
348bee96 | 60 | INSTALLDIRS=vendor |
da56de8f | 61 | %{__make} |
f3d439f8 | 62 | |
f400c2f7 | 63 | %{?with_tests:TEST_SHARED_MEMORY=1 TEST_FILE_CACHE=1 %{__make} test} |
9911ee26 | 64 | |
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
5daf04a9 | 67 | |
9f1b61e8 | 68 | %{__make} install \ |
69 | DESTDIR=$RPM_BUILD_ROOT | |
9911ee26 | 70 | |
0d9a7791 JB |
71 | # just docs |
72 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/HTML/Template/FAQ.pm | |
9911ee26 | 73 | |
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
a1b8141b | 79 | %doc Changes README templates scripts |
0d9a7791 JB |
80 | %{perl_vendorlib}/HTML/Template.pm |
81 | %dir %{perl_vendorlib}/HTML/Template | |
82 | %{_mandir}/man3/HTML::Template.3pm* | |
83 | %{_mandir}/man3/HTML::Template::FAQ.3pm* |