2007-01-15 23:16:51 +00:00
|
|
|
#
|
2014-10-09 10:52:26 +00:00
|
|
|
# spec file for package html2text
|
2007-01-15 23:16:51 +00:00
|
|
|
#
|
2023-08-07 07:49:17 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2007-01-15 23:16:51 +00:00
|
|
|
#
|
2009-01-28 22:41:20 +00:00
|
|
|
# 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.
|
|
|
|
|
|
2021-04-13 11:06:11 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-15 23:16:51 +00:00
|
|
|
#
|
|
|
|
|
|
2009-01-28 22:41:20 +00:00
|
|
|
|
2007-02-06 23:39:23 +00:00
|
|
|
Name: html2text
|
2023-08-07 07:49:17 +00:00
|
|
|
Version: 2.2.3
|
2014-10-09 10:52:26 +00:00
|
|
|
Release: 0
|
2023-08-07 07:49:17 +00:00
|
|
|
Summary: HTML to text converter
|
2021-04-13 11:06:11 +00:00
|
|
|
License: GPL-2.0-or-later
|
2014-10-09 10:52:26 +00:00
|
|
|
Group: Productivity/Publishing/HTML/Tools
|
2021-04-13 11:06:11 +00:00
|
|
|
URL: https://github.com/grobian/html2text
|
2023-08-07 07:49:17 +00:00
|
|
|
Source: https://github.com/grobian/html2text/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
2014-10-09 10:52:26 +00:00
|
|
|
BuildRequires: gcc-c++
|
2021-04-13 11:06:11 +00:00
|
|
|
Requires(post): update-alternatives
|
2022-09-13 06:24:44 +00:00
|
|
|
Requires(preun):update-alternatives
|
2007-01-15 23:16:51 +00:00
|
|
|
|
|
|
|
|
%description
|
2023-08-07 07:49:17 +00:00
|
|
|
A tool for converting from HTML to text. It can reasonably handle tables.
|
2007-01-15 23:16:51 +00:00
|
|
|
|
|
|
|
|
%prep
|
2021-04-13 11:06:11 +00:00
|
|
|
%autosetup
|
2007-01-15 23:16:51 +00:00
|
|
|
|
|
|
|
|
%build
|
2016-05-02 07:56:16 +00:00
|
|
|
%configure
|
2023-08-07 07:49:17 +00:00
|
|
|
%make_build
|
2007-01-15 23:16:51 +00:00
|
|
|
|
|
|
|
|
%install
|
2023-08-07 07:49:17 +00:00
|
|
|
%make_build install DESTDIR=%{buildroot}
|
2017-04-28 07:19:30 +00:00
|
|
|
# To avoid conflicts with the python3-html2text package
|
2023-08-07 07:49:17 +00:00
|
|
|
mv %{buildroot}%{_bindir}/html2text %{buildroot}%{_bindir}/html2text-cpp
|
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/html2text %{buildroot}%{_bindir}/html2text
|
|
|
|
|
mv %{buildroot}%{_mandir}/man1/html2text.1 %{buildroot}%{_mandir}/man1/html2text-cpp.1
|
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/html2text.1.gz %{buildroot}%{_mandir}/man1/html2text.1.gz
|
2007-01-15 23:16:51 +00:00
|
|
|
|
2023-08-07 07:49:17 +00:00
|
|
|
%check
|
|
|
|
|
%make_build check
|
2017-04-28 07:19:30 +00:00
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
update-alternatives --install %{_bindir}/html2text html2text %{_bindir}/html2text-cpp 30 \
|
|
|
|
|
--slave %{_mandir}/man1/html2text.1.gz html2text.1.gz %{_mandir}/man1/html2text-cpp.1.gz
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ ! -f %{_bindir}/html2text-cpp ] ; then
|
|
|
|
|
update-alternatives --remove html2text %{_bindir}/html2text-cpp
|
|
|
|
|
fi
|
|
|
|
|
|
2007-01-15 23:16:51 +00:00
|
|
|
%files
|
2021-04-13 11:06:11 +00:00
|
|
|
%license COPYING
|
2023-08-07 07:49:17 +00:00
|
|
|
##%%doc ChangeLog.md
|
2016-05-02 07:56:16 +00:00
|
|
|
%{_bindir}/html2text
|
2017-04-28 07:19:30 +00:00
|
|
|
%{_bindir}/html2text-cpp
|
|
|
|
|
%ghost %{_sysconfdir}/alternatives/html2text
|
2021-04-13 11:06:11 +00:00
|
|
|
%{_mandir}/man1/html2text.1%{?ext_man}
|
|
|
|
|
%{_mandir}/man1/html2text-cpp.1%{?ext_man}
|
2017-04-28 07:19:30 +00:00
|
|
|
%ghost %{_sysconfdir}/alternatives/html2text.1.gz
|
2021-04-13 11:06:11 +00:00
|
|
|
%{_mandir}/man5/html2textrc.5%{?ext_man}
|
2007-01-15 23:16:51 +00:00
|
|
|
|
2007-04-03 19:29:53 +00:00
|
|
|
%changelog
|