# html2text - an HTML-to-text converter
#
# Sat Aug 27 15:14:03 CEST 2005 - Martin Bayer
#
%define version 1.3.2a
%define name html2text
%define prefix /usr
%define _prefix %{prefix}
%define _usr %{prefix}
Name: %{name}
Version: %{version}
Release: 1
Summary: An HTML-to-text converter
License: GPL
URL: http://www.mbayer.de/html2text/
Group: Applications/Text
Provides: html2text
Prefix: %{prefix}
BuildRoot: /tmp/%{name}-%{version}-%{release}-%(id -u -n)
Source: ftp://ftp.ibiblio.org/pub/linux/apps/www/converters/%{name}-%{version}.tar.gz
%description
html2text is a command line utility that converts HTML documents into
plain text.
Each HTML document is read from standard input or a (local or remote)
URI, and formatted into a stream of plain text characters that is written
to standard output or into an output-file. The program preserves the
original positions of table fields and accepts also syntactically
incorrect input, attempting to interpret it "reasonably". The rendering
is largely customisable through an RC file.
%description -l de
html2text ist ein Programm fuer die Kommandozeile, das HTML-Dateien in
reinen Text umwandelt.
Die HTML-Dateien koennen von Standard Input gelesen werden, als lokale
Dateien vorliegen oder ueber Hypertext Transfer Protocol (HTTP) von
anderen Rechnern geladen werden; die Ausgabe erfolgt auf Standard Output
oder in eine Datei. html2text setzt Tabellen moeglichst getreu um und
toleriert auch syntaktisch unkorrektes HTML. Die Art der Umsetzung
urspruenglicher Formatierungen ist dabei weitgehend durch eine
Konfigurationsdatei beeinflussbar.
%prep
%setup
%build
./configure
make
%install
test "${RPM_BUILD_ROOT}" != '/' && rm -rf "${RPM_BUILD_ROOT}"
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/bin
cp -av html2text ${RPM_BUILD_ROOT}%{prefix}/bin
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man5
cp -av html2text.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1
cp -av html2textrc.5.gz ${RPM_BUILD_ROOT}%{_mandir}/man5
%clean
test "${RPM_BUILD_ROOT}" != '/' && rm -rf "${RPM_BUILD_ROOT}"
%files
%defattr(-,root,root)
%{prefix}/bin/%{name}
%doc README CHANGES COPYING TODO CREDITS KNOWN_BUGS RELEASE_NOTES
%doc %{_mandir}/*/*