merge Debian changes from 3.0.7 to 3.0.10
[privoxy.git] / debian / patches / 19_manpage_fixup.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 19_manpage_fixup.dpatch by Roland Rosenfeld <roland@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Convert Latin-1 char á to groff eqivalent in man page.
6 ## DP: Quote minus signs to differenciate them from hyphens.
7
8 @DPATCH@
9 diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
10 --- privoxy~/GNUmakefile.in
11 +++ privoxy/GNUmakefile.in
12 @@ -700,6 +700,11 @@
13         mkdir -p doc/source/temp && cd doc/source/temp && $(RM) * ;\
14         nsgmls ../privoxy-man-page.sgml  | sgmlspl ../../../utils/docbook2man/docbook2man-spec.pl &&\
15         perl -pi.bak -e 's/ <URL:.*>//; s/\[ /\[/g' privoxy.8 ;\
16 +       perl -pi.bak -e "s/\[ /\[/g;s/á/\\\\['a]/g;s/é/\\\\['e]/g" privoxy.8; \
17 +       perl -pi.bak -e "s/ö/\\\\[:o]/g" privoxy.8; \
18 +       perl -pi.bak -e 's/([ {])-([a-z])/$$1\\-$$2/g' privoxy.8; \
19 +       perl -pi.bak -e 's/ --([a-z])/ \\-\\-$$1/g' privoxy.8; \
20 +       perl -pi.bak -e 's/\\fB--/\\fB\\-\\-/g' privoxy.8; \
21         $(DB) ../privoxy-man-page.sgml && $(MV) -f privoxy.8 ../../../privoxy.8
22  
23  # For those with man2html ala RH7s.
24 @@ -712,6 +717,7 @@
25  # Twice because my version of man2html is pulling in commas and periods in URLs.
26         $(PERL) -pi.bak -e 's/(<A.*),(">)/$$1$$2/g' tmp.html
27         $(PERL) -pi.bak -e 's,\.">,">,g' tmp.html
28 +       $(PERL) -pi.bak -e "s/\['a\]/\&aacute;/g;s/\['e\]/\&eacute;/g" tmp.html
29  # Get rid of spurious \a from conversion. (How to do this with perl?)
30         $(SED) -e 's/\a//g' tmp.html > doc/webserver/man-page/privoxy-man-page.html && $(RM) tmp.*
31  else