+# extra so links (via man-pages-extra)
+while read LINE ; do
+ if echo "$LINE" | grep -q '^#' ; then
+ continue
+ fi
+ set -- $LINE
+ install -d man-pages-extra/${1}/$(dirname $2)
+ if [ -f man-pages-extra/${1}/${2} ]; then
+ echo "man-pages-extra/${1}/${2} already exists!"
+ exit 1
+ fi
+ echo ".so $3" >>man-pages-extra/${1}/${2}
+ # special case for zh
+ if [ "$1" = "zh_CN" ]; then
+ zhmandir="src/zh/src/$(dirname "$2")"
+ makefile="$zhmandir/manpages"
+ if [ ! -f "$zhmandir/.init.mark" ]; then
+ # allow continuation in next line
+ %{__sed} -i -e 's/\(\.[1-8]\)$/\1 \\/' "$makefile"
+ touch "$zhmandir/.init.mark"
+ fi
+ printf " %s" "$(basename "$2")" >> "$makefile"
+ fi
+done < %{SOURCE50}
+