changeset 17:6b8d10c36bff

Use the doclifter mercurial repository (until the next release, anyway) and fix up the symlinks to be relative instead of absolute with a python script.
author Rob Landley <rob@landley.net>
date Fri, 03 Aug 2007 20:12:51 -0500
parents 122cce2df439
children 31787234d021
files make/fixlinks.py make/mkxmlman.sh
diffstat 2 files changed, 37 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/fixlinks.py	Fri Aug 03 20:12:51 2007 -0500
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+import os, sys
+
+for i in sys.argv[1:]:
+  srcname = i.split("/")
+  linkname = os.readlink(i).split("/")[1:]
+  if srcname[1] == linkname[0] or srcname[1] == linkname [0][:-1]:
+    linkname = linkname[1:]
+  else:
+    linkname = [".."] + linkname
+  srcname = "/".join(srcname)
+  linkname = "/".join(linkname)
+  os.unlink(srcname)
+  os.symlink(linkname, srcname)
--- a/make/mkxmlman.sh	Thu Aug 02 22:40:29 2007 -0500
+++ b/make/mkxmlman.sh	Fri Aug 03 20:12:51 2007 -0500
@@ -1,26 +1,35 @@
-#!/bin/sh
+#!/bin/bash
+
+# Download the man-pages and doclifter source code.
 
 mkdir -p source
-[ -f source/man-pages-2.55.tar.gz ] ||
-  (cd source && wget ftp://ftp.win.tue.nl/pub/linux-local/manpages/man-pages-2.55.tar.gz)
-[ -f source/doclifter-2.3.tar.gz ] ||
-  (cd source && wget http://www.catb.org/~esr/doclifter/doclifter-2.3.tar.gz)
+[ -f source/man-pages-* ] ||
+(cd source && wget ftp://ftp.win.tue.nl/pub/linux-local/manpages/man-pages-2.63.tar.gz)
+[ -f source/doclifter-* ] ||
+  (cd source &&
+   wget http://thyrsus.com/hg/doclifter/archive/tip.tar.gz &&
+   mv tip.tar.gz doclifter-tip.tar.gz
+  )
 
-rm -rf mantemp
+# Build man-pages into "mantemp"
 
-rm -rf man-pages-* &&
+rm -rf mantemp man-pages-* &&
 tar xvzf source/man-pages-*.tar.gz &&
 cd man-pages-* &&
 make MANDIR=../mantemp allgz &&
 cd .. &&
 rm -rf man-pages-* &&
 
+# Run doclifter on the man pages.
+
 rm -rf doclifter-* &&
 tar xvzf source/doclifter-*.tar.gz &&
-cd doclifter-2.3 &&
-# Manlifter is buggy, we have to fix it up.
-chmod +w manlifter &&
-patch -p1 -i ../manlifter.patch &&
-mkdir prepatch &&
-# Run it
+cd doclifter-* &&
 ./manlifter -I `pwd`/../mantemp `cd ..;ls mantemp | sed -re 's/man([0-9]p?)/-s \1/g'` -h
+
+# Fix up symlinks
+../../fixlinks.py `find xmlman -type l`
+
+# Install result
+rm -rf ~/www/kdocs/xmlman
+mv xmlman ~/www/kdocs