merge Debian changes from 3.0.7 to 3.0.10
[privoxy.git] / debian / patches / 15_mansection8.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 15_mansection8.dpatch by Roland Rosenfeld <roland@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Move man page from man section 1 to man section 8.
6
7 @DPATCH@
8 diff -urNad privoxy~/GNUmakefile.in privoxy/GNUmakefile.in
9 --- privoxy~/GNUmakefile.in
10 +++ privoxy/GNUmakefile.in
11 @@ -177,7 +177,7 @@
12  DOC_FILES = AUTHORS LICENSE README ChangeLog INSTALL \
13                 `find doc/webserver/ -name "*.html" | grep -v "\(webserver\|team\)\/index\.html"` \
14                 `find doc/webserver/ -name "*.css"` \
15 -                privoxy.1
16 +                privoxy.8
17  
18  #############################################################################
19  # Filenames and libraries
20 @@ -514,7 +514,7 @@
21         $(RM) /etc/init.d/privoxy
22         $(RM) /usr/sbin/privoxy
23         $(RM) /usr/sbin/rcprivoxy
24 -       $(RM) /usr/share/man/man1/privoxy.1.gz
25 +       $(RM) /usr/share/man/man1/privoxy.8.gz
26  
27  #############################################################################
28  # generic distribution
29 @@ -687,7 +687,7 @@
30         $(RM) doc/man/* doc/webserver/man-page/*.html
31  ifneq ($(MAN2HTML),false)
32         $(ECHO) "<html><head><title>Privoxy Man page</title><link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\"></head><body><H2>NAME</H2>" > doc/webserver/man-page/privoxy-man-page.html
33 -       man ./privoxy.1 | $(MAN2HTML) -bare >> doc/webserver/man-page/privoxy-man-page.html
34 +       man ./privoxy.8 | $(MAN2HTML) -bare >> doc/webserver/man-page/privoxy-man-page.html
35         $(ECHO) "</body></html>" >> doc/webserver/man-page/privoxy-man-page.html
36  else
37         $(MAKE) groff2html
38 @@ -699,14 +699,14 @@
39  man: dok-release
40         mkdir -p doc/source/temp && cd doc/source/temp && $(RM) * ;\
41         nsgmls ../privoxy-man-page.sgml  | sgmlspl ../../../utils/docbook2man/docbook2man-spec.pl &&\
42 -       perl -pi.bak -e 's/ <URL:.*>//; s/\[ /\[/g' privoxy.1 ;\
43 -       $(DB) ../privoxy-man-page.sgml && $(MV) -f privoxy.1 ../../../privoxy.1
44 +       perl -pi.bak -e 's/ <URL:.*>//; s/\[ /\[/g' privoxy.8 ;\
45 +       $(DB) ../privoxy-man-page.sgml && $(MV) -f privoxy.8 ../../../privoxy.8
46  
47  # For those with man2html ala RH7s.
48  man2html:
49         mkdir -p doc/webserver/man-page
50  ifneq ($(MAN2HTML),false)
51 -       $(MAN2HTML) privoxy.1 |grep -v "^Content-type" > tmp.html
52 +       $(MAN2HTML) privoxy.8 |grep -v "^Content-type" > tmp.html
53         $(PERL) -pi.bak -e 's/<A .*Contents<\/A>//; s/<A .*man2html<\/A>/man2html/' tmp.html
54         $(PERL) -pi.bak -e 's/(<\/HEAD>)/<LINK REL=\"STYLESHEET\" TYPE=\"text\/css\" HREF=\"..\/p_doc.css\"><\/HEAD>/' tmp.html
55  # Twice because my version of man2html is pulling in commas and periods in URLs.
56 @@ -721,7 +721,7 @@
57  
58  # Otherwise we get plain groff conversion.
59  groff2html:
60 -       $(G2H_CMD) ./privoxy.1 | $(SED) -e 's@</head>@<link REL="STYLESHEET" TYPE="text/css" HREF="../p_doc.css"></head>@' > doc/webserver/man-page/privoxy-man-page.html
61 +       $(G2H_CMD) ./privoxy.8 | $(SED) -e 's@</head>@<link REL="STYLESHEET" TYPE="text/css" HREF="../p_doc.css"></head>@' > doc/webserver/man-page/privoxy-man-page.html
62  
63  
64  # readme page and INSTALL file
65 @@ -1071,8 +1071,8 @@
66                 $(INSTALL) $(INSTALL_T) $(DOK_WEB)/p_doc.css $(DESTDIR)$$DOC/user-manual;\
67         fi
68         @# Not all platforms support gzipped man pages.
69 -       @$(ECHO) Installing man page to $(DESTDIR)$(MAN_DEST)/privoxy.1
70 -       -$(INSTALL) $(INSTALL_T) privoxy.1  $(DESTDIR)$(MAN_DEST)/privoxy.1
71 +       @$(ECHO) Installing man page to $(DESTDIR)$(MAN_DEST)/privoxy.8
72 +       -$(INSTALL) $(INSTALL_T) privoxy.8  $(DESTDIR)$(MAN_DEST)/privoxy.8
73  
74         @# Change the config file default directories according to the configured ones
75         @$(ECHO) Rewriting config for this installation
76 @@ -1233,7 +1233,7 @@
77  
78         @# man page and docs
79         @$(ECHO) Removing $(PROGRAM) docs
80 -       -$(RM) $(DESTDIR)$(MAN_DEST)/privoxy.1*
81 +       -$(RM) $(DESTDIR)$(MAN_DEST)/privoxy.8*
82         -$(RM) -r $(DESTDIR)$(DOC_DEST) || $(RM) -r $(DESTDIR)$(prefix)/doc/privoxy
83  
84         @# Log and jarfile and pidfile
85 diff -urNad privoxy~/doc/source/privoxy-man-page.sgml privoxy/doc/source/privoxy-man-page.sgml
86 --- privoxy~/doc/source/privoxy-man-page.sgml
87 +++ privoxy/doc/source/privoxy-man-page.sgml
88 @@ -57,7 +57,7 @@
89  </refentryinfo>
90  <refmeta>
91   <refentrytitle>privoxy</refentrytitle> 
92 - <manvolnum>1</manvolnum>
93 + <manvolnum>8</manvolnum>
94   <refmiscinfo>
95    Privoxy &p-version;<![%p-not-stable;[ &p-status;]]>
96   </refmiscinfo>