1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_debianization.dpatch by <maxy@gnuservers.com.ar>
##
## DP: Debianization
@DPATCH@
diff -urNad tkman-2.2~/Makefile tkman-2.2/Makefile
--- tkman-2.2~/Makefile 2006-08-06 11:36:13.000000000 -0300
+++ tkman-2.2/Makefile 2006-08-06 11:39:36.000000000 -0300
@@ -14,6 +14,9 @@
#
+# Edited for Debian GNU/Linux.
+DESTDIR =
+
# required minimum versions of Tcl and Tk, for your information (don't modify these values)
# TkMan may work with a later version of Tcl/Tk, but Tcl/Tk does introduces
@@ -25,14 +28,11 @@
### you need to localize the paths on these lines
-WISH = /usr/local/bin/wish8.4
-#WISH = /usr/sww/tcl-8.4/bin/wish
-#WISH = /private/share/bin/wish8.4
+WISH = /usr/bin/wish
# the executable `tkman' is placed in BINDIR
# this should be a directory that's in your bin PATH
-BINDIR = /usr/local/bin
-#BINDIR = /private/share/bin
+BINDIR = $(DESTDIR)/usr/bin
# OPTIONAL FEATURES
@@ -43,20 +43,11 @@
# More information is given in manual.html
# if you don't have Texinfo files, leave this variable empty
texinfodir = ""
-#texinfodir = /home/orodruin/h/bair/phelps/spine/tkman/info
-#texinfodir = /usr/local/info
# In order to search within Texinfo files you need a grep, such as GNU grep 2.1,
# that can report byte offsets (with the -b switch). This needs to be
# gzgrep if you'll be searching in compressed Texinfo source.
-gzgrep = ""
-#gzgrep = "gzgrep -E"
-#gzgrep = "gzgrep -Ew"
# Linux calls it zgrep
-#gzgrep = "zgrep -E"
-# Cygwin calls it grep
-#gzgrep = grep
-# if you don't compress your Texinfo source, this is fine
-#gzgrep = grep
+gzgrep = "zgrep -E"
# OPTIONAL
# directory root of hierarchy of RFC files, with "rfc-index.txt" at the root
@@ -64,7 +55,6 @@
# If glimpse set as well, RFC .txt documents are indexed too.
# If this makes no sense to you, ignore it without a second thought.
rfcdir = ""
-#rfcdir = /usr/sww/doc/RFC
# OPTIONAL
@@ -80,16 +70,13 @@
# will examine for matches if a search in the usual locations fails while searching
# for a man pages and displaying its associated binaries (if any).
# Use this feature carefully as a large number of directories can slow down startup.
-mastermen = "/usr/man /usr/local/man"
-#mastermen = "/usr/man /usr/local/man /usr/sww/man /usr/share/man /usr/kerberos/man"
-masterbin = "/usr/bin /usr/local/bin"
-#masterbin = "/usr/bin /usr/local/bin /usr/sww/bin /usr/sww/share/bin /usr/sww/share/X11R5/bin"
+mastermen = ""
+masterbin = ""
# names of common printers, in addition to default printer (PRINTER or LPDEST)
# (individual users can edit this list in the Preferences panel)
printers = ""
-#printers = "lws483a kp"
# list of font dpi's generated in the X server (see xlsfonts(1))
@@ -113,7 +100,7 @@
# Lines are cached in .../man/cat<n>@<line-length>;
# that is, the line length is appended to the usual cache directory names
#manformat = {groff -te -Tascii -man /tmp/ll -}
-manformat = {groff -te -Tlatin1 -man /tmp/ll -}
+manformat = {groff -te -Tlatin1 -mandoc /tmp/ll -}
# Ultrix users should uncomment the following line (you don't have eqn)
#manformat = {tbl | nroff -man }
# HP-UX uses a number of macros that groff doesn't define, so use the builtin nroff
@@ -203,7 +190,7 @@
# BY DEFAULT OFF
glimpse = ""
# Glimpse on, with Boolean scope set to entire file
-glimpse = "glimpse -W"
+#glimpse = "glimpse -W"
# give the full path, if you'd like
#glimpse = /usr/sww/bin/glimpse
# variations (refer to the Glimpse manual page)
@@ -228,11 +215,11 @@
#glimpseindex = "glimpseindex -o -B"
# To shorten most index build times by incrementally building index when possible.
# For me, this drops indexing time from ~25 minutes to ~3 minutes, depending
-glimpseindex = "glimpseindex -o -B -f"
+#glimpseindex = "glimpseindex -o -B -f"
# -M 8 gives 8MB of main memory instead of default 2, which speeds up indexing, maybe
#glimpseindex = "glimpseindex -o -B -f -M 8"
# if you don't want give the power to index, disable glimpseindex here
-#glimpseindex = ""
+glimpseindex = ""
#glimpseindex = "/usr/sww/bin/glimpseindex -o -B"
# compressed manual pages are handled automatically; don't add -z to above
@@ -248,8 +235,8 @@
# to write in these directories, comment in "unified" below and the glimpsestrays
# directory given above (which should be writable) will hold a single index
# of all pages.
-indexglimpse = "distributed"
-#indexglimpse = "unified"
+#indexglimpse = "distributed"
+indexglimpse = "unified"
# additional directory subtrees to index,
# besides man page and Texinfo and RFC,
@@ -277,9 +264,8 @@
cksum = cksum
#cksum = md5sum
rcsdiff = rcsdiff
-vdiff = diff
# GNU diff can find a more minimal set of differences
-#vdiff = {gdiff -Bwd}
+vdiff = {gdiff -Bwd}
# do not use GNU's wdiff. I tried to use it to generate more precise
# change information, but it has a bug with (not) associating newlines with old text
@@ -289,9 +275,8 @@
rman = rman
#rman = /usr/local/bin/rman
-apropos = {man -k}
# Linux uses a shell script instead:
-#apropos = apropos
+apropos = apropos
# if don't have apropos (maybe on Windoze)
#apropos = ""
diff -urNad tkman-2.2~/manpath.tcl tkman-2.2/manpath.tcl
--- tkman-2.2~/manpath.tcl 2006-08-06 11:36:13.000000000 -0300
+++ tkman-2.2/manpath.tcl 2006-08-06 11:39:36.000000000 -0300
@@ -100,8 +100,16 @@
} elseif {![file readable $whatis]} {
# whatis set above
append manpatherr "$whatis not readable\n"
- } elseif {[file mtime $whatis]<$manx($root,latest)} {
- append manpatherr "$whatis out of date\n"
+ #
+ # Debian specific patch:
+ # Wait 2 days before announcing that $whatis is out of date.
+ # This enables man-db's cron scripts to run after a crash
+ # and is also useful for machines that are not always up.
+ #
+ } elseif {[file mtime $whatis] < \
+ [expr $manx($root,latest)-2*86400]} {
+ append manpatherr \
+ "$whatis out of date by more then 2 days.\n"
}
# now check for Glimpse files
diff -urNad tkman-2.2~/manualpage.tcl tkman-2.2/manualpage.tcl
--- tkman-2.2~/manualpage.tcl 2006-08-06 11:36:13.000000000 -0300
+++ tkman-2.2/manualpage.tcl 2006-08-06 11:39:36.000000000 -0300
@@ -341,9 +341,15 @@
# need an lsearch that can return all matches or at least search from a starting index
# lsearch about twice as fast as foreach, so quick pass with lsearch to see if any, then complete pass with foreach (skipping first $match)
- if {[info exists manc($subvar)] && [set match [lsearch -regexp $manc($subvar) $e]]!=-1} {
+ #
+ # Debian specific patch:
+ # As suggested by upstream, eliminating the pattern searching
+ # altogether by removing the match list from what are lines 344
+ # and 346 in the upstream source. Closes: bug#123881.
+ #
+ if {[info exists manc($subvar)]} {
# if at least one match, find them all
- foreach p [lrange $manc($subvar) $match end] {
+ foreach p $manc($subvar) {
if {[regexp $closee $p]} {
set f "$d/$p"
diff -urNad tkman-2.2~/tkmandesc.tcl tkman-2.2/tkmandesc.tcl
--- tkman-2.2~/tkmandesc.tcl 2006-08-06 11:36:13.000000000 -0300
+++ tkman-2.2/tkmandesc.tcl 2006-08-06 11:39:36.000000000 -0300
@@ -223,9 +223,27 @@
set mani(manList) $man(manList)
set mani(manTitleList) $man(manTitleList)
+ #
+ # Debian specific patch:
+ # The Debian policy forbids programms to be "dependant on
+ # environment variables to get reasonable defaults" (Section
+ # 3.9 of the Debian policy).
+ #
if {![info exists env(MANPATH)] || [string trim $env(MANPATH)] eq ""} {
- puts stderr "You must set a MANPATH environment variable,\nwhich is a colon-separated list of directories in which\nto find man pages, for example /usr/man:/usr/share/man.\n(See the help page for an explanation of why\nalternatives to the MANPATH are a bad thing.)"
- exit 1
+ set env(MANPATH) [exec /usr/bin/manpath]
+ # With the above setting of env(MANPATH) one can have empty
+ # directories from the /usr/local tree in env(MANPATH).
+ # This is troublesome.
+ set directories [split $env(MANPATH) :]
+ foreach dir $directories {
+ if {([string first "/usr/local/" $dir] != -1) && \
+ (![string equal [manPathCheckDir $dir] ""])} {
+ set env(MANPATH) [string replace $env(MANPATH) \
+ [string first $dir $env(MANPATH)] \
+ [expr [string first $dir $env(MANPATH)] + \
+ [string length $dir]]]
+ }
+ }
}
set manx(MANPATH0) $env(MANPATH)
|