%define name html2text
%define ver 1.3.1
%define rel 2
%define prefix /usr
#
# Make SuSE's macros relocatable, i.e. pick up on prefix for _mandir and man
# pages. This may not always work and may have side-effects - check!
# This also shifts /usr/doc/packages for %doc; restore the package doc dir to
# its original location (in theory it should be shifted as well, e.g. into
# /usr/local, in practice it's easier to leave it for now).
%define _prefix %{prefix}
%define _usr %{prefix}
%define _docdir /usr/share/doc/packages
Summary: HTML to plain text converter
Name: %{name}
Version: %{ver}
Release: %{rel}
Copyright: GPL
Group: Productivity/Publishing/HTML/Tools
Source: http://userpage.fu-berlin.de/~mbayer/tools/html2text-1.3.1.tar.gz
URL: http://userpage.fu-berlin.de/~mbayer/tools/html2text.html
Vendor: Martin Bayer
Packager: Volker Kuhlmann
Distribution: SuSE Linux 8.2 contrib
BuildRoot: /tmp/%{name}-%{version}-%{release}-%(id -u -n)
Prefix: %{prefix}
Autoreqprov: on
Summary(de): HMTL zu ASCII Konvertierer
%changelog
* Mon May 05 2003 - Volker Kuhlmann 1.3.1-2
- Package available from: http://volker.dnsalias.net/soft/
- for SuSE 8.2
* Fri Nov 29 2002 Volker Kuhlmann
- For SuSE 8.1, the version shipped by SuSE is way too old
%description
html2text is a command line utility, which converts HTML documents (HTML 3.2)
into plain text (ISO 8859-1).
Each HTML document is loaded from stdin or a URI (whih may be remote), and
formatted into a stream of plain text characters that is written to standard
output or into an output-file. The program is able to preserve the original
positions of table fields and accepts also syntactically incorrect input,
attempting to interpret it "reasonably". The rendering is largely customisable
through a resource file.
%description -l de
html2text ist ein C++-Programm für die Kommandozeile, das HTML-Dateien (HTML
3.2) in reinen Text (ISO 8859-1) umwandelt.
Die HTML Daten werden von Standardinput gelesen oder können über eine URI
geladen werden. html2text setzt Tabellen möglichst getreu um (anders als z.B.
"lynx -dump") und toleriert auch syntaktisch unkorrektes HTML. Die Art der
Umsetzung ursprünglicher Formatierungen (Rendering) 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/*
%doc INSTALL README CHANGES COPYING TODO CREDITS KNOWN_BUGS
%doc %{_mandir}/*/*