]>
Commit | Line | Data |
---|---|---|
99062c03 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir HTML | |
6 | %define pnam FormatText-WithLinks-AndTables | |
99062c03 JB |
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 | |
a8c6435a | 10 | Version: 0.07 |
99062c03 JB |
11 | Release: 1 |
12 | # same as perl | |
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 | |
a8c6435a | 16 | # Source0-md5: 0e74b89e8ed0747c970e3de973d56e50 |
99062c03 JB |
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 | |
21 | %if %{with tests} | |
22 | BuildRequires: perl-HTML-FormatText-WithLinks | |
23 | BuildRequires: perl-HTML-Tree | |
24 | BuildRequires: perl-Test-Simple | |
25 | %endif | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
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. | |
40 | ||
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 | |
52 | znaczników <BR/>. | |
53 | ||
54 | %prep | |
edc10a4c | 55 | %setup -q -n %{pdir}-%{pnam}-%{version} |
99062c03 JB |
56 | |
57 | %build | |
58 | %{__perl} Makefile.PL \ | |
59 | INSTALLDIRS=vendor | |
60 | %{__make} | |
61 | ||
62 | %{?with_tests:%{__make} test} | |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %{__make} pure_install \ | |
68 | DESTDIR=$RPM_BUILD_ROOT | |
69 | ||
39ba7c20 | 70 | # duplicate of HTML::FormatText::WithLinks::AndTables docs (already included pm and man) |
a8c6435a | 71 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/HTML/FormatText/WithLinks/README.pod |
39ba7c20 | 72 | |
99062c03 JB |
73 | %clean |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %files | |
77 | %defattr(644,root,root,755) | |
39ba7c20 | 78 | %doc Changes |
99062c03 JB |
79 | %dir %{perl_vendorlib}/HTML/FormatText/WithLinks |
80 | %{perl_vendorlib}/HTML/FormatText/WithLinks/AndTables.pm | |
81 | %{_mandir}/man3/HTML::FormatText::WithLinks::AndTables.3pm* |