--- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/manpages +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/manpages @@ -0,0 +1,2 @@ +debian/addition/gensgmlenv.1 +debian/addition/sgmlwhich.1 --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/postrm +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/postrm @@ -0,0 +1,21 @@ +#! /bin/sh +# postrm script for sgmltools-lite + +set -e + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if [ "$1" = "purge" ] + then + rm -f /etc/sgml/sgml.env + rm -f /etc/sgml/sgml.cenv + fi + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 0 + +esac + +exit 0 --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/rules +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/rules @@ -0,0 +1,148 @@ +#!/usr/bin/make -f +# This is converted from a sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +PKG=sgmltools-lite +PKGDIR=$(CURDIR)/debian/$(PKG) +PKGETCDIR=$(PKGDIR)/usr/share/$(PKG) +PKGDOCDIR=$(PKGDIR)/usr/share/doc/$(PKG) +PKGMANDIR=$(PKGDIR)/usr/share/man/$(PKG) +DBIMAGEDIR=usr/share/sgml/docbook/stylesheet/dsssl/modular/images/ + +configure: configure-stamp +configure-stamp: + sh debian/common/checkdir.sh + # Add here commands to configure the package. + cd src && ./configure --prefix=/usr --datadir=/usr/share \ + --mandir=/usr/share/man \ + --with-etcsgml="/usr/share/sgmltools-lite" \ + --with-dbimages="/$(DBIMAGEDIR)" \ + + touch configure-stamp + +build: build-arch build-indep +build-arch: configure-stamp build-stamp +build-indep: configure-stamp build-stamp + +build-stamp: + sh debian/common/checkdir.sh + + # Add here commands to compile the package. + cd src && $(MAKE) + + touch build-stamp + +clean: + sh debian/common/checkdir.sh + bash debian/common/checkroot.sh + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + -cd src && $(MAKE) clean + + sh debian/common/doclean.sh $(PKG) + +install: build + sh debian/common/checkdir.sh + bash debian/common/checkroot.sh + sh debian/common/doclean.sh $(PKG) + sh debian/common/installdirs.sh $(PKG) + + # Add here commands to install the package into debian/sgmltools-lite. + export DESTDIR=$(PKGDIR) && cd src && \ + ./configure --prefix="$$DESTDIR"/usr \ + --datadir="$$DESTDIR"/usr/share \ + --mandir="$$DESTDIR"/usr/share/man \ + --with-dbimages="/$(DBIMAGEDIR)" \ + --with-etcsgml=$(PKGETCDIR) && \ + $(MAKE) install DESTDIR=$$DESTDIR + +# remove extra dtd files + rm -rf $(PKGDIR)/usr/share/sgml/dtd + +# remove extra catalog files + rm -f $(PKGETCDIR)/catalog.rh71 + rm -f $(PKGETCDIR)/catalog.rh62 + rm -f $(PKGETCDIR)/catalog.suse + +# remove buildcat since Debian has sgml-base package + rm -rf $(PKGDIR)/usr/bin/buildcat + +# replace gensgmlenv with Debian specific one + cp debian/addition/gensgmlenv $(PKGDIR)/usr/bin/ + +# Debian does not need buildcat and we use modified +# gensgmlenv + rm -rf $(PKGETCDIR)/catalog.d + +# create symlink from system supercatalog to package config dir + ln -s /etc/sgml/catalog $(PKGETCDIR)/catalog + +# move stylesheet files + mkdir -p $(PKGDIR)/usr/share/sgml/stylesheet/dsssl/ + mv $(PKGDIR)/usr/share/sgml/stylesheets/sgmltools \ + $(PKGDIR)/usr/share/sgml/stylesheet/dsssl/ + rmdir $(PKGDIR)/usr/share/sgml/stylesheets + +# check installed files on package build path + find $(PKGDIR) -type f | xargs grep "$(PKGDIR)" + +# rewrite to eliminate package build path in scripts + export DESTDIR=$(PKGDIR) && for i in "$$DESTDIR"/usr/bin/* \ + "$$DESTDIR"/usr/share/sgml/stylesheet/dsssl/sgmltools/*.dsl; \ + do sed -e "s:$$DESTDIR::g" $$i >$$i.new; mv $$i.new $$i; done + +# again, check installed files on package build path + find $(PKGDIR) -type f | xargs grep "$(PKGDIR)" || true + +# add Debian specific manpages + cp debian/addition/*.1 $(PKGDIR)/usr/share/man/man1/ + +# rename the manpage of the main command + mv $(PKGDIR)/usr/share/man/man1/sgmltools-lite.1 \ + $(PKGDIR)/usr/share/man/man1/sgmltools.1 + +# add Debian specific jadewhich script + mkdir -p $(PKGDIR)/usr/share/sgmltools-lite/ + cp debian/addition/jadewhich $(PKGDIR)/usr/share/sgmltools-lite/ + chmod a+x $(PKGDIR)/usr/share/sgmltools-lite/jadewhich + +# rewrite main command to use jadewhich + sed -e "s:/usr/bin/.*jade:/usr/share/sgmltools-lite/jadewhich:" \ + $(PKGDIR)/usr/bin/sgmltools >$(PKGDIR)/usr/bin/sgmltools.new; + mv $(PKGDIR)/usr/bin/sgmltools.new $(PKGDIR)/usr/bin/sgmltools; + chmod a+x $(PKGDIR)/usr/bin/* +# + +# Build architecture-independent files here. +binary-indep: build install + sh debian/common/checkdir.sh + bash debian/common/checkroot.sh + sh debian/common/installdocs.sh $(PKG) + gzip -9 $(PKGDIR)/usr/share/man/man1/* + install -o 0 -g 0 -p -m 644 debian/changelog \ + $(PKGDOCDIR)/changelog.Debian + install -o 0 -g 0 -p -m 644 src/ChangeLog \ + $(PKGDOCDIR)/changelog + gzip -9 $(PKGDOCDIR)/changelog* + gzip -9 $(PKGDOCDIR)/README* + + find $(PKGDIR) -print0 2>/dev/null | \ + xargs -0r chown --no-dereference 0.0 + find $(PKGDIR) ! -type l -print0 2>/dev/null | \ + xargs -0r chmod go=rX,u+rw,a-s + find $(PKGDOCDIR) -type d -print0 2>/dev/null | \ + xargs -0r chmod 755 + find $(PKGMANDIR) -type f -print0 2>/dev/null | \ + xargs -0r chmod 644 + + sh debian/common/installmaintscript.sh $(PKG) + + dpkg-gencontrol -isp -P$(PKGDIR) + (cd $(PKGDIR) >/dev/null && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum >DEBIAN/md5sums) + if [ -z $(PKGDIR)/DEBIAN/md5sums ]; then rm -f $(PKGDIR)/DEBIAN/md5sums; else chmod 644 $(PKGDIR)/DEBIAN/md5sums; chown 0.0 $(PKGDIR)/DEBIAN/md5sums; fi + + dpkg --build $(PKGDIR) ../ + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/.mew.el +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/.mew.el @@ -0,0 +1,5 @@ +;; "Set mew for woody environment" + (setq mew-mailbox-type 'mbox) + (setq mew-mbox-command "inc") + (setq mew-mbox-command-arg "-truncate -file /var/mail/sano") + --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/dirs +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/dirs @@ -0,0 +1 @@ +usr/bin --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/README.Debian +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/README.Debian @@ -0,0 +1,7 @@ +sgmltools-lite for Debian +---------------------- + +This package is built from CVS sources checked out by + cvs -d:pserver:anonymous@cvs.sgmltools-lite.sourceforge.net:/cvsroot/sgmltools-lite checkout src + + -- Taketoshi Sano , Sun, 9 Sep 2001 20:44:06 +0900 --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/changelog +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/changelog @@ -0,0 +1,261 @@ +sgmltools-lite (3.0.3.0.cvs.20010909-17) unstable; urgency=low + + * QA upload. + - Mark sgmltools-lite Multi-Arch: foreign. + + -- Adam Conrad Mon, 16 Jul 2012 18:43:33 -0600 + +sgmltools-lite (3.0.3.0.cvs.20010909-16) unstable; urgency=low + + * QA upload. + * Remove postinst. It was used to execute a transitional call to + update-catalog: such a call is a noop since the new sgml-base version. + (Closes: #674914). Thanks, Helmut Grohne. + * build-{arch,indep} targets added. + * The package is architecture-independent: build files in binary-indep. + * Maintainer field set to QA Group. + * Standards-Version bumped to 3.9.3. + * FSF address updated in debian/copyright. + + -- Emanuele Rocca Fri, 15 Jun 2012 08:48:51 +0000 + +sgmltools-lite (3.0.3.0.cvs.20010909-15.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix bashism in jadewhich (Closes: #489659) + + -- Matthew Johnson Sun, 24 Aug 2008 13:58:00 +0000 + +sgmltools-lite (3.0.3.0.cvs.20010909-15) unstable; urgency=low + + * python/utils.py: correctly handles two or more successive asterisks + at the end or a single-quote in the file name given to Tracer.mv() + (since a single-quoted string can't contain a single quote in a shell, + Tracer.mv() now back-quotes every character in the file name instead of + calling shellProtect()) + + -- Oohara Yuuma Wed, 9 Jan 2008 06:10:44 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-14) unstable; urgency=low + + * python/utils.py: Handles the asterisk given to Tracer.mv() manually + so that it matches any number of characters. In a shell, 'foo'* should + mean "any file whose name begins with 'foo' (not foo)" --- glob occurs + before quote removal. (closes: #459051) + + -- Oohara Yuuma Tue, 8 Jan 2008 18:59:28 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-13) unstable; urgency=low + + * debian/rules: made sure that the argument of --with-dbimages + begins with / (I don't know why I call ./configure twice, + but it seems to work) (thanks to Adam DiCarlo for help) + (closes: #130504) + * debian/postinst, debian/prerm: no /usr/doc symlink + + -- Oohara Yuuma Wed, 30 Jul 2003 11:04:39 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-12) unstable; urgency=low + + * debian/control: added version condition to Depends: python because + sgmltools requires python 1.5 or later + * src/configure.in: added missing AC_SUBST + * src/configure: regenerated + + -- Oohara Yuuma Thu, 11 Apr 2002 04:04:14 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-11) unstable; urgency=low + + * src/configure.in: made sure that it does not check the absolute path + of programs (Debian follows the FHS, we know they are in /usr/bin) + (closes: #142156) + * src/configure: regenerated + * debian/control: no Build-Depends-Indep: now + * debian/.mew.el: removed because it has nothing to do with the package + + -- Oohara Yuuma Thu, 11 Apr 2002 00:33:27 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-10) unstable; urgency=low + + * debian/control: improved Description: (thanks Meinolf Sander + ) + * src/python/backends/Html.py: fixed a typo in a warning message + * src/bin/sgmltools.in: hardcoded the absolute path of jade, lynx + and w3m to reduce build dependency + * debian/control: dropped jade|openjade, lynx and w3m|w3mmee from + Build-Depends-Indep: (they are needed just to check their absolute path) + + -- Oohara Yuuma Sun, 31 Mar 2002 15:44:35 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-9) unstable; urgency=low + + * new maintainer + * src/python/backends/Html.py: issues a warning if the output directory + is empty + + -- Oohara Yuuma Mon, 25 Feb 2002 11:28:16 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-8) unstable; urgency=low + + * Merge the work done by Oohara Yuuma. Thanks to him. + + -- Taketoshi Sano Mon, 18 Feb 2002 21:52:30 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-7.1) unstable; urgency=low + + * NMU + * src/python/SGMLtools.py: assumes -b onehtml if -b html and + -j '-V nochunks' are specified (closes: #72887) + * src/python/SGMLtools.py: added /etc/sgml/catalog to the search path + for a SGML super catalog (closes: #131620) + * debian/addition/jadewhich: replaced $* with "$@" (closes: #132250) + + -- Oohara Yuuma Fri, 15 Feb 2002 13:49:59 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-7) unstable; urgency=low + + * remove python-base from Build-Depends and Depends. + I don't know if the upgrade from potato can be done + safely, but the bug reporter must have been certain. + (Closes: #124019) + + -- Taketoshi Sano Sat, 29 Dec 2001 23:58:33 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-6) unstable; urgency=low + + * Applied patch from "Martin Schwenke" . + Thanks to him for providing a patch, as well as pointing + out this problem. (Closes: #118567) + + -- Taketoshi Sano Wed, 14 Nov 2001 12:20:48 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-5) unstable; urgency=low + + * update to keep up with the python packaging reorganization. + As far as I checked, this can work with 2.2 as well as 1.5 and 2.1 + of python. So just symply added python to Depends: line. + (Closes: #118129) + + -- Taketoshi Sano Mon, 5 Nov 2001 22:01:05 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-4) unstable; urgency=low + + * update the modified part (ugly hack) by me in SGMLtools.py + to use the temporary input file in place of the input pipe. + openjade can't handle input from stdin correctly. + (Closes: #116775) + + -- Taketoshi Sano Fri, 26 Oct 2001 19:29:59 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-3) unstable; urgency=low + + * move the call of update-catalog command from preinst + to postinst to fix the "could not install" bug. + (Closes: #115471) + + -- Taketoshi Sano Tue, 16 Oct 2001 20:13:04 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-2) unstable; urgency=low + + * converted not to depend debhelper (Closes: #113778) + * Add more note into package description to inform users + that this tool just convert DocBook SGML into HTML only + without other recommended and suggested packages. + This change is related to the wishlist #112796 + + -- Taketoshi Sano Thu, 4 Oct 2001 00:23:42 +0900 + +sgmltools-lite (3.0.3.0.cvs.20010909-1) unstable; urgency=low + + * Change configuration for the migration to FHS (/usr/share/sgml) + (Closes: #104145) + * Depends on docbook-dsssl (>= 1.71-1). (Closes: #103668) + * Preinst calls update-catalog to remove old sgmltools-2 catalog + (Closes: #104144) + * Openjade can't work when input file is provided via pipe. + This is the cause of trouble. Temporary fix is applied by me + using a dirty quick hack, but the correct one may be needed for + the upstream. Are there anyone who can privide it ? + (Closes: #109813) + * Add note into package description to inform users that this + tool can not handle DocBook XML. (Closes: #111895) + * w3m/w3mmee has already Recommends line. I think this should + be enough. (Closes: #112796) + + -- Taketoshi Sano Sun, 25 Sep 2001 01:04:32 +0900 + +sgmltools-lite (3.0.2.3.cvs0-8) unstable; urgency=low + + * add docbook-dsssl to dependencies. Thanks to Adam for + his notification. (Closes #103668) + + -- Taketoshi Sano Fri, 6 Jul 2001 22:49:05 +0900 + +sgmltools-lite (3.0.2.3.cvs0-7) unstable; urgency=low + + * add w3mmee in suggests. (Closes: #98392) + + -- Taketoshi Sano Fri, 25 May 2001 02:27:54 +0900 + +sgmltools-lite (3.0.2.3.cvs0-6) unstable; urgency=low + + * revert to use Suggests for jadetex, lynx, and linuxdoc-tools. + w3m is the default for txt backend, and is recommended now. + (Closes: #92161, #92212) + modification to produce some informational messages when + the absent backend is requested, will take longer time. + If you have nice idea, please let me know. + * update the manpage for sgmltools.1 (Closes: #90231) + + -- Taketoshi Sano Tue, 24 Apr 2001 23:33:03 +0900 + +sgmltools-lite (3.0.2.3.cvs0-5) unstable; urgency=low + + * add python-base to build-depends (Closes: #90229) + * There are many users who likes to make this tool depend + other backend-related packages. So let's try to do it, + and see if there are requests against this change. + (Closes: #88607, #75530) This is requested also in #91981. + * fix debian/rules to set admon_graphics_path correctly. + This problem is reported in #91981. + * fix src/python/backends/Ld2db.py to update for recent + transition of Debian system-wide sgml catalog configuration. + (Closes: #91981) + + -- Taketoshi Sano Thu, 29 Mar 2001 16:39:57 +0900 + +sgmltools-lite (3.0.2.3.cvs0-4) unstable; urgency=low + + * Remove update-catalog from postinst/prerm since it is not needed now. + + -- Taketoshi Sano Wed, 28 Mar 2001 21:25:49 +0900 + +sgmltools-lite (3.0.2.3.cvs0-3) unstable; urgency=low + + * Added "provides: sgmltools-2" + * update package description to note the requirement + for text output. + + -- Taketoshi Sano Tue, 6 Mar 2001 13:26:44 +0900 + +sgmltools-lite (3.0.2.3.cvs0-2) unstable; urgency=low + + * change "Conflict: sgmltools-2 (<=2.0.2-4)" to provide + a dummy package of sgmltools-2 for smooth upgrade. + * remove a cruft (buildcat.1.remove.gz) from binary pacakge. + * add lynx to builddepends. + * add lynx to suggests. + + -- Taketoshi Sano Mon, 5 Mar 2001 11:41:32 +0900 + +sgmltools-lite (3.0.2.3.cvs0-1) unstable; urgency=low + + * Initial Release. + * This is the upstream successor of SGML-Tools version 2, so this + packages conflicts/replaces the Debian package of sgmltools-2. + + -- Taketoshi Sano Fri, 2 Mar 2001 15:09:24 +0900 + +Local variables: +mode: debian-changelog +End: --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/docs +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/docs @@ -0,0 +1 @@ +src/README --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/README.Debian.dummies +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/README.Debian.dummies @@ -0,0 +1,7 @@ +sgmltools-lite for Debian +---------------------- + +This package is built from CVS sources checked out by + cvs -d:pserver:anonymous@cvs.sgmltools-lite.sourceforge.net:/cvsroot/sgmltools-lite checkout src + + -- Taketoshi Sano , Sun, 9 Sep 2001 20:44:06 +0900 --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/preinst +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/preinst @@ -0,0 +1,24 @@ +#! /bin/sh +# preinst script for sgmltools-lite + +set -e + +case "$1" in + install|upgrade) + + # remove runtime compiled files in old FSSTND dir + find /usr/lib/sgml/misc/sgmltools -name '*.pyc' 2>/dev/null|xargs rm -f + + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +exit 0 + --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/prerm +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/prerm @@ -0,0 +1,25 @@ +#! /bin/sh +# prerm script for sgmltools-lite + +set -e + +PACKAGE=sgmltools-lite +#CENTRALCAT=/etc/sgml/${PACKAGE}.cat + +case "$1" in + remove|upgrade|deconfigure) + + # remove runtime compiled files + find /usr/share/sgml/misc/sgmltools -name '*.pyc' 2>/dev/null|xargs rm -f + + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +exit 0 + --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/copyright +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/copyright @@ -0,0 +1,46 @@ +This package was debianized by Taketoshi Sano on +Sun, 24 Dec 2000 22:27:39 +0900. + +It was downloaded via CVS as the module src in /cvsroot/sgmltools-lite +on the host cvs.sgmltools.lite.sourceforge.net using anonymous pserver +access. + +The cvs commands used are: + +cvs -d:pserver:\ +anonymous@cvs.sgmltools-lite.sourceforge.net:\ +cvsroot/sgmltools-lite login +cvs -z3 -d:pserver:\ +anonymous@cvs.sgmltools-lite.sourceforge.net:\ +cvsroot/sgmltools-lite checkout src + +Upstream Authors: Cees A. de Groot + Marc AndrSelig + David Nedrow + and others + +Copyright: + + SGMLtools, an SGML toolbox + Copyright (C) 1998, Cees A. de Groot + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + + +All Debian changes are put under the GPL, v2 or better. + +You can read the verbatim text of the GPL in + /usr/share/common-licenses/GPL on the standard Debian system. + --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/control +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/control @@ -0,0 +1,43 @@ +Source: sgmltools-lite +Section: text +Priority: optional +Maintainer: Debian QA Group +Standards-Version: 3.9.3 + +Package: sgmltools-lite +Architecture: all +Multi-Arch: foreign +Depends: sgml-base (>= 1.10), docbook (>= 4.1-1), docbook-dsssl (>= 1.71-1), python (>= 1.5), jade|openjade +Recommends: w3m|w3mmee +Suggests: jadetex, lynx, linuxdoc-tools +Conflicts: sgmltools-2 (<= 2.0.2-4) +Replaces: sgmltools-2 +Provides: sgmltools-2 +Description: convert DocBook SGML source into HTML using DSSSL + A text-formatting package based on SGML (Standard Generalized Markup + Language), which allows you to produce TeX/DVI/PS/PDF, HTML, RTF, and + plain ASCII (currently via w3m by default) from a single source with + other recommended and suggested packages; due to the flexible nature + of SGML, many other target formats are possible. + . + This tool can not handle DocBook XML yet. For DocBook SGML only. + . + HTML can be generated without any other Debian text processing package, + but for the other formats the appropriate packages have to be installed. + You need to install lynx or w3m for ASCII text output (w3m is the default + txt backend). Also jadetex is required for PS and PDF, and + linuxdoc-tools for ld2db conversion. + . + This system is tailored for writing technical software documentation, + an example of which are the Linux HOWTO documents. However, there is + nothing Linux-specific about this package; it can be used for many + other types of documentation on many other systems. It should be + useful for all kinds of printed and online documentation. + . + The package was formerly called linuxdoc-sgml because it originates + from the Linux Documentation Project (LDP). The name has been changed + into sgmltools to make it clearer that there is no Linux-specific + stuff included in this package. + . + This is the latest version of the sgmltools series and the successor of + sgmltools v2. --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/common/installdocs.sh +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/common/installdocs.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +set -e + +if [ -z "$1" ] + then + echo "please specify the build directory to install docs" + exit 1 +fi + +DOCDIR=debian/"$1"/usr/share/doc/"$1" +if [ ! -d "$DOCDIR" -a ! -L "$DOCDIR" ] + then + install -g 0 -o 0 -d "$DOCDIR" +fi + +for i in README.Debian copyright + do + if [ -f debian/"$i" ] + then + install -g 0 -o 0 -m 644 -p debian/"$i" "$DOCDIR"/"$i"; + fi + done + +if [ -f debian/docs ] + then + cat debian/docs | while read line + do + cp -a $line $DOCDIR + done + + chown -R 0.0 $DOCDIR + chmod -R go=rX $DOCDIR + chmod -R u+rw $DOCDIR +fi + --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/common/installdirs.sh +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/common/installdirs.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +if [ -z "$1" ] + then + echo "please specify the build directory to create" + exit 1 +fi + +install -d debian/$1 + +if [ -f debian/dirs ] + then + cat debian/dirs | while read line + do + install -d debian/"$1"/"$line" + done +fi --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/common/checkroot.sh +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/common/checkroot.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$UID" != 0 ]; + then + echo "root priviledge is required. Please use fakeroot or something"; + exit 1 +fi --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/common/checkdir.sh +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/common/checkdir.sh @@ -0,0 +1,6 @@ +#!/bin/sh +if [ ! -f debian/control ]; + then + echo "\"debian/control\" not found. Please check where you are. aborted"; + exit 1; +fi --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/common/doclean.sh +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/common/doclean.sh @@ -0,0 +1,10 @@ +#!/bin/sh +if [ -z "$1" ] + then + echo "please specify the build directory to clean up" + exit 1 +fi +rm -rf debian/$1/ + +rm -f debian/files + --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/common/installmaintscript.sh +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/common/installmaintscript.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +if [ -z "$1" ] + then + echo "please specify the build directory to install maintainer script" + exit 1 +fi + +MAINTDIR=debian/"$1"/DEBIAN +if [ ! -d "$MAINTDIR" ] + then + install -g 0 -o 0 -d "$MAINTDIR" +fi + +for i in preinst postinst prerm postrm + do + if [ -f debian/"$i" ] + then + install -g 0 -o 0 -m 755 -p debian/"$i" "$MAINTDIR"/"$i"; + fi + done + +for i in conffiles shlibs + do + if [ -f debian/"$i" ] + then + install -g 0 -o 0 -m 644 -p debian/"$i" "$MAINTDIR"/"$i"; + fi + done + --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/addition/sgmlwhich.1 +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/addition/sgmlwhich.1 @@ -0,0 +1,22 @@ +.TH SGMLWHICH 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +sgmlwhich \- outputs system SGML catalog path +.SH SYNOPSIS +.B sgmlwhich +.SH DESCRIPTION +This program just outputs system SGML catalog path. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.SH OPTIONS +This program does not accept any option. +.SH SEE ALSO +You may know very well what this script does when you see the code. +.SH AUTHOR +.B sgmlwhich +is a command in +.I SGMLtools-Lite +written by Cees A. de Groot. +This manual page was written by Taketoshi Sano , +for the Debian GNU/Linux system (but may be used by others). --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/addition/gensgmlenv.1 +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/addition/gensgmlenv.1 @@ -0,0 +1,24 @@ +.TH GENSGMLENV 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +gensgmlenv \- Generate /etc/sgml/sgml.env and /etc/sgml/sgml.cenv +.SH SYNOPSIS +.B gensgmlenv +.SH DESCRIPTION +The subroutine gensgmlenv generates a file /etc/sgml.env that contains +the bourne shell command that sets SGML_CATALOG_FILES. It is meant to be +included in SGML-processing scripts and/or in /etc/profile. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.SH OPTIONS +This programs does not accept any option. +.SH SEE ALSO +This script is briefly documented in its code. +.SH AUTHOR +.B gensgmlenv +is a command in +.I SGMLtools-Lite +written by Cees A. de Groot. +This manual page was written by Taketoshi Sano , +for the Debian GNU/Linux system (but may be used by others). --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/addition/jadewhich +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/addition/jadewhich @@ -0,0 +1,4 @@ +#! /bin/sh +if [ -x /usr/bin/jade ]; then exec /usr/bin/jade "$@"; fi +if [ -x /usr/bin/openjade ]; then exec /usr/bin/openjade "$@"; fi +echo "None of openjade/jade available. "; echo; exit 1; --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/addition/buildcat.1.remove +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/addition/buildcat.1.remove @@ -0,0 +1,29 @@ +.TH BUILDCAT 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +buildcat \- build a shared SGML catalog file. +.SH SYNOPSIS +.B buildcat +.I ">/etc/sgml/catalog" +.SH DESCRIPTION +The program +.B buildcat +builds a shared catalog file from +the symlinks encountered in /etc/sgml/catalog.d. In order to +keep the meaning of the individual catalogs the same, relative +system identifiers in the catalogs are expanded to their absolute +equivalents. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.SH OPTIONS +This program does not accept any option. +.SH SEE ALSO +This script is documented briefly in its code. +.SH AUTHOR +.B buildcat +is a command in +.I SGMLtools-Lite +written by Cees A. de Groot. +This manual page was written by Taketoshi Sano , +for the Debian GNU/Linux system (but may be used by others). --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/debian/addition/gensgmlenv +++ sgmltools-lite-3.0.3.0.cvs.20010909/debian/addition/gensgmlenv @@ -0,0 +1,116 @@ +#!/usr/bin/python +# +# gensgmlenv.in +# +# $Id: gensgmlenv.in,v 1.2 2000/04/26 17:06:01 cdegroot Exp $ +# +# Generate /etc/sgml/sgml.env, containing definition for SGML_CATALOG_FILES +# +# SGMLtools - an SGML toolkit. +# Copyright (C) 1999 Cees A. de Groot +# +# modified for Debian usage: taketoshi sano +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + +""" +head1 NAME + + gensgmlenv - Generate /etc/sgml/sgml.env (and sgml.cenv) + +SYNOPSIS + + gensgmlenv + +DESCRIPTION + + The subroutine gensgmlenv generates a file /etc/sgml/sgml.env that contains + the bourne shell command that sets SGML_CATALOG_FILES. It is meant to be + included in SGML-processing scripts and/or in /etc/profile. + +EXCEPTIONS + + There are some exceptions which can be thrown by this module. They + are: + + Error: Base error. If that module throws an exception, and you don't + want to catch every specific one, catching of Error would be enough. + + NoCatalogError: There was no catalog files found. + + ReadLinkError: There was an error occured during trial of getting + the real name of the file pointed by a symbolic link. + + WriteScriptError: Could not write the configuration script. The type + of the shell will be thrown within the detail attribute. + +""" + +import glob, os, re, string + + +class Error(Exception): + pass + +class NoCatalogError(Error): + pass + +class ReadLinkError(Error): + pass + +class WriteScriptError(Error): + pass + +_subdot = re.compile("\.\.\/\.\.\/\.\.").sub +_subslash = re.compile("\/\/").sub + + +def gensgmlenv(): + catfiles = [] +# for link in glob.glob("/etc/sgml/catalog.d/*"): +# try: +# file = os.readlink(link) +# except os.error: +# raise ReadLinkError, file +# file = _subdot("", file, 1) +# file = _subslash("/", file) +# catfiles.append(file) +# if not catfiles: +# raise NoCatalogError +# files = string.join(catfiles, ":") +# +# Debian uses /etc/sgml/catalog for system SGML catalog +# file and it is maintained by update-catalog in sgml-base. + files = "/etc/sgml/catalog" + try: + sgmlenv = open("/etc/sgml/sgml.env", "w") + sgmlenv.write("SGML_CATALOG_FILES=%s\n" + "export SGML_CATALOG_FILES\n" % files) + sgmlenv.close() + except IOError: + raise WriteScriptError, "writing sh version" + try: + sgmlenv = open("/etc/sgml/sgml.cenv", "w") + sgmlenv.write("setenv SGML_CATALOG_FILES %s\n" % files) + sgmlenv.close() + except IOError: + raise WriteScriptError, "writing csh version" + + +if __name__ == "__main__": + # testcode + gensgmlenv() --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/src/configure.in +++ sgmltools-lite-3.0.3.0.cvs.20010909/src/configure.in @@ -26,37 +26,27 @@ AC_PROG_INSTALL +dnl Debian follows the FHS, so no need for AC_PATH_PROG just to replace @foo@s AC_SUBST(JADE) -AC_PATH_PROG(oldjade, jade, N/A) -AC_PATH_PROG(openjade, openjade, N/A) -if test "$openjade" != "N/A"; then - JADE=$openjade -elif test "$oldjade" != "N/A"; then - JADE=$oldjade -else - AC_MSG_ERROR(You don't have Jade or OpenJade installed) - exit 1 -fi -AC_MSG_RESULT(Using $JADE as DSSSL engine) - -AC_PATH_PROG(LYNX, lynx, N/A) -AC_PATH_PROG(W3M, w3m, N/A) -dnl Fixme - this is Linux-dependent -AC_PATH_PROG(ISILO, iSilo386, N/A) +dnl this will be substituted later in debian/rules +JADE=/usr/bin/jade -AC_PATH_PROG(PYTHON, python) +LYNX=/usr/bin/lynx +W3M=/usr/bin/w3m +ISILO=N/A +AC_SUBST(LYNX) +AC_SUBST(W3M) +AC_SUBST(ISILO) + +PYTHON=/usr/bin/python AC_SUBST(PYTHON) -if echo 'import sys -if sys.version < "1.5": raise SystemExit, 1' | $PYTHON -then - : # Solaris and OSF/1 /bin/sh don't know about negation operators... -else - AC_MSG_ERROR(You don't have Python 1.5 or better...) - exit 1 -fi +dnl we need python 1.5 or later, but don't check the version of python here +dnl Depends: in debian/control is the Debian way + dnl Because AC_CHECK_FILE checks for CC... -AC_PROG_CC +dnl Debian doesn't use AC_CHECK_FILE because it is for SuSE +dnl AC_PROG_CC etcsgml=/etc/sgml AC_ARG_WITH(etcsgml, @@ -65,10 +55,7 @@ AC_SUBST(etcsgml) dnl AC_MSG_CHECKING(DocBook Images) -AC_CHECK_FILE(/usr/share/sgml/docbkdsl/images, - dnl SuSE Linux - dbimages=/usr/share/sgml/docbkdsl/images/, - [test "$datadir" = '${prefix}/share' && dbimages=$ac_default_prefix/share/sgml/stylesheets/docbook/images/]) +dbimages=/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/ AC_ARG_WITH(dbimages, [ --with-dbimages=DIR use DIR instead of DATADIR/sgml/stylesheets/docbook/images/], dbimages=$withval) --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/src/configure +++ sgmltools-lite-3.0.3.0.cvs.20010909/src/configure @@ -611,463 +611,18 @@ -# Extract the first word of "jade", so it can be a program name with args. -set dummy jade; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:618: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_oldjade'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$oldjade" in - /*) - ac_cv_path_oldjade="$oldjade" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_oldjade="$oldjade" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_oldjade="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_oldjade" && ac_cv_path_oldjade="N/A" - ;; -esac -fi -oldjade="$ac_cv_path_oldjade" -if test -n "$oldjade"; then - echo "$ac_t""$oldjade" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "openjade", so it can be a program name with args. -set dummy openjade; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:654: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_openjade'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$openjade" in - /*) - ac_cv_path_openjade="$openjade" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_openjade="$openjade" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_openjade="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_openjade" && ac_cv_path_openjade="N/A" - ;; -esac -fi -openjade="$ac_cv_path_openjade" -if test -n "$openjade"; then - echo "$ac_t""$openjade" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test "$openjade" != "N/A"; then - JADE=$openjade -elif test "$oldjade" != "N/A"; then - JADE=$oldjade -else - { echo "configure: error: You don't have Jade or OpenJade installed" 1>&2; exit 1; } - exit 1 -fi -echo "$ac_t""Using $JADE as DSSSL engine" 1>&6 - -# Extract the first word of "lynx", so it can be a program name with args. -set dummy lynx; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:700: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_LYNX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$LYNX" in - /*) - ac_cv_path_LYNX="$LYNX" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_LYNX="$LYNX" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_LYNX="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_LYNX" && ac_cv_path_LYNX="N/A" - ;; -esac -fi -LYNX="$ac_cv_path_LYNX" -if test -n "$LYNX"; then - echo "$ac_t""$LYNX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "w3m", so it can be a program name with args. -set dummy w3m; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:736: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_W3M'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$W3M" in - /*) - ac_cv_path_W3M="$W3M" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_W3M="$W3M" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_W3M="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_W3M" && ac_cv_path_W3M="N/A" - ;; -esac -fi -W3M="$ac_cv_path_W3M" -if test -n "$W3M"; then - echo "$ac_t""$W3M" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -# Extract the first word of "iSilo386", so it can be a program name with args. -set dummy iSilo386; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:772: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_ISILO'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$ISILO" in - /*) - ac_cv_path_ISILO="$ISILO" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_ISILO="$ISILO" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_ISILO="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_ISILO" && ac_cv_path_ISILO="N/A" - ;; -esac -fi -ISILO="$ac_cv_path_ISILO" -if test -n "$ISILO"; then - echo "$ac_t""$ISILO" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -# Extract the first word of "python", so it can be a program name with args. -set dummy python; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:809: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$PYTHON" in - /*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PYTHON="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -PYTHON="$ac_cv_path_PYTHON" -if test -n "$PYTHON"; then - echo "$ac_t""$PYTHON" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -if echo 'import sys -if sys.version < "1.5": raise SystemExit, 1' | $PYTHON -then - : # Solaris and OSF/1 /bin/sh don't know about negation operators... -else - { echo "configure: error: You don't have Python 1.5 or better..." 1>&2; exit 1; } - exit 1 -fi - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:854: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:884: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:935: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +JADE=/usr/bin/jade -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +LYNX=/usr/bin/lynx +W3M=/usr/bin/w3m +ISILO=N/A -cat > conftest.$ac_ext << EOF - -#line 978 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1009: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1014: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1042: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* +PYTHON=/usr/bin/python -fi -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi etcsgml=/etc/sgml @@ -1079,31 +634,7 @@ - -ac_safe=`echo "/usr/share/sgml/docbkdsl/images" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for /usr/share/sgml/docbkdsl/images""... $ac_c" 1>&6 -echo "configure:1086: checking for /usr/share/sgml/docbkdsl/images" >&5 -if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } -else - if test -r /usr/share/sgml/docbkdsl/images; then - eval "ac_cv_file_$ac_safe=yes" - else - eval "ac_cv_file_$ac_safe=no" - fi -fi -fi -if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - dbimages=/usr/share/sgml/docbkdsl/images/ -else - echo "$ac_t""no" 1>&6 -test "$datadir" = '${prefix}/share' && dbimages=$ac_default_prefix/share/sgml/stylesheets/docbook/images/ -fi - +dbimages=/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/ # Check whether --with-dbimages or --without-dbimages was given. if test "${with_dbimages+set}" = set; then withval="$with_dbimages" @@ -1276,13 +807,10 @@ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@JADE@%$JADE%g -s%@oldjade@%$oldjade%g -s%@openjade@%$openjade%g s%@LYNX@%$LYNX%g s%@W3M@%$W3M%g s%@ISILO@%$ISILO%g s%@PYTHON@%$PYTHON%g -s%@CC@%$CC%g s%@etcsgml@%$etcsgml%g s%@dbimages@%$dbimages%g s%@pyprefix@%$pyprefix%g --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/src/python/SGMLtools.py +++ sgmltools-lite-3.0.3.0.cvs.20010909/src/python/SGMLtools.py @@ -87,7 +87,10 @@ os.environ['SGML_CATALOG_FILES'] = \ os.path.join(autoconf['etcdir'], 'catalog') \ + ":" + "/usr/share/sgml/stylesheets/sgmltools/sgmltools.cat" \ - + ":" + "/usr/share/sgml/CATALOG.docbkdsl" + + ":" + "/usr/share/sgml/stylesheet/dsssl/sgmltools/sgmltools.cat" \ + + ":" + "/usr/share/sgml/sgmltools-lite/stylesheet/dsssl/sgmltools.cat" \ + + ":" + "/usr/share/sgml/CATALOG.docbkdsl" \ + + ":" + "/etc/sgml/catalog" def processOptions(self, args): @@ -215,8 +218,10 @@ envname = 'SGML_SEARCH_PATH' if os.environ.has_key(envname): os.environ[envname] = os.environ[envname] + ':' + os.getcwd() + os.environ[envname] = os.environ[envname] + ':' + "/usr/share/sgml" else: os.environ[envname] = os.getcwd() + os.environ[envname] = os.environ[envname] + ':' + "/usr/share/sgml" os.chdir(savdir) # @@ -234,10 +239,35 @@ addJadeOpt = ' ' + userJadeOpt # + # the "nochunks hack" + # "-b html -j 'nochunks'" = "-b onehtml" + if self._curbackend == 'html': + optlist_nochunks_hack, args_nochunks_hack = getopt.getopt(addJadeOpt.split(), 'V:') + for curopt_nochunks_hack in optlist_nochunks_hack: + if (curopt_nochunks_hack[0] == '-V') and (curopt_nochunks_hack[1] == 'nochunks'): + print """The html backend tries to convert a sgml file +into one-file-for-one-section html format, but the +-j '-V nochunks' does not allow it. Assuming -b onehtml instead. +If you really want to use the html backend with -j '-V nochunks', try: + sgmltools -b html -j '-V "nochunks"' +""" + self._curbackend = 'onehtml' + be = self._classes[self._curbackend](self._filename, self._fileinfo, self._curglobal, self._tracer, self._autoconf) + + # # Open the input file and give the pre-Jade routine a shot. # infile = open(self._filename, 'r') nextfile = be.preJade(infile) + jadeinputfile = utils.makeTemp() + + # dirty hack to avoid the problem with openjade and pipe + # OK, Me, a bustard, don't know python at all. + # If you can provide me a correct patch, I'll appreciate. + catcmd = '/bin/cat >' + jadeinputfile + catpipe = os.popen(catcmd, 'w') + catpipe.writelines(nextfile.readlines()) + catpipe.close() # # Run Jade attached to a pipe @@ -248,15 +278,18 @@ jadeoutfile = utils.makeTemp() jadecmd = jadecmd + ' -o ' + jadeoutfile jadecmd = jadecmd + addJadeOpt + jadecmd = jadecmd + ' ' + jadeinputfile + ' ' jadestdoutfile = utils.makeTemp() jadecmd = jadecmd + ' >' + jadestdoutfile self._tracer.trace(jadecmd) - jadepipe = os.popen(jadecmd, 'w') + + #jadepipe = os.popen(jadecmd, 'w') + self._tracer.system(jadecmd) # # Pump nextfile->jadepipe, and close all files. # - jadepipe.writelines(nextfile.readlines()) + #jadepipe.writelines(nextfile.readlines()) try: jadepipe.close(); infile.close(); --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/src/python/utils.py +++ sgmltools-lite-3.0.3.0.cvs.20010909/src/python/utils.py @@ -328,6 +328,18 @@ else: return "'%s'*" % string.replace(file[:-1], "'", "'\\''") +def shellProtect2(file): + """Protects a filename against shell interpretation. + This is done by putting a backquote before every character + of the filename. Unlike shellProtect(), this function + does NOT treat the asterisk at the last of the filename specially. + """ + s = "" + for c in file: + s = s + "\\" + c + return s + + class Tracer: """Simple tracer class.""" @@ -364,8 +376,28 @@ os.symlink(src, dest) def mv(self, src, dest): - """Shorthand for the pattern trace('mv...);os.system("mv...).""" - self.system("mv %s %s" % (shellProtect(src), shellProtect(dest))) + """Move the file _src_ to _dest_. + All characters in _src_ and _dest_ are treated literally except for + the last character of _src_ --- if it is an asterisk, it matches + any number (including 0) of characters. + """ + self.trace("mv %s %s" % (shellProtect(src), shellProtect(dest))) + if src[-1] != '*': + os.system("mv %s %s" % (shellProtect2(src), shellProtect2(dest))) + else: + # Move all files whose name begins with src[:-1]. + # mv("/tmp/./*/.././*/.*../../..**", "/root") should move the file + # /tmp/*/..*. to /root --- this is what the upstream means + src_d = os.path.dirname(src) + src_b = os.path.basename(src) + assert len(src_b) >= 1 + src_b = src_b[:-1] + l = os.listdir(src_d) + for f in l: + assert len(f) >= 1 + if f[0:len(src_b)] == src_b: + os.system("mv %s %s" % (shellProtect2(src_d + "/" + f), shellProtect2(dest))) + # # License information printer --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/src/python/backends/Html.py +++ sgmltools-lite-3.0.3.0.cvs.20010909/src/python/backends/Html.py @@ -60,7 +60,15 @@ else: self._tracer.mkdir(destdir) - self._tracer.mv(self._tempdir + '/*', destdir) + # + # if the output directory is empty, issue a warning + # + if os.listdir(self._tempdir) == []: + print '''warning: the output directory is empty +maybe you should use "-b onehtml" instead of "-b html"''' + else: + self._tracer.mv(self._tempdir + '/*', destdir) + self._tracer.rmdir(self._tempdir) # @@ -75,7 +83,6 @@ except: pass - self._tracer.chdir(self._savdir) --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/src/python/backends/Ld2db.py +++ sgmltools-lite-3.0.3.0.cvs.20010909/src/python/backends/Ld2db.py @@ -42,6 +42,8 @@ newcatfiles.append(i) elif string.find(i, 'dtd/jade') != -1: newcatfiles.append(i) + elif string.find(i, '/etc/sgml') != -1: + newcatfiles.append(i) elif string.find(i, 'entities/iso-entities-8879.1986') != -1: newcatfiles.append(i) --- sgmltools-lite-3.0.3.0.cvs.20010909.orig/src/man/sgmltools-lite.1 +++ sgmltools-lite-3.0.3.0.cvs.20010909/src/man/sgmltools-lite.1 @@ -28,7 +28,7 @@ .SH SYNOPSIS .B sgmltools [\-b backend] [\-d] [\-v] [\-V] [\-h] [\-l] [\-s dsssl_spec] [\-j jadeopt] -[\-\-backend={html,onehtml,ps,dvi,rtf,txt,ld2db,jadetex,pdb,lynx,w3m}] [\-\-debug] +[\-\-backend={onehtml,html,ps,dvi,rtf,txt,ld2db,jadetex,pdb,lynx,w3m}] [\-\-debug] [\-\-verbose] [\-\-dsssl\-spec=dsssl_spec] [\-\-jade\-opt=jadeopt] [\-\-version] [\-\-help] [\-\-license] @@ -49,11 +49,12 @@ expects a DocBook SGML file and will convert it into DVI. .B rtf expects a DocBook SGML file and will convert it into RTF. +.B onehtml +expects a DocBook SGML file and will convert it into a single HTML; +the resulting file will be put in the current directory (default). .B html expects a DocBook SGML file and will convert it into HTML; the resulting -files will be put in a subdirectory (default). -.B onehtml -expects a DocBook SGML file and will convert it into a single HTML file. +files will be put in a subdirectory. .B txt expects a DocBook SGML file and will convert it into ASCII. Note that this backend actually uses the w3m (preferred) or lynx (if w3m not found) backends.