3 %bcond_without tests # do not perform "make test"
6 %define pnam FormatText-WithLinks-AndTables
7 Summary: HTML::FormatText::WithLinks::AndTables - Converts HTML to Text with tables in tact
8 Summary(pl.UTF-8): HTML::FormatText::WithLinks::AndTables - konwersja HTML-a do tekstu z tabelkami
9 Name: perl-HTML-FormatText-WithLinks-AndTables
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/HTML/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 0e74b89e8ed0747c970e3de973d56e50
17 URL: http://search.cpan.org/dist/HTML-FormatText-WithLinks-AndTables/
18 BuildRequires: perl-ExtUtils-MakeMaker
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: perl-HTML-FormatText-WithLinks
23 BuildRequires: perl-HTML-Tree
24 BuildRequires: perl-Test-Simple
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This module was inspired by HTML::FormatText::WithLinks which has
31 proven to be a useful `lynx -dump` work-alike. However one frustration
32 was that no other HTML converters had the ability to deal affectively
33 with HTML <TABLE>s. This module can in a rudimentary sense do so. The
34 aim was to provide facility to take a simple HTML based email
35 template, and to also convert it to text with the <TABLE> structure in
36 tact for inclusion as "multipart/alternative" content. Further, it
37 will preserve both the formatting specified by the <TD> tag's "align"
38 attribute, and will also preserve multiline text inside of a <TD>
39 element provided it is broken using <BR/> tags.
41 %description -l pl.UTF-8
42 Ten moduł jest zainspirowany modułem HTML::FormatText::WithLinks,
43 który okazał się przydatnym odpowiednikiem polecenia "lynx -dump".
44 Jednak żaden dotychczasowy konwerter HTML-a nie mógł efektywnie
45 poradzić sobie z elementami HTML <TABLE>. Ten moduł potrafi to w
46 podstawowym zakresie. Celem była możliwość przekazania prostego
47 szablonu wiadomości elektronicznej w HTML-u i przekształcenie jej do
48 tekstu wraz ze strukturą <TABLE>, aby można ją było umieścić w treści
49 multipart/alternative. Co więcej, moduł zachowuje formatowanie
50 określone atrybutem "align" znacznika <TD> oraz wieloliniowy tekst
51 wewnątrz elementu <TD> - pod warunkiem, że jest złamany przy użyciu
55 %setup -q -n %{pdir}-%{pnam}-%{version}
58 %{__perl} Makefile.PL \
62 %{?with_tests:%{__make} test}
65 rm -rf $RPM_BUILD_ROOT
67 %{__make} pure_install \
68 DESTDIR=$RPM_BUILD_ROOT
70 # duplicate of HTML::FormatText::WithLinks::AndTables docs (already included pm and man)
71 %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/HTML/FormatText/WithLinks/README.pod
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
79 %dir %{perl_vendorlib}/HTML/FormatText/WithLinks
80 %{perl_vendorlib}/HTML/FormatText/WithLinks/AndTables.pm
81 %{_mandir}/man3/HTML::FormatText::WithLinks::AndTables.3pm*