Sync from SUSE:SLFO:Main texi2html revision 46755241c27d10c8ed7cb8972a492ce8

This commit is contained in:
Adrian Schröter 2024-05-04 01:07:55 +02:00
commit f33c4d09c3
9 changed files with 520 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,93 @@
Description: Add --build-date command line flag.
Allow create reproducible documentation passing a unix time in the command
line.
Author: Juan Picca <jumapico@gmail.com>
Last-Update: 2015-05-16
Index: texi2html-5.0/T2h_i18n.pm
===================================================================
--- texi2html-5.0.orig/T2h_i18n.pm
+++ texi2html-5.0/T2h_i18n.pm
@@ -315,7 +315,14 @@ sub pretty_date($)
my $lang = shift;
my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
- ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
+ if (defined $Texi2HTML::Config::BUILD_DATE)
+ {
+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime($Texi2HTML::Config::BUILD_DATE);
+ }
+ else
+ {
+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
+ }
$year += ($year < 70) ? 2000 : 1900;
return main::gdt('{month} {day}, {year}', { 'month' => main::gdt($MONTH_NAMES[$mon]),
'day' => $mday, 'year' => $year });
Index: texi2html-5.0/texi2html.init
===================================================================
--- texi2html-5.0.orig/texi2html.init
+++ texi2html-5.0/texi2html.init
@@ -296,6 +296,10 @@ $L2H = '';
# output only one file including ToC. It only makes sense when not split
$MONOLITHIC = 1;
+# -build-date
+# Use the given unix time as build date showing UTC timezone when it is used
+$BUILD_DATE = $ENV{'SOURCE_DATE_EPOCH'};
+
######################
# The following options are only relevant if $L2H is set
#
Index: texi2html-5.0/texi2html.pl
===================================================================
--- texi2html-5.0.orig/texi2html.pl
+++ texi2html-5.0/texi2html.pl
@@ -333,6 +333,7 @@ $EXTERNAL_DIR
$IGNORE_PREAMBLE_TEXT
@CSS_FILES
@CSS_REFS
+$BUILD_DATE
$INLINE_CONTENTS
$INLINE_INSERTCOPYING
$PARAGRAPHINDENT
@@ -3264,6 +3265,13 @@ $T2H_OPTIONS -> {'css-ref'} =
verbose => 'generate reference to the CSS URL $s'
};
+$T2H_OPTIONS -> {'build-date'} =
+{
+ type => '=i',
+ linkage => \$Texi2HTML::Config::BUILD_DATE,
+ verbose => 'use the given unix time as build date showing UTC timezone when it is used'
+};
+
$T2H_OPTIONS -> {'transliterate-file-names'} =
{
type => '!',
Index: texi2html-5.0/doc/texi2html.texi
===================================================================
--- texi2html-5.0.orig/doc/texi2html.texi
+++ texi2html-5.0/doc/texi2html.texi
@@ -529,6 +529,8 @@ Display a short help and exit.
Be verbose.
@item @longopt{version}
Display version information and exit.
+@item @longopt{build-date=@var{unixtime}}
+Use the given unix time as build date showing UTC timezone when it is used.
@end table
@c --------------------------------------------------------
Index: texi2html-5.0/doc/texi2html.info
===================================================================
--- texi2html-5.0.orig/doc/texi2html.info
+++ texi2html-5.0/doc/texi2html.info
@@ -439,6 +439,9 @@ Miscellaneous general options:
Display version information and exit.
+`--build-date=UNIXTIME'
+ Use the given unix time as build date showing UTC timezone when it is used.
+

File: texi2html.info, Node: Splitting output, Next: Output files, Prev: General options, Up: Invoking texi2html

8
texi2html-1.78.dif Normal file
View File

@ -0,0 +1,8 @@
--- doc/texi2html.1.in
+++ doc/texi2html.1.in 2005-01-27 15:17:29.000000000 +0100
@@ -1,4 +1,4 @@
-.TH TEXI2HTML 1 "@PACKAGE_DATE@"
+.TH Texi2html 1 "@PACKAGE_DATE@" 1.76
.AT 3
.SH NAME
texi2html \- a Texinfo to HTML converter

BIN
texi2html-5.0.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

BIN
texi2html-5.0.tar.bz2.sig Normal file

Binary file not shown.

198
texi2html-5584.patch Normal file
View File

@ -0,0 +1,198 @@
Author: pertusus
Date: Sun May 18 23:34:07 2014 UTC (8 months, 2 weeks ago)
Log Message:
Make tests reproducible.
---
T2h_l2h.pm | 5 +++--
TODO | 15 +++++++++++++++
test/coverage/tests.txt | 1 +
test/many_input_files/tex_l2h.sh | 7 ++++---
test/run_test_all.sh | 8 +++++---
texi2html.pl | 18 +++++++++++-------
6 files changed, 39 insertions(+), 15 deletions(-)
--- T2h_l2h.pm
+++ T2h_l2h.pm 2014-05-18 23:34:07.000000000 +0000
@@ -582,8 +582,9 @@ sub store_cache
main::document_error ("l2h: could not open $docu_rdir$l2h_cache_file for writing: $!");
return;
}
- while (($key, $value) = each %l2h_cache)
- {
+ #while (($key, $value) = each %l2h_cache)
+ foreach my $key(sort(keys(%l2h_cache))) {
+ $value = $l2h_cache{$key};
# escape stuff
$key =~ s|/|\\/|g;
$key =~ s|\\\\/|\\/|g;
--- TODO
+++ TODO 2015-02-05 12:28:22.893519431 +0000
@@ -1,3 +1,18 @@
+Regenerate tests:
+sh autogen.sh
+./configure
+make
+make check-local
+cd test
+./manage_test_archives.sh get
+cd ..
+tar xzvf t2h_tests_files.tar.gz
+cd test
+./base_tests
+./long_tests
+./tex_html_tests
+make copy-tests copy-tex-html
+
This file contains a list of things yet to be done (see also in doc/TODO):
Before next release
--- test/coverage/tests.txt
+++ test/coverage/tests.txt 2015-02-05 12:37:37.289522855 +0000
@@ -5,6 +5,7 @@ texi float.texi
texi imbrications.texi
texi formats_titles.texi
texi delcomment.texi
+# result is incorrect, in menu end of line is swallowed.
#texi line_commands_comment.texi
comments comments.texi
formatting formatting.texi --internal-links=@OUT_DIR@internal_links_formatting.txt
--- test/many_input_files/tex_l2h.sh
+++ test/many_input_files/tex_l2h.sh 2015-02-05 12:41:31.989519079 +0000
@@ -27,8 +27,8 @@ fi
[ -d $basename ] && rm -rf $basename
mkdir $basename
-echo "perl -w -x $srcdir/../../texi2html.pl -test -init l2h_tmp_dir.init -conf-dir $srcdir/../../examples -l2h -expand tex --out $basename/ $srcdir/../manuals/mini_ker.texi $srcdir/../formatting/tex.texi >> $stdout_file 2>$basename/${basename}.2" >> $logfile
-perl -w -x $srcdir/../../texi2html.pl -test -init l2h_tmp_dir.init -conf-dir $srcdir/../../examples -l2h -expand tex --out $basename/ $srcdir/../manuals/mini_ker.texi $srcdir/../formatting/tex.texi >> $stdout_file 2>$basename/${basename}.2
+echo "perl -w -x $srcdir/../../texi2html.pl -test -init l2h_tmp_dir.init --set-init-var 'TEST 1' --set-init-var 'L2H_CLEAN 0' --set-init-var 'L2H_TMP $tmp_dir' -conf-dir $srcdir/../../examples -l2h -expand tex --out $basename/ $srcdir/../manuals/mini_ker.texi $srcdir/../formatting/tex.texi >> $stdout_file 2>$basename/${basename}.2" >> $logfile
+perl -w -x $srcdir/../../texi2html.pl -test -init l2h_tmp_dir.init --set-init-var 'TEST 1' --set-init-var 'L2H_CLEAN 0' --set-init-var 'L2H_TMP $tmp_dir' -conf-dir $srcdir/../../examples -l2h -expand tex --out $basename/ $srcdir/../manuals/mini_ker.texi $srcdir/../formatting/tex.texi >> $stdout_file 2>$basename/${basename}.2
return_code=0
ret=$?
@@ -43,7 +43,8 @@ else
's/with LaTeX2HTML.*/with LaTeX2HTML/' "$basename/"*"_l2h.html"
sed -i -e 's/^# LaTeX2HTML.*/# LaTeX2HTML/' "$basename/"*"_l2h_images.pl" "$basename/"*"_l2h_labels.pl"
sed -i -e 's/WIDTH="\([0-9]*\)\([0-9]\)"/WIDTH="100"/' "$basename/"*"_l2h_images.pl" "$basename/"*.html "$basename/"*-l2h_cache.pm
- rm -f "$basename/"*".aux" "$basename/"*"_l2h_images.out"
+ # order of entries in *_l2h_images is not reproducible
+ rm -f "$basename/"*".aux" "$basename/"*"_l2h_images.out" "$basename/"*"_l2h_images.pl"
for dir in ${basename}; do
if [ -d $srcdir/${dir}_res ]; then
diff -u --exclude=CVS --exclude='*.png' -r "$srcdir/${dir}_res" "${dir}" 2>>$logfile > "$diffs_dir/$dir.diff"
--- test/run_test_all.sh
+++ test/run_test_all.sh 2015-02-05 12:40:53.738059178 +0000
@@ -223,10 +223,12 @@ do
mkdir "${outdir}$dir"
remaining_out_dir=`echo $remaining | sed 's,@OUT_DIR@,'"${outdir}$dir/"',g'`
echo "$command $dir" >> $logfile
- echo "perl -w -x $command_run $format_option --force --conf-dir $testdir/$srcdir_test/../../maintained_extra --conf-dir $testdir/$srcdir_test/../../examples --conf-dir $testdir/$srcdir_test/../../formats --conf-dir $testdir/$srcdir_test/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ --test --output ${outdir}$dir/ $remaining_out_dir $src_file > ${outdir}$dir/$basename.1 2>${outdir}$dir/$basename.2" >> $logfile
- eval "perl -w -x $command_run $format_option --force --conf-dir $testdir/$srcdir_test/../../maintained_extra --conf-dir $testdir/$srcdir_test/../../examples --conf-dir $testdir/$srcdir_test/../../formats --conf-dir $testdir/$srcdir_test/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ --test --output ${outdir}$dir/ $remaining_out_dir $src_file > ${outdir}$dir/$basename.1 2>${outdir}$dir/$basename.2"
+ echo "perl -w -x $command_run $format_option --force --conf-dir $testdir/$srcdir_test/../../maintained_extra --conf-dir $testdir/$srcdir_test/../../examples --conf-dir $testdir/$srcdir_test/../../formats --conf-dir $testdir/$srcdir_test/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ --set-init-var L2H_FILE=$testdir/$srcdir_test/../../examples/l2h.init --error-limit=1000 --set-init-var TEST=1 --set-init-var L2H_CLEAN=0 $l2h_tmp_dir --test --output ${outdir}$dir/ $remaining_out_dir $src_file > ${outdir}$dir/$basename.1 2>${outdir}$dir/$basename.2" >> $logfile
+ eval "perl -w -x $command_run $format_option --force --conf-dir $testdir/$srcdir_test/../../maintained_extra --conf-dir $testdir/$srcdir_test/../../examples --conf-dir $testdir/$srcdir_test/../../formats --conf-dir $testdir/$srcdir_test/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ --set-init-var L2H_FILE=$testdir/$srcdir_test/../../examples/l2h.init --error-limit=1000 --set-init-var TEST=1 --set-init-var L2H_CLEAN=0 $l2h_tmp_dir --test --output ${outdir}$dir/ $remaining_out_dir $src_file > ${outdir}$dir/$basename.1 2>${outdir}$dir/$basename.2"
ret=$?
- rm -f ${outdir}$dir/*_l2h_images.log ${outdir}$dir/*_tex4ht_*.log \
+ # *_l2h_images.pl has not reproducible cached entries
+ rm -f ${outdir}$dir/*_l2h_images.log ${outdir}$dir/*_l2h_images.pl \
+ ${outdir}$dir/*_tex4ht_*.log \
${outdir}$dir/*_tex4ht_*.idv ${outdir}$dir/*_tex4ht_*.dvi \
${outdir}$dir/*_tex4ht_tex.html* ${outdir}$dir/*_l2h.html.*
fi
--- texi2html.pl
+++ texi2html.pl 2015-02-05 12:43:54.114019286 +0000
@@ -4994,6 +4994,7 @@ my @all_elements; # sectioning
# in reading order. Each member is a reference
# on a hash which also appears in %nodes,
# @sections_list @nodes_list, @elements_list
+my @headings_list; # headings in reading order.
my @elements_list; # all the resulting elements in document order
my %sections; # sections hash. The key is the section number
my %headings; # headings hash. The key is the heading number
@@ -6374,7 +6375,7 @@ sub cross_manual_links()
my $style_kept = $Texi2HTML::Config::style;
$Texi2HTML::Config::style = \&Texi2HTML::Config::T2H_GPL_style;
- foreach my $key (keys(%nodes))
+ foreach my $key (sort(keys(%nodes)))
{
my $node = $nodes{$key};
#print STDERR "CROSS_MANUAL:$key,$node\n";
@@ -6710,7 +6711,7 @@ sub rearrange_elements()
# correct level if raisesections or lowersections overflowed
# and find toplevel level
# use %sections and %headings to modify also the headings
- foreach my $section (values(%sections), values(%headings))
+ foreach my $section (@sections_list, @headings_list)
{
my $level = $section->{'level'};
if ($level > $MAX_LEVEL)
@@ -6961,7 +6962,7 @@ sub rearrange_elements()
print STDERR "# Resolve nodes directions\n" if ($T2H_DEBUG & $DEBUG_ELEMENTS);
foreach my $node (@nodes_list)
{
- foreach my $direction (keys(%node_directions))
+ foreach my $direction (sort(keys(%node_directions)))
{
if (defined($node->{$direction}))
{
@@ -7005,7 +7006,7 @@ sub rearrange_elements()
# (have same node id) than an existing node
foreach my $node (@nodes_with_unknown_directions)
{
- foreach my $direction (keys(%node_directions))
+ foreach my $direction (sort(keys(%node_directions)))
{
if (defined($node->{$direction}) and !$node->{$node_directions{$direction}})
{
@@ -8200,7 +8201,7 @@ sub do_names()
# This seems right, however, as we don't want @refs or @footnotes
# or @anchors within nodes, section commands or anchors.
$global_pass = '2 node names';
- foreach my $node (keys(%nodes))
+ foreach my $node (sort(keys(%nodes)))
{
my $texi = &$Texi2HTML::Config::heading_texi($nodes{$node}->{'tag'},
$nodes{$node}->{'texi'}, undef);
@@ -9127,7 +9128,7 @@ sub finish_element($$$$)
# write to files with name the node name for cross manual references.
sub do_node_files()
{
- foreach my $key (keys(%nodes))
+ foreach my $key (sort(keys(%nodes)))
{
my $node = $nodes{$key};
next unless ($node->{'node_file'});
@@ -12039,6 +12040,7 @@ sub do_index_summary_file($$)
foreach my $letter_entries (@{$Texi2HTML::THISDOC{'index_letters_array'}->{$name}})
{
+ #print STDERR "$name: $letter_entries->{'letter'}\n";
foreach my $entry (@{$letter_entries->{'entries'}})
{
#my $entry = $entries->{$key};
@@ -13437,6 +13439,7 @@ sub scan_structure($$$$;$)
$state->{'heading_element'} = $heading_ref;
push @{$state->{'place'}}, $heading_ref;
$headings{$heading_ref->{'sec_num'}} = $heading_ref;
+ push @headings_list, $heading_ref;
}
add_prev ($text, $stack, "\@$macro" . $cline);
last;
@@ -16894,6 +16897,7 @@ while(@input_files)
# in reading order. Each member is a reference
# on a hash which also appears in %nodes,
# @sections_list @nodes_list, @elements_list
+ @headings_list = (); # headings in reading order.
@elements_list = (); # all the resulting elements in document order
%sections = (); # sections hash. The key is the section number
%headings = (); # headings hash. The key is the heading number
@@ -16997,7 +17001,7 @@ while(@input_files)
}
if ($Texi2HTML::Config::IDX_SUMMARY)
{
- foreach my $entry (keys(%index_names))
+ foreach my $entry (sort(keys(%index_names)))
{
do_index_summary_file($entry, $docu_name);
}

66
texi2html.changes Normal file
View File

@ -0,0 +1,66 @@
-------------------------------------------------------------------
Tue Sep 20 12:54:07 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Move http to https
- Add texi2html-5.0.tar.bz2.sig and texi2html.keyring
-------------------------------------------------------------------
Sat Oct 17 20:11:10 UTC 2020 - Dirk Stoecker <opensuse@dstoecker.de>
- Fix wrong perl provides for Unicode::EastAsianWidth
-------------------------------------------------------------------
Sat May 6 13:51:15 UTC 2017 - bwiedemann@suse.com
- Add 03_add_build-date_param.patch from Debian to allow overriding
build date of output html files
-------------------------------------------------------------------
Fri Feb 6 16:24:25 UTC 2015 - werner@suse.de
- Move %install_info_delete from %postun to %preun
-------------------------------------------------------------------
Thu Feb 5 19:59:39 UTC 2015 - dimstar@opensuse.org
- Maintain texi2html as full independent package: there is no need
to have it interlinked with texinfo.
- Add proper split provides to specify the split away from texinfo.
-------------------------------------------------------------------
Thu Feb 5 14:23:42 UTC 2015 - werner@suse.de
- Update texi2html to 5.0 (2010-06-27)
* The program may be called as makeinfo, with a handling of options
and defaults matching makeinfo.
It may also be called as texi2any, with makeinfo defaults and all
the texi2html command-line arguments that are not obsolete.
* new info and plaintext backends, ready for world domination!
Corresponding test results are added.
* main program handles --xml, --docbook, --info, --html and --plaintext.
* Handle @DH{}, @dh{}, @TH{}, @th{}, @headitemfont, @part and
@allowcodebreaks false
* Handle -o /dev/null (or NUL) like makeinfo.
* Read TEXINFO_OUTPUT_FORMAT in env to determine the output format.
* add 0x7F as a comment character.
* When called as texi2html, output the title page at the beginning.
* mediawiki backend completed.
* Translations of error messages available.
* Handling of @itemize and @table arguments are more in line with makeinfo.
* ignore @setfilename in @include'd files, as told in the texinfo manual.
* many warning messages added, especially for Info to match makeinfo.
* Still provide the default output with --macro-expand.
* Handle correctly @w in info and html.
* Much more ...
- Use the external packages perl-libintl-perl and perl-Text-Unidecode
instead of the otherwise included libintl-perl and perl-Text-Unidecode
- Add patch texi2html-5584.patch as backport of upstream submit #5584
to fix boo#916186
-------------------------------------------------------------------
Thu Aug 7 18:59:42 UTC 2014 - dmitry_r@opensuse.org
- Split from texinfo package
- Import:
* texi2html-1.78.dif
* config-guess-sub-update.patch

23
texi2html.keyring Normal file
View File

@ -0,0 +1,23 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGiBEBA6z0RBACP2cktoIlG7aBhpRtzzZbeefWeatEZx9dUEK60+jm6TMf+hixF
mxx3MBuPzZY+GFDZdNbYj3rumaPKR9lDtEoElnncuT5OI2rvwmjetezJRcjrH4XG
mTpjBQsYoodqGAR5eUtsA0AbxR6mGH9S1uNqrZyhP2V/Kp6Qe3/bM9wDMwCgwJ2I
3KMvs03TAAaJ9401c4d/+JsEAI5dyRYKEyaJd3tOiFJ8blP2bhlKmQPi8lXLaH7p
kQyOEZs+13O1fa4fuO73wOON3vCe/aoXo+MMMFc7NRxgIITIHzvPZ3EqVTi8WIzA
fx1l66IG+UkwsvysFm+kAxsLO8eG9Ey0fhCtPx7VRaoJcTseHt43pzzFBIkPQPJp
3qfFA/9e/9ZB3CpiRi+Y/asJjejDtNkQXQPjByyzyhOBn/n5AN0sjLsxAO3RU77C
7XGo69glgthPJ2608Jvv6+4BUAccXGt/Y6PIj7VtL2tQpgJ8cpCGUOSmQlGU+MWX
45dfFVcsIXBpnnVEv0ygKBf5fFCtGwZF5lO0byObb9SuPeo33bQrUGF0cmljZSBE
dW1hcyAoUGVydHVzdXMpIDxwZXJ0dXN1c0BmcmVlLmZyPoheBBMRAgAeBQJAQOs9
AhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEF7Cp3827MUjpqYAnir+XIwCi/Dx
prHX3mreaiitI2vEAJ4ivkMM7wfcEVRpktvwSN0H5vv+rLkBDQRAQOtEEAQAyeHs
bdqcsDrlxywJko7UqPwXz09QkHmynQnmG0vsHoo7O3s9CT6Qo6jLn749ji5jiwFa
s6KRO0Sc4DK5Kd3Q3qrjM2hUErI5TIq7Z2NFeoSGCJ+TwAywTBzmVKQUTG1ikG9p
kMMLis5dtN0UnH68ZuFc3WPqr0yWbZv+AOYNQQ8AAwUD/j7GmQR+wlxqdCq2IOPC
5H4avtHS9J+1OPkNYWMW4iMuxkjElF/r3L5zm7ZhIduCrW7V5kKOOBU8vf/rTjYj
OyelQ1IJ8X13KsS/unt6q08fl1h6D64RQS/hn5YGniTsaIrp0viAjGTGaQph5Eku
glrFLHlwY2YgHbtwxQGVFqiBiEkEGBECAAkFAkBA60QCGwwACgkQXsKnfzbsxSN6
1gCghgEd3gSNQ2pUq59EKDlOMQeDNRUAn05kpEMHQSbWtQJIUtAWQBm6j1eb
=jpkJ
-----END PGP PUBLIC KEY BLOCK-----

106
texi2html.spec Normal file
View File

@ -0,0 +1,106 @@
#
# spec file for package texi2html
#
# Copyright (c) 2022 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: texi2html
Version: 5.0
Release: 0
Summary: Tool for converting texinfo documents to HTML
License: GPL-2.0-or-later
Group: Productivity/Publishing/Texinfo
URL: https://www.nongnu.org/texi2html/
Source0: https://download.savannah.nongnu.org/releases/texi2html/texi2html-%{version}.tar.bz2
Source1: https://download.savannah.nongnu.org/releases/texi2html/texi2html-%{version}.tar.bz2.sig
Source3: texi2html.keyring
Patch1: texi2html-1.78.dif
Patch2: texi2html-5584.patch
Patch3: 03_add_build-date_param.patch
BuildRequires: perl
BuildRequires: perl-Text-Unidecode
BuildRequires: perl-gettext
BuildRequires: perl-libintl-perl
BuildRequires: perl(Unicode::EastAsianWidth)
Requires: perl-Text-Unidecode
Requires: perl-gettext
Requires: perl-libintl-perl
Requires: perl(Unicode::EastAsianWidth)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Conflicts: texinfo < 5.0
# Split provides: texi2html was part of texinfo until openSUSE 13.2
Provides: texinfo:/usr/bin/texi2html
%description
The basic purpose of texi2html is to convert Texinfo documents into HTML,
and other formats. Configuration files written in perl provide fine degree
of control over the final output, allowing most every aspect of the final
output not specified in the Texinfo input file to be specified.
%lang_package
%prep
%setup -q
%patch1
%patch2 -p0 -b .random
%patch3 -p1
# Avoid regenerated translations.pl as this becomes broken
mkdir i18n
touch i18n/en.thl
touch translations.pl
%build
LANG=POSIX
LC_ALL=POSIX
export LANG LC_ALL
%configure \
--enable-nls \
--with-encode \
--with-gnu-ld \
--with-unidecode \
--with-external-libintl-perl \
--with-external-Unicode-EastAsianWidth
make %{?_smp_mflags}
%install
%make_install
rm -rf %{buildroot}%{_datadir}/texinfo/
rm -rf %{buildroot}%{_datadir}/locale/*.us-ascii
rm -rf %{buildroot}%{_datadir}/%{name}/lib
%find_lang %name
%find_lang %{name}_document
%post
%install_info --info-dir=%{_infodir} %{_infodir}/texi2html.info.gz
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/texi2html.info.gz
%files
%defattr(-,root,root)
%doc COPYING NEWS README doc/texi2html.html
%{_bindir}/texi2html
%{_infodir}/texi2html.info.gz
%{_mandir}/man1/texi2html.1.gz
%{_datadir}/texi2html
%files lang -f %name.lang -f %{name}_document.lang
%defattr(-,root,root)
%changelog