1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 19_manpage_fixup.dpatch by Roland Rosenfeld <roland@debian.org>
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.
9 diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
10 --- privoxy~/GNUmakefile.in
11 +++ privoxy/GNUmakefile.in
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
22 # For those with man2html ala RH7s.
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\]/\á/g;s/\['e\]/\é/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.*