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