Add function to convert .so style manpage linking to symlinks
This commit is contained in:
parent
709fb7bc04
commit
584d7de232
@ -119,6 +119,8 @@ name=$topdir # as will this ditto
|
||||
pkgdirdesig=${topinstalldir##/*/} # topinstalldir suffix
|
||||
|
||||
# Functionality controls
|
||||
symlinkman=0 # Don't replace .so linking with symlinks pr. default
|
||||
symlinkman_verbose=0 # Be quiet
|
||||
catman=0 # Don't fix manpages pr. default
|
||||
gzman=0 # Don't gzip man pages pr. default
|
||||
compressman=0 # Don't compress(1) man pages pr. default
|
||||
@ -418,6 +420,40 @@ do_autonuke()
|
||||
fi
|
||||
}
|
||||
|
||||
# symlink_man(): Convert .so style references to symlinks
|
||||
# params: none
|
||||
# Run from 'cwd' where 'cwd' contains manX subdirs
|
||||
symlink_man()
|
||||
{
|
||||
local i
|
||||
local manpage
|
||||
local solink
|
||||
local linkdest
|
||||
local OIFS
|
||||
local manpages
|
||||
|
||||
echo "Symlinking manpages"
|
||||
for i in man?
|
||||
do
|
||||
if [ -d $i ]; then
|
||||
OIFS="$IFS"
|
||||
IFS="
|
||||
"
|
||||
manpages="$(echo $i/*)"
|
||||
for manpage in $manpages
|
||||
do
|
||||
solink="$($HEAD -1 $manpage)"
|
||||
if [ "${solink:0:3}" = ".so" ]; then # .so style link to be converted
|
||||
linkdest="${solink/#.so /}"
|
||||
[ "$symlinkman_verbose" -eq 1 ] && echo "Symlinking $linkdest->$manpage"
|
||||
$LN -sf "$linkdest" "$manpage"
|
||||
fi
|
||||
done
|
||||
IFS="$OIFS"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# fix_man(): create compressed pre-formatted manpages from raw ones
|
||||
# params: none
|
||||
# Run from 'cwd' where 'cwd' contains manX subdirs
|
||||
@ -809,3 +845,7 @@ generic_pack_perl()
|
||||
$CAT $metadir/pkgdef.template $srcdir/$topsrcdir/filelist | $SED -e "s;^$prefix/;;g" > $metadir/pkgdef
|
||||
generic_pack "$@"
|
||||
}
|
||||
|
||||
# vim: set filetype=sh : #
|
||||
# vim: set sts=4 : #
|
||||
# vim: set shiftwidth=4 : #
|
||||
|
@ -27,6 +27,7 @@ hidefile=$metadir/hide
|
||||
showfilescache=/tmp/sf.cache
|
||||
|
||||
# Preformat manpages since Irix is not likely to have nroff available
|
||||
symlinkman=1 # resolve .so links or formatting/compressing will fail
|
||||
catman=1
|
||||
|
||||
# Compress manpages
|
||||
@ -1172,6 +1173,7 @@ generic_pack()
|
||||
|
||||
if [ -d ${stagedir}${prefix}/${_mandir} ]; then
|
||||
setdir "${stagedir}${prefix}/${_mandir}"
|
||||
[ "$symlinkman" -eq 1 ] && symlink_man
|
||||
[ "$catman" -eq 1 ] && fix_man
|
||||
[ "$gzman" -eq 1 -o "$compressman" -eq 1 ] && compress_man
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user