Merge in Debian changes from Debian packages 3.0.5-beta-3 and 3.0.6-1.
[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 @@ -704,6 +704,10 @@
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/([ {])-([a-z])/$$1\\-$$2/g' privoxy.8; \
18 +       perl -pi.bak -e 's/ --([a-z])/ \\-\\-$$1/g' privoxy.8; \
19 +       perl -pi.bak -e 's/\\fB--/\\fB\\-\\-/g' privoxy.8; \
20         $(DB) ../privoxy-man-page.sgml && $(MV) -f privoxy.8 ../../../privoxy.8
21  
22  # For those with man2html ala RH7s.
23 @@ -716,6 +720,7 @@
24  # Twice because my version of man2html is pulling in commas and periods in URLs.
25         $(PERL) -pi.bak -e 's/(<A.*),(">)/$$1$$2/g' tmp.html
26         $(PERL) -pi.bak -e 's,\.">,">,g' tmp.html
27 +       $(PERL) -pi.bak -e "s/\['a\]/\&aacute;/g;s/\['e\]/\&eacute;/g" tmp.html
28  # Get rid of spurious \a from conversion. (How to do this with perl?)
29         $(SED) -e 's/\a//g' tmp.html > doc/webserver/man-page/privoxy-man-page.html && $(RM) tmp.*
30  else