# # spec file for package html2text # # Copyright (c) 2023 SUSE LLC # # 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 https://bugs.opensuse.org/ # Name: html2text Version: 2.2.3 Release: publishing.318.30 Summary: HTML to text converter License: GPL-2.0-or-later Group: Productivity/Publishing/HTML/Tools URL: https://github.com/grobian/html2text Source: https://github.com/grobian/html2text/releases/download/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ Requires(post): update-alternatives Requires(preun):update-alternatives %description A tool for converting from HTML to text. It can reasonably handle tables. %prep %autosetup %build %configure %make_build %install %make_build install DESTDIR=%{buildroot} # To avoid conflicts with the python3-html2text package 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 %check %make_build check %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 %files %license COPYING ##%%doc ChangeLog.md %{_bindir}/html2text %{_bindir}/html2text-cpp %ghost %{_sysconfdir}/alternatives/html2text %{_mandir}/man1/html2text.1%{?ext_man} %{_mandir}/man1/html2text-cpp.1%{?ext_man} %ghost %{_sysconfdir}/alternatives/html2text.1.gz %{_mandir}/man5/html2textrc.5%{?ext_man} %changelog * Wed Aug 2 2023 Manfred Schwarb - remove obsolete and misleading custom man page, use packaged version instead - use release tarball for build, as the tag version has no autoconf files included - Update to release 2.2.3 * HTMLParser: de-code entities in HREF targets * format: kill sprintf usage - Update to release 2.2.2 * build-sys: ensure we link against libiconv when necessary - Update to release 2.2.1 * build-sys: fix making a release - Update to release 2.2.0 * several bug fixes * Add back support for "-utf8" flag for backwards compatibility * convert to autotools * Mon Aug 29 2022 Jan Engelhardt - Update to release 2.1.1 * Try and detect encoding from HTML source * Fixes a spurious crash with `-from_encoding UTF-8//TRANSLIT` * Tue Apr 13 2021 Martin Pluskal - Switch to new project url - Update to version 2.0.0 boo#1168657 - Drop patches: * html2text-1.3.2a-400_remove_builtin_http_support.patch * html2text-1.3.2a-611_recognize_input_encoding.patch * html2text-debian-200_close_files_inside_main_loop.patch * html2text-debian-220_nobs_when_stdout_is_a_tty.patch * html2text-debian-500_utf8_support.patch * html2text-debian-510_disable_backspaces.patch * html2text-debian-600_multiple_meta_tags.patch * html2text-debian-630_recode_output_to_locale_charset.patch * html2text-debian-810_fix_deprecated_conversion_warnings.patch * patch-amd64-html2text-1.3.2a.diff * Thu Apr 27 2017 toddrme2178@gmail.com - Implement update-alternatives to avoid conflict with python3-html2text. * Mon Mar 21 2016 mpluskal@suse.com - Cleanup spec file with spec-cleaner - Use macro for configure - Do not ship INSTALL - Remove useless provides/obsoletes - Add gpg signature - Use url for source * Wed Oct 8 2014 jengelh@inai.de - Remove old/implicit specfile tags (AutoReqProv, norootforbuild) * Wed Jan 6 2010 jengelh@medozas.de - enable parallel build * Wed Jan 28 2009 kssingvo@suse.de - added RPM_OPT_FLAGS * Tue Jan 27 2009 kssingvo@suse.de - added a lot of debians patches, adapted some of them - modified manual page with approval from author: debian to openSUSE * Tue Apr 3 2007 kssingvo@suse.de - using now upstream patch for 64bit - added upstream utf-8 patch * Tue Feb 6 2007 kssingvo@suse.de - fixed 64bit pointer issue (bugzilla#242105) * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Mon Jan 16 2006 schwab@suse.de - Don't strip binaries. * Thu Jan 20 2005 ro@suse.de - renamed to html2text * Tue Jan 20 2004 kssingvo@suse.de - upgrade to 1.3.2a - norootforbuild - added %%doc RELEASE_NOTES * Sun Jan 11 2004 adrian@suse.de - add %%defattr * Wed Apr 23 2003 coolo@suse.de - use BuildRoot * Tue Mar 11 2003 fehr@suse.de - update to new version 1.3.1 * Thu Apr 18 2002 fehr@suse.de - make it compile with gcc 3.1 * Fri Jun 22 2001 fehr@suse.de - change to version 1.2.4 * Wed Mar 28 2001 fehr@suse.de - change to version 1.2.3 * Fri Nov 17 2000 fehr@suse.de - set group tag * Fri May 26 2000 fehr@suse.de - move documentation to /usr/share/doc/packages * Tue Feb 29 2000 fehr@suse.de - change to version 1.2.2 * Mon Jan 31 2000 fehr@suse.de - fixed for new gcc 2.95.2 * Wed Jan 12 2000 fehr@suse.de - change to version 1.2.1 * Wed Nov 24 1999 fehr@suse.de - change to version 1.2 * Tue Nov 23 1999 fehr@suse.de - change to version 1.1.1 * Wed Sep 29 1999 fehr@suse.de - change to version 1.04 * Tue Sep 21 1999 fehr@suse.de - change to version 1.03 * Fri Jul 2 1999 fehr@suse.de - change to version 1.02 * Fri Jun 18 1999 fehr@suse.de - change to version 1.01 * Wed Jun 16 1999 fehr@suse.de - add version 1.0 of package to suse distribution