Commit 01d93dd4 authored by Taketoshi Sano's avatar Taketoshi Sano

Imported Debian version 0.9.21

parents
Everything is freely distributable, no warranties - your mileage may vary.
See sgmls-1.1/LICENSE for sgmlsasp translator license.
See iso-entities/COPYING for iso-entities license.
See entity-map/COPYING for entity-map license.
You need jade or openjade to use this software.
Changelog for linuxdoc-tools:
Please refer debian/changelog since this is the native Debian
package now.
*** This file describes the installation of the linuxdoc-tools package ***
You need to do the following things to get linuxdoc-tools installed:
o Get, make and install jade or openjade. This software needs
nsgmls or onsgmls command from jade or openjade.
The source of jade can be downloaded from
<URL:ftp://ftp.jclark.com/pub/jade/>.
This source archive contains source for both jade and sp.
The website for openjade is <URL:http://openjade.sourceforge.net/>.
Currently, openjade seems to be the way to go, but if your system
has working jade already, you can use it safely.
o Configure linuxdoc-tools for your system:
./configure
You can specify different installation prefixes during installation,
the default prefix is `/usr/local'.
For example: install linuxdoc-sgml to `/usr':
./configure --prefix=/usr
If you have sgmls-1.1 already installed, you can leave
out their compilation:
./configure --with-installed-sgmlsasp
If you have entity-map already installed, you can use it:
./configure --with-installed-entity-map
If you have iso-entities already installed, you can use it:
./configure --with-installed-iso-entities
o Compile SGML-Tools:
make
or
gmake
whatever calls GNU make on your system. If you don't have GNU make installed,
get the sources from prep.ai.mit.edu now and install it - SGML-Tools needs
it to compile.
o Install SGML-Tools:
make install
(You must probably be root to install in /usr/local and other system
directories).
Note:
In order to use TeX/PS/PDF output, TeX style files in ./lib
subdirectory (linuxdoc-sgml.sty, linuxdoctr-sgml.sty, null.sty,
and qwertz.sty) are to be installed your LaTeX input directory,
such as "/usr/share/tex/latex/misc/".
Also url.sty and epsf.tex are required. Newer version of them
are available from recent teTeX distribution. If you wish to
have old ones, check the "./obsoleted" subdirectory.
It might be a good idea to install in a temporary directory for testing,
first (/tmp perhaps).
o the contrib directory has some interesting patches and scripts that may be
useful to you.
o there is a guide on the linuxdoc-tools documentation directory, it
describes how to use this package, read it next...
#
# Makefile.in
#
# $Id: Makefile.in,v 1.7 2002/01/28 17:43:59 sano Exp $
#
# Copyright 1996 Sven Rudolph
#
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
datadir=@datadir@
pkgdatadir=$(datadir)/linuxdoc-tools
LINUXDOCDOC=$(prefix)/share/doc/linuxdoc-tools
mandir=@mandir@
mandir1=$(mandir)/man1
PERL=@PERL@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@ -m 755
INSTALL_DATA=@INSTALL_DATA@
#
# nsgmls or onsgmls should be installed already
# BUILD_NSGMLS=@BUILD_NSGMLS@
BUILD_SGMLSASP=@BUILD_SGMLSASP@
BUILD_ENTITY_MAP=@BUILD_ENTITY_MAP@
BUILD_ISO_ENTITIES=@BUILD_ISO_ENTITIES@
GENFILES := bin/linuxdoc
progs := sgml2html sgml2info sgml2latex sgml2lyx sgml2rtf sgml2txt sgmlcheck
OPTIMIZE=-O
all: gen
ifeq ($(BUILD_SGMLSASP), true)
@echo "Compiling the SGML translator tools (in sgmls-1.1/)..."
( cd sgmls-1.1 ; \
$(MAKE) OPTIMIZE="$(OPTIMIZE)" sgmlsasp )
endif
# nsgmls or onsgmls should be installed already
# ifeq ($(BUILD_NSGMLS), true)
# @echo "Compiling the SGML parsing tools (in sp/)..."
# ( cd sp ; \
# $(MAKE) )
# endif
ifeq ($(BUILD_ENTITY_MAP), true)
@echo "Building Entity Mapping library (in entity-map)..."
( cd entity-map ; \
$(MAKE) )
endif
@echo "Compiling preprocessor (in sgmlpre/)..."
( cd sgmlpre ; \
$(MAKE) CFLAGS="$(OPTIMIZE)" LEX=flex sgmlpre || exit -1 )
@echo "Compiling RTF conversion tools (in rtf-fix/)..."
( cd rtf-fix ; \
$(MAKE) CFLAGS="$(OPTIMIZE)" || exit -1 )
@echo "making man pages in genman ..."
if [ ! -d genman ]; then mkdir genman ; fi
for ii in man/* ; do \
bn=`basename $$ii`; \
cat $$ii | sed \
-e "s,\$$LINUXDOCLIB,$(pkgdatadir)," \
-e "s,\$$LINUXDOCBIN,$(bindir)," \
> genman/$$bn; \
done
install::
@echo "Installing binaries in $(bindir) ..."
if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi
-chmod 755 $(bindir)
# nsgmls or onsgmls should be installed already
# ifeq ($(BUILD_NSGMLS), true)
# $(INSTALL_PROGRAM) sp/nsgmls/nsgmls $(bindir)/nsgmls
# endif
ifeq ($(BUILD_SGMLSASP), true)
$(INSTALL_PROGRAM) sgmls-1.1/sgmlsasp $(bindir)/sgmlsasp
endif
ifeq ($(BUILD_ENTITY_MAP), true)
@echo "Installing Entity Mapping library (in entity-map)..."
( cd entity-map; \
$(MAKE) install )
endif
ifeq ($(BUILD_ISO_ENTITIES), true)
@echo "Installing ISO character entity sets (in iso-entities)..."
( cd iso-entities; \
$(MAKE) install )
endif
strip sgmlpre/sgmlpre
for ii in sgmlpre/sgmlpre rtf-fix/rtf2rtf; do \
bn=`basename $$ii`; \
$(INSTALL_PROGRAM) $$ii $(bindir)/$$bn; \
done
$(INSTALL_PROGRAM) bin/linuxdoc $(bindir)/linuxdoc
@echo "Installing library and support files in $(pkgdatadir)..."
if [ ! -d $(pkgdatadir) ]; then mkdir -p $(pkgdatadir); fi
chmod 755 $(pkgdatadir)
cp -r lib/* $(pkgdatadir)
cp VERSION $(pkgdatadir)
@echo "Installing man pages in $(mandir1) ..."
if [ ! -d $(mandir1) ]; then mkdir -p $(mandir1) ; fi
-chmod 755 $(mandir1)
for ii in genman/sgml2* genman/sgmlcheck.1 \
genman/rtf*.1 genman/sgmlpre*.1; do \
bn=`basename $$ii`; \
$(INSTALL_DATA) $$ii $(mandir1)/$$bn; \
done
$(INSTALL_DATA) genman/linuxdoc.1 $(mandir1)/linuxdoc.1
ifeq ($(BUILD_NSGMLS), true)
$(INSTALL_DATA) man/nsgmls.1 $(mandir1)/nsgmls.1
endif
ifeq ($(BUILD_SGMLSASP), true)
$(INSTALL_DATA) man/sgmlsasp.1 $(mandir1)/sgmlsasp.1
endif
find $(pkgdatadir) -type d -print | xargs chmod 755
find $(pkgdatadir) -type f -print | xargs chmod 644
(cd $(pkgdatadir)/dist/linuxdoc-tools/latin1; rm -f mapping; ln -s ../groff/mapping .)
(cd $(pkgdatadir)/dist/linuxdoc-tools/nippon; rm -f mapping; ln -s ../groff/tr-mapping ./mapping)
(cd $(pkgdatadir)/dist; rm -f linuxdoc; ln -s linuxdoc-tools linuxdoc)
(cd $(pkgdatadir)/dist; rm -f linuxdoctr; ln -s linuxdoc-tools linuxdoctr)
(cd $(pkgdatadir)/dist; rm -f linuxdoc96; ln -s linuxdoc-tools linuxdoc96)
(cd $(pkgdatadir)/dist; rm -f linuxdoctr96; ln -s linuxdoc-tools linuxdoctr96)
(cd $(pkgdatadir)/dist; rm -f linuxdoc97; ln -s linuxdoc-tools linuxdoc97)
(cd $(pkgdatadir)/dtd; rm -f linuxdoc.dtd; ln -s linuxdoc96.dtd linuxdoc.dtd)
(cd $(pkgdatadir)/dtd; rm -f linuxdoctr.dtd; ln -s linuxdoctr96.dtd linuxdoctr.dtd)
(cd $(bindir); for i in $(progs); do rm -f $$i; ln -s linuxdoc $$i;done)
@echo "Installing documentation in $(LINUXDOCDOC) ..."
(cd doc; PATH=${PATH}:$(bindir) PREFIX=$(prefix) BINDIR=$(bindir) \
DATADIR=$(datadir) bash Makedoc.sh)
if [ ! -d $(LINUXDOCDOC) ]; then mkdir -p $(LINUXDOCDOC); fi
chmod 755 $(LINUXDOCDOC)
cp -r doc/* $(LINUXDOCDOC)
rm -f $(LINUXDOCDOC)/Makedoc.sh
find $(LINUXDOCDOC) -type d -print | xargs chmod 755
find $(LINUXDOCDOC) -type f -print | xargs chmod 644
# what dirs do the targets clean and distclean need?
DDIRS=
MDIRS=
ifeq ($(BUILD_SGMLSASP), true)
DDIRS += sgmls-1.1
endif
ifeq ($(BUILD_NSGMLS), true)
DDIRS += sp
endif
ifeq ($(BUILD_ENTITY_MAP), true)
MDIRS += entity-map
endif
ifeq ($(BUILD_ISO_ENTITIES), true)
MDIRS += iso-entities
endif
clean::
-rm -f *~ bin/*~
for d in $(DDIRS) $(MDIRS) rtf-fix; do $(MAKE) -C $$d clean; done
(cd sgmlpre ; rm -f sgmlpre.o sgmlpre)
-rm -rf genman/
distclean:: clean
for d in $(MDIRS); do $(MAKE) -C $$d distclean; done
-rm -f Makefile config.cache config.log config.status \
entity-map/Makefile iso-entities/Makefile \
sgmls-1.1/config.h \
sp/Makefile sp/Makefile.lib sp/config.log sp/config.status \
sp/*/Makefile.dep \
doc/guide.tex doc/guide.dvi doc/guide.ps doc/guide.ps.gz \
doc/guide.info doc/guide.lyx doc/html/guide*.html \
doc/rtf/guide*.rtf $(GENFILES)
gen : $(GENFILES)
#
# Not very clean, I know. But it works for now. Any better
# solutions to this are gladly accepted - CdG
#
% : %.in config.status
@ [ $< = Makefile.in ] || ( \
echo Creating $@ ... ; \
rm -f $@ 2>/dev/null; cat $< | sed \
-e 's!\@prefix\@!@prefix@!' \
-e 's!\@DATADIR\@!@datadir@/linuxdoc-tools!' \
-e 's!\@BINDIR\@!@bindir@!' \
-e 's!\@NSGMLS\@!@NSGMLS@!' \
-e 's!\@SGMLSASP\@!@SGMLSASP@!' \
-e 's!\@GROFF\@!@GROFF@!' \
-e 's!\@GROFFMACRO\@!@GROFFMACRO@!' \
-e 's!\@AWK\@!@AWK@!' \
-e 's!\@NKF\@!@NKF@!' \
-e 's!\@PERL\@!@PERL@!' \
-e 's!\@PERLWARN\@!@PERLWARN@!' \
>$@ )
The Linuxdoc-Tools package: <http://people.debian.org/~sano/linuxdoc-tools/>
Linuxdoc-Tools is in fact a small bug-fix version of SGML-Tools 1.0.9,
and is a toolset for processing LinuxDoc DTD SGML files. This is currently
maintained by Taketoshi Sano <sano@debian.org>.
SGML-Tools 1.0.9 is the last official release of SGML-Tools with direct
support for LinuxDoc DTD. More recent version of SGML-Tools 2.x and
its successor, SGMLtools-Lite <http://sgmltools-lite.sourceforge.net/>
only supports the conversion from LinuxDoc DTD sgml into DocBook DTD.
But currently many HOWTO documents in LDP are still provided as
LinuxDoc DTD sgml files, and many Linux users wish to use the tool
which converts LinuxDoc DTD sgml files into various format directly.
So I made a modification on SGML-Tools 1.0.9, and release the result
as a new branch in order to avoid the confusion with the SGML-Tools
and the SGMLTools-Lite.
Since Linuxdoc-Tools is a derivative of SGML-Tools 1.0.9, it has
almost the same functions of its predecessor. It is a text-formatting
package based on SGML (Standard Generalized Markup Language), which
allows you to produce LaTeX, HTML, GNU info, LyX, RTF, and plain text
(via groff) from a single source;
Now old command form sgml2* is obsoleted and a single command
"linuxdoc" is the prefered form.
Old (obsoleted) New (prefered)
------------------- -----------------
sgml2txt linuxdoc -B txt
sgml2html linuxdoc -B html
sgml2info linuxdoc -B info
sgml2latex linuxdoc -B latex
sgml2lyx linuxdoc -B lyx
sgml2rtf linuxdoc -B rtf
sgmlcheck linuxdoc -B check
This system is tailored for LinuxDoc DTD sgml files, and other DTDs
are not supported. If you need the tool for DocBook DTD (which is
now a more popular DTD than LinuxDoc in writing technical software
documentation), then you should check SGMLTools-Lite, OpenJade,
and docbook-tools. Check their Web sites below.
SGMLTools-Lite: <http://sgmltools-lite.sourceforge.net/>
OpenJade: <http://openjade.sourceforge.net/>
docbook-tools: <http://sourceware.cygnus.com/docbook-tools/>
The file doc/guide.sgml is Linuxdoc DTD SGML source for the User's Guide,
originally written by Matt Welsh and updated by many people.
As you probably don't know how to format it yet, there is formatted plain
text in doc/guide.txt. There's also guide.dvi and guide.ps, if you wish
to print them instead. The first thing you should read is doc/guide.txt,
which explains how to install the software (namely, it tells you to
read the file INSTALL), and how to start writing documents with it.
The file doc/example.sgml is a simple example document which you can use
as a tutorial.
Linuxdoc-Tools depends on the usage of the sgml parser from Jade or
OpenJade (nsgmls or onsgmls). You have to install either of them.
Matt Welsh originally created the package under the name Linuxdoc-SGML,
using James Clark's sgmls parser and the QWERTZ DTD by Tom Gordon.
Then Greg Hankins maintained it. It was renamed to SGML-Tools later,
and had been maintained by Cees de Groot <cg@cdegroot.com>.
SGML-Tools 2.x was significantly changed from 1.0.x, and it dropped
the direct support of Linuxdoc DTD and adopted the support of the DocBook
DTD using Jade. SGMLtools-Lite is the latest branch from SGML-Tools 2.x,
and it is maintained by Cees at <http://sgmltools-lite.sourceforge.net/>.
This Linuxdoc-Tools is the branch from SGML-Tools 1.0.9, and its
focus is to provide the backward compatibility for users of the old
Linuxdoc DTD.
This branch uses patch from JF ("The Japanese FAQ Project") to support
euc-jp encoded Japanese sgml file on sgml2txt, sgml2html, and sgml2latex.
(sgml2info, sgml2lyx, and sgml2rtf have no special on Japanese support.)
The JF patch for sgml-tools (v1) was originally written by Kazuyuki
Okamoto <ikko-@pacific.rim.or.jp> and Tetsu ONO <ono@jf.gee.kyoto-u.ac.jp>.
They tried to contribute their patch to the upstream, but they could not
success. I am a member in JF project, and I have heard from them that
their patch can be used under the license of the original code.
The JF patch adds also a new DTD named "linuxdoctr", which is a variant
of "linuxdoc" with two more tags (<trans> and <tdate>, for the name of
the translator and for the date, time and version information of
the translation). This is required by JF ("The Japanese FAQ Project",
<http://www.linux.or.jp/JF/>) because the activity in JF includes the
translation of LDP documents into Japanese, and the translation may be
often revised for the same original revision.
Improvements in fmt_txt.pl (<tt> tags in <sect> do not harm in <toc>)
are also included in the original JF patch.
From version 0.3.7, I have merged pdf patch written by Juan Jose Amor
<jjamor@hispalinux.es> for sgml-tools 1.0.9. This patch is to use
pdfLaTeX in sgml2latex to produce nice PDF files. I include the note
written by Juan at the end of this README, so please check it for this
patch.
And I keep the old documents in old-docs/ subdirectory. If you are
interested in history, then please check there.
Please send me any questions or bug reports, as well as suggestions for
improvement.
=== (copied from README.pdf written by Juan Jose Amor for his pdf patch) ===
GOOD PDFs WITH SGMLTOOLS and PDFLATEX
=====================================
Patch written by Juan Jose Amor, <jjamor@hispalinux.es> on January 2000.
Easy to use:
sgml2latex [other options] -o pdf yourfile.sgml
I've tested it with language and charset options. And it works!
That is, my test command line was:
linuxdoc -B latex -l es -c latin -o pdf myfile.sgml
This patch has not been tested with other options such as bibtex
or makeindex. However, it may be used to generate a nice PDF output for
HOWTO documents, with internal and external (URL) hyperlinks.
To generate an external hyperlink, please use the <htmlurl> tag in your
.sgml file.
Please, send comments about this patch to Juan Jose Amor,
<jjamor@hispalinux.es>. Don't flame, please :-)
and remember... use at your own risk!
=== (end of quotation from README.pdf) ===
$Id: README,v 1.2 2002/03/18 13:38:44 sano Exp $
Taketoshi Sano <sano@debian.org>
0.9.21
#!@PERL@ @PERLWARN@
#
# linuxdoc.in
#
# $Id: linuxdoc.in,v 1.3 2001/09/01 14:16:28 sano Exp $
#
# LinuxDoc-Tools driver. Calls all other LinuxDoc-Tools components,
# contains configuration information, etcetera.
#
package main;
sub BEGIN
{
require 5.004;
}
use strict;
use vars qw($prefix $DataDir $BinDir $progs);
$prefix = "@prefix@";
$DataDir = "@DATADIR@";
$BinDir = "@BINDIR@";
use lib "@DATADIR@";
use lib "@prefix@/perl5";
use lib "@prefix@/lib/perl5";
use lib "@prefix@/share/perl5";
$progs = {
"NSGMLS" => "@NSGMLS@",
"SGMLSASP" => "@SGMLSASP@",
"GROFF" => "@GROFF@",
"GROFFMACRO" => "@GROFFMACRO@",
"AWK" => "@AWK@"
# "NKF" => "@NKF@"
};
require LinuxDocTools;
&LinuxDocTools::init;
my @FileList = LinuxDocTools::process_options ($0, @ARGV);
for my $curfile (@FileList)
{
LinuxDocTools::process_file ($curfile);
}
exit 0;
This diff is collapsed.
dnl
dnl configure.in
dnl
dnl $Id: configure.in,v 1.6 2001/12/02 02:32:06 sano Exp $
dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT(sgmls-1.1)
AC_PROG_INSTALL
AC_PATH_PROG(PERL, perl)
AC_SUBST(PERL)
if echo 'require 5.004;exit' | $PERL
then
: # Solaris and OSF/1 /bin/sh don't know about negation operators...
else
AC_MSG_ERROR(You don't have Perl 5.004...)
exit 1
fi
AC_ARG_WITH(perl-w,
[ --with-perl-w use perl -w option],
PERLWARN=-w,
PERLWARN=
)
AC_SUBST(PERLWARN)
AC_PATH_PROG(GROFF, groff)
AC_SUBST(GROFF)
dnl Check if groff should take -mgs or -ms
AC_CACHE_CHECK(whether ${GROFF} accepts -mgs, ac_cv_linuxdoctools_groff_mgs,
[ if test -z "`${GROFF} -mgs < /dev/null 2>&1`"; then
ac_cv_linuxdoctools_groff_mgs=yes
else
ac_cv_linuxdoctools_groff_mgs=no
fi
])
if test ${ac_cv_linuxdoctools_groff_mgs:-ERROR} = yes; then
GROFFMACRO="-mgs"
else
GROFFMACRO="-ms"
fi
AC_SUBST(GROFFMACRO)
AC_PATH_PROGS(AWK, gawk mawk, notfound)
AC_SUBST(AWK)
test "$AWK" = "notfound" && AC_MSG_ERROR(neither gawk nor mawk is found)
AC_PATH_PROGS(NSGMLS, nsgmls onsgmls, notfound)
AC_SUBST(NSGMLS)
test "$NSGMLS" = "notfound" && AC_MSG_ERROR(neither onsgmls nor nsgmls is found)
BUILD_NSGMLS=
AC_SUBST(BUILD_NSGMLS)
AC_PATH_PROG(SGMLSASP, sgmlsasp)
AC_ARG_WITH(installed-sgmlsasp,
[ --with-installed-sgmlsasp use installed sgmlsasp],
test -n "$SGMLSASP" || AC_MSG_ERROR(sgmlsasp not found)
BUILD_SGMLSASP=,
SGMLSASP=\${prefix}/bin/sgmlsasp
BUILD_SGMLSASP=true
)
AC_SUBST(SGMLSASP)
AC_SUBST(BUILD_SGMLSASP)
AC_ARG_WITH(installed-entity-map,
[ --with-installed-entity-map use installed entity-map],
BUILD_ENTITY_MAP=,
BUILD_ENTITY_MAP=true
)
AC_SUBST(BUILD_ENTITY_MAP)
AC_ARG_WITH(installed-iso-entities,
[ --with-installed-iso-entities use installed iso-entities],
BUILD_ISO_ENTITIES=,
BUILD_ISO_ENTITIES=true
)
AC_SUBST(BUILD_ISO_ENTITIES)
if test "$BUILD_NSGMLS" = "true"
then