File html2text.spec of Package html2text

#
# spec file for package html2text
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           html2text
Version:        1.3.2a
Release:        0
Summary:        HTML to ASCII Converter
License:        GPL-2.0+
Group:          Productivity/Publishing/HTML/Tools
Url:            http://www.mbayer.de/html2text/
Source:         html2text-%{version}.tar.bz2
Source1:        html2text.1.gz
Patch0:         html2text-debian-200_close_files_inside_main_loop.patch
Patch1:         html2text-debian-220_nobs_when_stdout_is_a_tty.patch
Patch2:         html2text-1.3.2a-400_remove_builtin_http_support.patch
Patch3:         html2text-debian-500_utf8_support.patch
Patch4:         html2text-debian-510_disable_backspaces.patch
Patch5:         html2text-debian-600_multiple_meta_tags.patch
Patch6:         html2text-1.3.2a-611_recognize_input_encoding.patch
Patch7:         html2text-debian-630_recode_output_to_locale_charset.patch
Patch8:         http://www.mbayer.de/html2text/downloads/patch-amd64-html2text-1.3.2a.diff
Patch9:         html2text-debian-810_fix_deprecated_conversion_warnings.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  gcc-c++
Provides:       html2txt
Obsoletes:      html2txt

%description
A tool for converting from HTML to ASCII. It can reasonably handle
tables.



Authors:
--------
    Arno Unkrig <arno.unkrig@gmrs.de>
    Martin Bayer <mbayer@zedat.fu-berlin.de>
    Eugene V. Lyubimkin <jackyf.devel@gmail.com>

%prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
cp -a %{SOURCE1} .

%build
./configure --prefix=/usr --mandir=%{_mandir}
make %{?_smp_mflags} EXPLICIT="${RPM_OPT_FLAGS}"

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{1,5}
install -m 755 html2text $RPM_BUILD_ROOT/usr/bin
install -m 644 html2text.1.gz $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 html2textrc.5.gz $RPM_BUILD_ROOT%{_mandir}/man5

%files
%defattr(-,root,root)
%doc INSTALL README CHANGES COPYING TODO CREDITS KNOWN_BUGS RELEASE_NOTES
/usr/bin/html2text
%doc %{_mandir}/man1/html2text.1.gz
%doc %{_mandir}/man5/html2textrc.5.gz

%changelog
openSUSE Build Service is sponsored by