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