# # spec file for package html2text # # Copyright (c) 2021 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.0.0 Release: 1.2 Summary: HTML to ASCII Converter License: GPL-2.0-or-later Group: Productivity/Publishing/HTML/Tools URL: https://github.com/grobian/html2text Source0: https://github.com/grobian/html2text/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: html2text.1.gz BuildRequires: gcc-c++ Requires(post): update-alternatives Requires(preun): update-alternatives %description A tool for converting from HTML to ASCII. It can reasonably handle tables. %prep %autosetup %build %configure %make_build EXPLICIT="%{optflags}" %install # To avoid conflicts with the python3-html2text package install -Dpm 0755 html2text \ %{buildroot}%{_bindir}/html2text-cpp install -Dpm 0644 %{SOURCE1} \ %{buildroot}%{_mandir}/man1/html2text-cpp.1.gz gzip html2textrc.5 install -Dpm 0644 html2textrc.5.gz \ %{buildroot}%{_mandir}/man5/html2textrc.5.gz ln -s -f %{_sysconfdir}/alternatives/html2text %{buildroot}%{_bindir}/html2text ln -s -f %{_sysconfdir}/alternatives/html2text.1.gz %{buildroot}%{_mandir}/man1/html2text.1.gz %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 CHANGES TODO CREDITS KNOWN_BUGS RELEASE_NOTES %{_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 * 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