--- babel-0.7.4.orig/bin/babel.in
+++ babel-0.7.4/bin/babel.in
@@ -13,6 +13,7 @@
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
+datadir=@datadir@
 
 JAVA=@JAVA@
 JDB=@JDB@
@@ -71,13 +72,17 @@
 #
 if test "${EXEC_BABEL}" = "${exec_prefix}"; then 
     BABEL="${prefix}"
+    BABELJAR="${datadir}/java"
+else
+    BABELJAR="${BABEL}/lib"
 fi
 
+SYSJAR=/usr/share/java
 
 #
 # Set the CLASSPATH based on the BABEL home directory
 #
-BABELCP=${BABEL}/lib/${PACKAGE}-${VERSION}.jar:${BABEL}/lib/java-getopt-1.0.7.jar:${BABEL}/lib/xerces-1.1.1.jar:${BABEL}/lib/jcert-1.0.1.jar:${BABEL}/lib/jnet-1.0.1.jar:${BABEL}/lib/jsse-1.0.1.jar
+BABELCP=${BABELJAR}/${PACKAGE}-${VERSION}.jar:${SYSJAR}/gnu.getopt.jar:${SYSJAR}/xerces.jar
 if test "X$CLASSPATH" = "X"; then
   CLASSPATH=${BABELCP}
 else
@@ -86,12 +91,17 @@
 unset BABELCP
 
 #
-# If the SIDL repository exists, then add it to the default repository path.
+# If the SIDL repository exists, then add it to the default repository path,
+# starting with the standard (local) ${BABEL}/share/repository.
 #
 
 REPOSITORY=
 if test -d ${BABEL}/share/repository; then
   REPOSITORY=${BABEL}/share/repository
+elif test -d ${datadir}/@PACKAGE@/repository; then
+  REPOSITORY=${datadir}/@PACKAGE@/repository
+fi
+if test "X$REPOSITORY" != "X"; then
   for a in $@; do
     case "$a" in
       --no-default-repository | -!) REPOSITORY=;;
--- babel-0.7.4.orig/doc/Makefile.am
+++ babel-0.7.4/doc/Makefile.am
@@ -13,7 +13,7 @@
 
 SUBDIRS = babel101 html papers talks manuals
 
-docdir = $(prefix)/doc
+docdir = $(datadir)/doc/babel-doc
 
 # is this a bug???  I thought "doc_DATA = index.html" was sufficient
 # it takes these two lines to get everything working right.
--- babel-0.7.4.orig/doc/Makefile.in
+++ babel-0.7.4/doc/Makefile.in
@@ -119,7 +119,7 @@
 
 SUBDIRS = babel101 html papers talks manuals
 
-docdir = $(prefix)/doc
+docdir = $(datadir)/doc/babel-doc
 
 # is this a bug???  I thought "doc_DATA = index.html" was sufficient
 # it takes these two lines to get everything working right.
--- babel-0.7.4.orig/doc/babel101/Makefile.am
+++ babel-0.7.4/doc/babel101/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(prefix)/doc/babel101
+docdir = $(datadir)/doc/babel-doc/babel101
 
 docdata = \
   Babel101.html \
--- babel-0.7.4.orig/doc/babel101/Makefile.in
+++ babel-0.7.4/doc/babel101/Makefile.in
@@ -117,7 +117,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(prefix)/doc/babel101
+docdir = $(datadir)/doc/babel-doc/babel101
 
 docdata = \
   Babel101.html \
--- babel-0.7.4.orig/doc/html/Makefile.am
+++ babel-0.7.4/doc/html/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(prefix)/doc/html
+docdir = $(datadir)/doc/babel-doc/html
 
 JAVADOC = @JAVADOC@
 JAVADOCFILES = package-list stylesheet.css *.html
@@ -80,8 +80,12 @@
 	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p";	\
 	  $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p;		\
 	done
-	cp -r gov/ $(DESTDIR)$(docdir)
-	cp -r SIDL/ $(DESTDIR)$(docdir)
+	if test -d gov; then \
+	  cp -r gov/ $(DESTDIR)$(docdir); \
+	fi
+	if test -d SIDL; then \
+	  cp -r SIDL/ $(DESTDIR)$(docdir); \
+	fi
 
 uninstall-am: uninstall-data-am
 uninstall-data-am:
--- babel-0.7.4.orig/doc/html/Makefile.in
+++ babel-0.7.4/doc/html/Makefile.in
@@ -118,7 +118,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(prefix)/doc/html
+docdir = $(datadir)/doc/babel-doc/html
 JAVADOCFILES = package-list stylesheet.css *.html
 
 CP = ../../lib/java-getopt-1.0.7.jar:../../lib/xerces-1.1.1.jar:../../lib/jcert-1.0.1.jar:../../lib/jnet-1.0.1.jar:../../lib/external/jsse-1.0.1.jar
@@ -315,8 +315,12 @@
 	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p";	\
 	  $(INSTALL_DATA) $$p $(DESTDIR)$(docdir)/$$p;		\
 	done
-	cp -r gov/ $(DESTDIR)$(docdir)
-	cp -r SIDL/ $(DESTDIR)$(docdir)
+	if test -d gov; then \
+	  cp -r gov/ $(DESTDIR)$(docdir); \
+	fi
+	if test -d SIDL; then \
+	  cp -r SIDL/ $(DESTDIR)$(docdir); \
+	fi
 
 uninstall-am: uninstall-data-am
 uninstall-data-am:
--- babel-0.7.4.orig/doc/papers/Makefile.am
+++ babel-0.7.4/doc/papers/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(prefix)/doc/papers
+docdir = $(datadir)/doc/babel-doc/papers
 
 doc_DATA = \
   hpdc99.pdf \
--- babel-0.7.4.orig/doc/papers/Makefile.in
+++ babel-0.7.4/doc/papers/Makefile.in
@@ -117,7 +117,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(prefix)/doc/papers
+docdir = $(datadir)/doc/babel-doc/papers
 
 doc_DATA = \
   hpdc99.pdf \
--- babel-0.7.4.orig/doc/talks/Makefile.am
+++ babel-0.7.4/doc/talks/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(prefix)/doc/talks
+docdir = $(datadir)/doc/babel-doc/talks
 
 doc_DATA = \
   siam98.pdf \
--- babel-0.7.4.orig/doc/talks/Makefile.in
+++ babel-0.7.4/doc/talks/Makefile.in
@@ -117,7 +117,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(prefix)/doc/talks
+docdir = $(datadir)/doc/babel-doc/talks
 
 doc_DATA = \
   siam98.pdf \
--- babel-0.7.4.orig/doc/manuals/Makefile.am
+++ babel-0.7.4/doc/manuals/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(prefix)/doc/manuals
+docdir = $(datadir)/doc/babel-doc/manuals
 
 doc_DATA = users_guide.pdf users_guide.ps #ref_manual.pdf ref_manual.ps 
 
--- babel-0.7.4.orig/doc/manuals/Makefile.in
+++ babel-0.7.4/doc/manuals/Makefile.in
@@ -117,7 +117,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(prefix)/doc/manuals
+docdir = $(datadir)/doc/babel-doc/manuals
 
 doc_DATA = users_guide.pdf users_guide.ps #ref_manual.pdf ref_manual.ps 
 subdir = doc/manuals
--- babel-0.7.4.orig/doc/index.html
+++ babel-0.7.4/doc/index.html
@@ -167,6 +167,11 @@
   <td colspan=2><h2>Source Documentation for Babel's Code Generator (javadoc)</h2></td>
   <td><a href="html/index.html">[HTML]</a></td>
 </tr>
+<tr></tr>
+<tr>
+  <td colspan=2><h2>Debian package description</h2></td>
+  <td><a href="README.Debian.html">[HTML]</a></td>
+</tr>
 </table>
 
 </body>
--- babel-0.7.4.orig/compiler/Makefile.am
+++ babel-0.7.4/compiler/Makefile.am
@@ -77,13 +77,9 @@
 	echo "$(JAVAC) $(JAVAC_FLAGS) $$javafiles";			\
 	if $(JAVAC) $(JAVAC_FLAGS) $$javafiles; then			\
 	  classfiles=`find gov -name '*.class' -print`;			\
-	  echo "$(JAR) cf $(JARFILE) $$classfiles";			\
-	  $(JAR) cf $(JARFILE) $$classfiles;				\
 	  dtdfiles=`cd $(srcdir) ; find gov -name '*.dtd' -print`;	\
-	  for df in $$dtdfiles; do					\
-	    echo "$(JAR) uf $(JARFILE) -C $(srcdir) $$df";		\
-	    $(JAR) uf $(JARFILE) -C $(srcdir) $$df;			\
-	  done;								\
+	  echo "$(JAR) cf $(JARFILE) $$classfiles $$dtdfiles";		\
+	  $(JAR) cf $(JARFILE) $$classfiles $$dtdfiles;			\
 	else								\
 	  exit 1;							\
 	fi
--- babel-0.7.4.orig/compiler/Makefile.in
+++ babel-0.7.4/compiler/Makefile.in
@@ -295,13 +295,9 @@
 	echo "$(JAVAC) $(JAVAC_FLAGS) $$javafiles";			\
 	if $(JAVAC) $(JAVAC_FLAGS) $$javafiles; then			\
 	  classfiles=`find gov -name '*.class' -print`;			\
-	  echo "$(JAR) cf $(JARFILE) $$classfiles";			\
-	  $(JAR) cf $(JARFILE) $$classfiles;				\
 	  dtdfiles=`cd $(srcdir) ; find gov -name '*.dtd' -print`;	\
-	  for df in $$dtdfiles; do					\
-	    echo "$(JAR) uf $(JARFILE) -C $(srcdir) $$df";		\
-	    $(JAR) uf $(JARFILE) -C $(srcdir) $$df;			\
-	  done;								\
+	  echo "$(JAR) cf $(JARFILE) $$classfiles $$dtdfiles";		\
+	  $(JAR) cf $(JARFILE) $$classfiles $$dtdfiles;			\
 	else								\
 	  exit 1;							\
 	fi
--- babel-0.7.4.orig/runtime/sidl/Makefile.am
+++ babel-0.7.4/runtime/sidl/Makefile.am
@@ -33,7 +33,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-data_DATA = sidl.sidl
+pkgdata_DATA = sidl.sidl
 
 lib_LTLIBRARIES = libsidl.la
 include_HEADERS = $(HEADERS_INSTALL)
--- babel-0.7.4.orig/runtime/sidl/Makefile.in
+++ babel-0.7.4/runtime/sidl/Makefile.in
@@ -117,7 +117,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-data_DATA = sidl.sidl
+pkgdata_DATA = sidl.sidl
 
 lib_LTLIBRARIES = libsidl.la
 include_HEADERS = $(HEADERS_INSTALL)
@@ -130,7 +130,7 @@
 libsidl_la_LDFLAGS = -no-undefined -release @VERSION@
 
 AM_CPPFLAGS = -DHAVE_LTDL
-EXTRA_DIST = $(data_DATA) $(HEADERS_SPLICE) $(SOURCES_SPLICE) ltdl.h
+EXTRA_DIST = $(pkgdata_DATA) $(HEADERS_SPLICE) $(SOURCES_SPLICE) ltdl.h
 
 HEADERS_HAND = \
 	SIDLArray.h \
@@ -281,7 +281,7 @@
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 CFLAGS = @CFLAGS@
 DIST_SOURCES = $(libsidl_la_SOURCES)
-DATA = $(data_DATA)
+DATA = $(pkgdata_DATA)
 
 HEADERS = $(include_HEADERS)
 
@@ -345,22 +345,22 @@
 .c.lo:
 	$(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
 uninstall-info-am:
-install-dataDATA: $(data_DATA)
+install-pkgdataDATA: $(pkgdata_DATA)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(datadir)
-	@list='$(data_DATA)'; for p in $$list; do \
+	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+	@list='$(pkgdata_DATA)'; for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(datadir)/$$f"; \
-	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(datadir)/$$f; \
+	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
+	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
 	done
 
-uninstall-dataDATA:
+uninstall-pkgdataDATA:
 	@$(NORMAL_UNINSTALL)
-	@list='$(data_DATA)'; for p in $$list; do \
+	@list='$(pkgdata_DATA)'; for p in $$list; do \
 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(datadir)/$$f"; \
-	  rm -f $(DESTDIR)$(datadir)/$$f; \
+	  echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
+	  rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
 	done
 install-includeHEADERS: $(include_HEADERS)
 	@$(NORMAL_INSTALL)
@@ -481,7 +481,7 @@
 
 info-am:
 
-install-data-am: install-dataDATA install-includeHEADERS
+install-data-am: install-pkgdataDATA install-includeHEADERS
 
 install-exec-am: install-libLTLIBRARIES
 
@@ -500,20 +500,20 @@
 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
 	mostlyclean-libtool
 
-uninstall-am: uninstall-dataDATA uninstall-includeHEADERS \
+uninstall-am: uninstall-pkgdataDATA uninstall-includeHEADERS \
 	uninstall-libLTLIBRARIES
 
 .PHONY: GTAGS all all-am check check-am clean clean-generic \
 	clean-libLTLIBRARIES clean-libtool clean-local distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am info info-am install \
-	install-am install-data install-data-am install-dataDATA \
+	install-am install-data install-data-am install-pkgdataDATA \
 	install-exec install-exec-am install-includeHEADERS \
 	install-info install-info-am install-libLTLIBRARIES install-man \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
 	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-	tags uninstall uninstall-am uninstall-dataDATA \
+	tags uninstall uninstall-am uninstall-pkgdataDATA \
 	uninstall-includeHEADERS uninstall-info-am \
 	uninstall-libLTLIBRARIES
 
--- babel-0.7.4.orig/lib/Makefile.am
+++ babel-0.7.4/lib/Makefile.am
@@ -36,7 +36,7 @@
 BABELJAR = @PACKAGE@-@VERSION@.jar
 SIDLJAR  = sidl-@VERSION@.jar
 
-jardir = $(prefix)/lib
+jardir = $(datadir)/java
 jar_DATA = $(BABELJAR)						\
 	   $(SIDLJAR)						\
 	   java-getopt-1.0.7.jar				\
--- babel-0.7.4.orig/lib/Makefile.in
+++ babel-0.7.4/lib/Makefile.in
@@ -120,7 +120,7 @@
 BABELJAR = @PACKAGE@-@VERSION@.jar
 SIDLJAR = sidl-@VERSION@.jar
 
-jardir = $(prefix)/lib
+jardir = $(datadir)/java
 jar_DATA = $(BABELJAR)						\
 	   $(SIDLJAR)						\
 	   java-getopt-1.0.7.jar				\
--- babel-0.7.4.orig/share/Makefile.am
+++ babel-0.7.4/share/Makefile.am
@@ -51,15 +51,15 @@
 
 install-data-local:
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(datadir)/repository
+	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/repository
 	@list=`find repository 					\
 		-name CVS -prune -o -name SCCS -prune -o	\
 		-name "*.xml" -print`;				\
 	for f in $$list; do					\
-	  echo $(INSTALL_DATA) $$f $(DESTDIR)$(datadir)/$$f;	\
-	  $(INSTALL_DATA) $$f $(DESTDIR)$(datadir)/$$f;		\
+	  echo $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/$$f;	\
+	  $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/$$f;		\
 	done
 
 uninstall-local:
 	@$(NORMAL_UNINSTALL)
-	rm -rf $(DESTDIR)/$(datadir)/repository
+	rm -rf $(DESTDIR)/$(pkgdatadir)/repository
--- babel-0.7.4.orig/share/Makefile.in
+++ babel-0.7.4/share/Makefile.in
@@ -379,18 +379,18 @@
 
 install-data-local:
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(datadir)/repository
+	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/repository
 	@list=`find repository 					\
 		-name CVS -prune -o -name SCCS -prune -o	\
 		-name "*.xml" -print`;				\
 	for f in $$list; do					\
-	  echo $(INSTALL_DATA) $$f $(DESTDIR)$(datadir)/$$f;	\
-	  $(INSTALL_DATA) $$f $(DESTDIR)$(datadir)/$$f;		\
+	  echo $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/$$f;	\
+	  $(INSTALL_DATA) $$f $(DESTDIR)$(pkgdatadir)/$$f;		\
 	done
 
 uninstall-local:
 	@$(NORMAL_UNINSTALL)
-	rm -rf $(DESTDIR)/$(datadir)/repository
+	rm -rf $(DESTDIR)/$(pkgdatadir)/repository
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
--- babel-0.7.4.orig/share/config/Makefile.am
+++ babel-0.7.4/share/config/Makefile.am
@@ -33,6 +33,5 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-sharedir = $(prefix)/share/config
-share_DATA = config.dtd config.xml html-lite.dtd metadata.dtd metadata.xml
-EXTRA_DIST = $(share_DATA)
+pkgdata_DATA = config.dtd config.xml html-lite.dtd metadata.dtd metadata.xml
+EXTRA_DIST = $(pkgdata_DATA)
--- babel-0.7.4.orig/share/config/Makefile.in
+++ babel-0.7.4/share/config/Makefile.in
@@ -117,16 +117,15 @@
                    no-installman no-texinfo.tex 1.5
 
 
-sharedir = $(prefix)/share/config
-share_DATA = config.dtd config.xml html-lite.dtd metadata.dtd metadata.xml
-EXTRA_DIST = $(share_DATA)
+pkgdata_DATA = config.dtd config.xml html-lite.dtd metadata.dtd metadata.xml
+EXTRA_DIST = $(pkgdata_DATA)
 subdir = share/config
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config/babel_config.h
 CONFIG_CLEAN_FILES =
 depcomp =
 DIST_SOURCES =
-DATA = $(share_DATA)
+DATA = $(pkgdata_DATA)
 
 DIST_COMMON = Makefile.am Makefile.in
 all: all-am
@@ -149,22 +148,22 @@
 	  CONFIG_HEADERS= CONFIG_LINKS= \
 	  CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
 uninstall-info-am:
-install-shareDATA: $(share_DATA)
+install-pkgdataDATA: $(pkgdata_DATA)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(sharedir)
-	@list='$(share_DATA)'; for p in $$list; do \
+	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+	@list='$(pkgdata_DATA)'; for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(sharedir)/$$f"; \
-	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(sharedir)/$$f; \
+	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
+	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
 	done
 
-uninstall-shareDATA:
+uninstall-pkgdataDATA:
 	@$(NORMAL_UNINSTALL)
-	@list='$(share_DATA)'; for p in $$list; do \
+	@list='$(pkgdata_DATA)'; for p in $$list; do \
 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(sharedir)/$$f"; \
-	  rm -f $(DESTDIR)$(sharedir)/$$f; \
+	  echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
+	  rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
 	done
 tags: TAGS
 TAGS:
@@ -196,7 +195,7 @@
 all-am: Makefile $(DATA)
 
 installdirs:
-	$(mkinstalldirs) $(DESTDIR)$(sharedir)
+	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
 
 install: install-am
 install-exec: install-exec-am
@@ -237,7 +236,7 @@
 
 info-am:
 
-install-data-am: install-shareDATA
+install-data-am: install-pkgdataDATA
 
 install-exec-am:
 
@@ -255,17 +254,17 @@
 
 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
 
-uninstall-am: uninstall-shareDATA
+uninstall-am: uninstall-pkgdataDATA
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
 	distclean distclean-generic distclean-libtool distdir dvi \
 	dvi-am info info-am install install-am install-data \
 	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-shareDATA install-strip \
+	install-info-am install-man install-pkgdataDATA install-strip \
 	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-generic \
 	mostlyclean-libtool uninstall uninstall-am uninstall-info-am \
-	uninstall-shareDATA
+	uninstall-pkgdataDATA
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
--- babel-0.7.4.orig/debian/python2.2-babel.files
+++ babel-0.7.4/debian/python2.2-babel.files
@@ -0,0 +1,2 @@
+usr/lib/python*
+usr/include/python*
--- babel-0.7.4.orig/debian/changelog
+++ babel-0.7.4/debian/changelog
@@ -0,0 +1,21 @@
+babel (0.7.4-2) unstable; urgency=low
+
+  * Changed descriptions, added babel manpage, added kaffe | to java1-runtime
+    to satisfy linitan.
+  * Added babel deps on libxerces-java and lib-gnu.getopt-java, and made babel
+    script use them.
+  * Changed jar uf dtdfiles to just include them in jar cf in compiler/Makefile
+    because the former somehow breaks the build.
+  * Symlinked /usr/share/java/babel.jar and sidl.jar to the versioned files.
+  * Added a README.Debian.html file.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Thu, 21 Nov 2002 08:30:09 -0500
+
+babel (0.7.4-1) unstable; urgency=low
+
+  * First packaging attempt, likely to pose problems.
+  * Doesn't actually build because of some jar/javac error, must rerun
+    "debian/rules build && fakeroot debian/rules binary" again.
+  * Note kludges for CLASSPATH and JAVADOC (which doesn't work).
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Tue, 12 Nov 2002 23:22:13 -0500
--- babel-0.7.4.orig/debian/babel-doc.doc-base
+++ babel-0.7.4/debian/babel-doc.doc-base
@@ -0,0 +1,21 @@
+Document: babel-doc
+Title: Babel/SIDL Documentation
+Author: Tammy Dahlgren, Tom Epperly, Scott Kohn, and Gary Kumfert <components@llnl.gov>
+Abstract: Babel is a compiler for the Scientific Interface Definition Language
+ (SIDL), currently under development as a support tool for parallel simulation
+ codes.  SIDL is in the same "phylum" as CORBA or COM, but with an eye toward
+ future extension to data redistribution on massively parallel architectures.
+ In addition, because of the large amount of existing and very important
+ scientific code written in FORTRAN, SIDL is designed with support for that
+ language in mind.
+Section: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/babel-doc/index.html
+Files: /usr/share/doc/babel-doc/babel101/*.html
+
+Format: PDF
+Files: /usr/share/doc/babel-doc/*/*.pdf.gz
+
+Format: postscript
+Files: /usr/share/doc/babel-doc/*/*.ps.gz
--- babel-0.7.4.orig/debian/babel.docs
+++ babel-0.7.4/debian/babel.docs
@@ -0,0 +1 @@
+debian/README.Debian.html
--- babel-0.7.4.orig/debian/rules
+++ babel-0.7.4/debian/rules
@@ -0,0 +1,69 @@
+#!/usr/bin/make -f
+# Made with the aid of debmake, by Christoph Lameter,
+# based on the sample debian/rules file for GNU hello by Ian Jackson.
+
+package=babel
+export DH_COMPAT=3
+
+stamp-configure:
+	dh_testdir
+	# CLASSPATH because kaffe doesn't include its own runtime by default!
+	# JAVADOC because kaffe's javadoc tries (unsuccessfully) to run Sun's:
+	# "java.lang.ClassNotFoundException: sun/tools/javadoc/Main"
+	CC=gcc-3.2 F77=g77-3.2 CXX=g++-3.2 \
+	  CLASSPATH=/usr/lib/kaffe/jre/lib/rt.jar \
+	  JAVADOC=echo \
+	  ./configure --prefix=/usr
+	touch $@
+
+build: stamp-configure
+	dh_testdir
+	CLASSPATH=/usr/lib/kaffe/jre/lib/rt.jar $(MAKE)
+	touch $@
+
+clean:
+	dh_testdir
+	rm -f stamp-configure build
+	if [ -e Makefile ]; then $(MAKE) distclean; fi
+	dh_clean
+
+install: build
+	$(MAKE) install prefix=`pwd`/debian/tmp/usr
+	ln -s babel-0.7.4.jar debian/tmp/usr/share/java/babel.jar
+	ln -s sidl-0.7.4.jar debian/tmp/usr/share/java/sidl.jar
+
+binary-indep: install
+	dh_testdir -i
+	dh_testroot -i
+	dh_installdirs -i
+	dh_movefiles -i
+	dh_installdocs -i
+	dh_installchangelogs -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch: install
+	dh_testdir -a
+	dh_testroot -a
+	dh_installdirs -a
+	dh_movefiles -a
+	dh_installdocs -a
+	dh_installman -pbabel debian/babel.1
+	dh_installchangelogs -a
+	dh_strip -a
+	dh_makeshlibs -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean checkroot
--- babel-0.7.4.orig/debian/control
+++ babel-0.7.4/debian/control
@@ -0,0 +1,119 @@
+Source: babel
+Section: devel
+Priority: extra
+Maintainer: Adam C. Powell, IV <hazelsct@debian.org>
+Standards-Version: 3.5.7
+Build-Depends: debhelper, gcc-3.2 | c-compiler, g77-3.2 | fortran-compiler, g++-3.2 | c++-compiler, kaffe | java-virtual-machine, python2.2, python2.2-dev, python2.2-numeric, libltdl3-dev, gcj-3.2 | java-compiler, libxerces-java, lib-gnu.getopt-java
+Build-Depends-Indep: latex2html
+
+Package: babel
+Architecture: all
+Section: devel
+Depends: kaffe | java1-runtime, lib-gnu.getopt-java, libxerces-java
+Suggests: babel-doc
+Description: Scientific Interface Definition Language (SIDL) compiler/runtime.
+ Babel is a compiler for the Scientific Interface Definition Language (SIDL),
+ currently under development as a support tool for parallel simulation codes.
+ .
+ SIDL is in the same "phylum" as CORBA or COM, but with an eye toward future
+ extension to data redistribution on massively parallel architectures.  In
+ addition, because of the large amount of existing and very important
+ scientific code written in FORTRAN, SIDL is designed with support for that
+ language in mind.
+ .
+ Babel is written in Java, and currently has backends for: FORTRAN 77, C, C++,
+ Java and Python.
+
+Package: libsidl-java
+Architecture: all
+Section: devel
+Depends: kaffe | java1-runtime
+Description: Scientific Interface Definition Language (SIDL) compiler/runtime.
+ Babel is a compiler for the Scientific Interface Definition Language (SIDL),
+ currently under development as a support tool for parallel simulation codes.
+ .
+ SIDL is in the same "phylum" as CORBA or COM, but with an eye toward future
+ extension to data redistribution on massively parallel architectures.  In
+ addition, because of the large amount of existing and very important
+ scientific code written in FORTRAN, SIDL is designed with support for that
+ language in mind.
+ .
+ Babel is written in Java, and currently has backends for: FORTRAN 77, C, C++,
+ Java and Python.
+ .
+ This package contains the Java SIDL runtime library.
+
+Package: python2.2-babel
+Architecture: any
+Section: interpreters
+Depends: python2.2-numeric
+Description: Scientific Interface Definition Language (SIDL) compiler/runtime.
+ Babel is a compiler for the Scientific Interface Definition Language (SIDL),
+ currently under development as a support tool for parallel simulation codes.
+ .
+ SIDL is in the same "phylum" as CORBA or COM, but with an eye toward future
+ extension to data redistribution on massively parallel architectures.  In
+ addition, because of the large amount of existing and very important
+ scientific code written in FORTRAN, SIDL is designed with support for that
+ language in mind.
+ .
+ Babel is written in Java, and currently has backends for: FORTRAN 77, C, C++,
+ Java and Python.
+ .
+ This package contains the Python runtime module.
+
+Package: libsidl-dev
+Architecture: any
+Section: devel
+Depends: libsidl0.7.4 (= ${Source-Version})
+Description: Scientific Interface Definition Language (SIDL) compiler/runtime.
+ Babel is a compiler for the Scientific Interface Definition Language (SIDL),
+ currently under development as a support tool for parallel simulation codes.
+ .
+ SIDL is in the same "phylum" as CORBA or COM, but with an eye toward future
+ extension to data redistribution on massively parallel architectures.  In
+ addition, because of the large amount of existing and very important
+ scientific code written in FORTRAN, SIDL is designed with support for that
+ language in mind.
+ .
+ Babel is written in Java, and currently has backends for: FORTRAN 77, C, C++,
+ Java and Python.
+ .
+ This package contains the development files for the C and FORTRAN backends.
+
+Package: libsidl0.7.4
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: Scientific Interface Definition Language (SIDL) compiler/runtime.
+ Babel is a compiler for the Scientific Interface Definition Language (SIDL),
+ currently under development as a support tool for parallel simulation codes.
+ .
+ SIDL is in the same "phylum" as CORBA or COM, but with an eye toward future
+ extension to data redistribution on massively parallel architectures.  In
+ addition, because of the large amount of existing and very important
+ scientific code written in FORTRAN, SIDL is designed with support for that
+ language in mind.
+ .
+ Babel is written in Java, and currently has backends for: FORTRAN 77, C, C++,
+ Java and Python.
+ .
+ This package contains the runtime libraries for the C and FORTRAN backends.
+
+Package: babel-doc
+Architecture: all
+Section: doc
+Description: Scientific Interface Definition Language (SIDL) compiler/runtime.
+ Babel is a compiler for the Scientific Interface Definition Language (SIDL),
+ currently under development as a support tool for parallel simulation codes.
+ .
+ SIDL is in the same "phylum" as CORBA or COM, but with an eye toward future
+ extension to data redistribution on massively parallel architectures.  In
+ addition, because of the large amount of existing and very important
+ scientific code written in FORTRAN, SIDL is designed with support for that
+ language in mind.
+ .
+ Babel is written in Java, and currently has backends for: FORTRAN 77, C, C++,
+ Java and Python.
+ .
+ This package contains extensive documentation for babel.
--- babel-0.7.4.orig/debian/babel.1
+++ babel-0.7.4/debian/babel.1
@@ -0,0 +1,12 @@
+.TH petscarch 1 "Babel SIDL compiler" "DEBIAN" \" -*- nroff -*-
+.SH NAME
+babel \- a Scientific Interface Definition Language (SIDL) compiler
+.SH SYNOPSIS
+\fBbabel\fP
+.SH DESCRIPTION
+This is a very preliminary Debian-specific manpage and doesn't describe much.
+For details, install the babel-doc package and read the documentation there.
+.SH BUGS
+I'm sure there are some...
+.SH AUTHOR
+Adam Powell <hazelsct@debian.org>
--- babel-0.7.4.orig/debian/babel-doc.docs
+++ babel-0.7.4/debian/babel-doc.docs
@@ -0,0 +1 @@
+debian/README.Debian.html
--- babel-0.7.4.orig/debian/babel-doc.files
+++ babel-0.7.4/debian/babel-doc.files
@@ -0,0 +1 @@
+usr/share/doc/babel-doc
--- babel-0.7.4.orig/debian/README.Debian.html
+++ babel-0.7.4/debian/README.Debian.html
@@ -0,0 +1,133 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <link rel="icon" type="image/png" media="screen, print" href="favicon.png" />
+   <link rel="shortcut icon" type="image/x-icon" media="screen, print" href="favicon.ico" />
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="Adam C. Powell, IV">
+   <meta name="GENERATOR" content="Mozilla/4.77 [en] (X11; U; Linux 2.4.2-pentiumiii-smp i686) [Netscape]">
+   <title>Debian package for Babel</title>
+</head>
+<body>
+
+<center>
+<h1><a href="http://www-fp.mcs.anl.gov/petsc/">Babel</a> Debian Package Current
+Status</h1></center>
+
+<center>
+<h3>Adam Powell, last modified November 21, 2002 for version
+0.7.4-2</h3></center>
+
+<center>Package files are available
+<a href="http://lyre.mit.edu/~powell/babel/">here</a></center>
+<!--Get up-to-date packages on the
+<a href="http://http.us.debian.org/debian/pool/main/p/petsc/">Debain mirror
+network</a>.</center>-->
+
+<p>This page documents my effort to package the
+<a href="http://www.llnl.gov/CASC/components/babel.html">Babel SIDL
+compiler</a> for the Debian GNU/Linux operating system.&nbsp; The upstream
+authors are at Lawrence Livermore National Laboratories.
+
+<p>Why a Debian package?  Being able to type, "apt-get install babel" is a lot
+easier than downloading, compiling and installing the source.  Also, this
+package puts the various files in their standard Debian places, and includes
+documentation metadata to link the Babel documentation from Debian doc-base
+frontends.  But perhaps most importantly, having a Debian package formalizes
+the process of packaging software which uses Babel and SIDL on Debian (as the
+other packages would just Build-Depend on babel, sidl, python2.2-babel, etc.),
+and if it lives up to its to its promise, that could be quite a lot of
+important scientific software.
+
+<h3>Package description:</h3>
+
+The <tt>babel</tt> source package builds six binary packages:
+
+<ul>
+<li><b><tt>babel</tt></b> has the SIDL compiler itself, which consists of the
+<tt>babel-0.7.4.jar</tt> Java archive (in <tt>/usr/share/java</tt> following
+the <a href="http://www.debian.org/doc/packaging-manuals/java-policy/">(proposed)
+Debian Java policy</a>) and the <tt>/usr/bin/babel</tt> script which runs it,
+along with the <tt>/usr/share/babel</tt> directory which contains
+<tt>sidl.sidl</tt>, the <tt>.dtd</tt> files, and the <tt>repository</tt>
+subdirectory.</li>
+
+<li><b><tt>libsidl-java</tt></b> has the <tt>sidl-0.7.4.jar</tt> runtime Java
+archive file.</li>
+
+<li><b><tt>libsidl0.7.4</tt></b>* has the shared runtime library.</li>
+
+<li><b><tt>libsidl-dev</tt></b>* has the static runtime library, headers, and
+symlinks needed to develop against the shared library.</li>
+
+<li><b><tt>python2.2-babel</tt></b>* has the python modules and headers.</li>
+
+<li><b><tt>babel-doc</tt></b> has all of the documentation which ships with the
+source (ps, pdf, ppt), along with Debian <tt>doc-base</tt> metadata so this
+documentation is indexed in frontends like <tt>dhelp</tt> and
+<tt>dwww</tt>.</li>
+</ul>
+*Architecture-dependent packages.
+
+<h3>Questions/issues:</h3>
+
+<ol>
+<li>With the original makefile, the package build fails while <tt>make</tt>ing
+the <tt>force-jarfile</tt> target in the <tt>compiler</tt> subdirectory.  This
+is because of <a href="http://bugs.debian.org/number">bug number in kaffe</a>,
+whose <tt>jar uf</tt> function is broken.<p>
+
+In package release 0.7.4-2, the makefile is patched to solve this problem.</li>
+
+<li>The <tt>babel</tt> source ships with several other <tt>.jar</tt> files
+which it seems to need.  However, it builds just fine using standard Debian
+versions of these, such as <tt>gnu.getopt-1.0.9.jar</tt> in the
+<tt>lib-gnu.getopt-java</tt> package, and <tt>xerxes-1.4.4.jar</tt> in the
+<tt>libxerxes-java</tt> package.  The other three (<tt>jcert-X.jar</tt>,
+<tt>jnet-X.jar</tt> and <tt>jsse-X.jar</tt>) are from the Sun JDK, which is not
+distributable in Debian free, but on the bright side, is necessary only for
+<tt>babel</tt> to access the .</li>
+
+<li>I've moved around a bunch of the install directories, and adjusted scripts
+accordingly.  But are directories like <tt>/usr/share/repository</tt> actually
+supposed to be there, <i>e.g.</i> are they specified in the LSB somewhere that
+I just don't know about?  As it is, I've just put those in
+<tt>/usr/share/babel/repository</tt> and adjusted the <tt>/usr/bin/babel</tt>
+script accordingly.</li>
+
+<li>It would be nice if variables like <tt>docdir</tt>, <tt>jardir</tt> and
+<tt>repositorydir</tt> could be defined during the <tt>configure</tt> process,
+that would cut down considerably on the patch size.  At some point I'll
+generate a patch for upstream, perhaps when the next release is made.</li>
+
+<li>For some reason, the package fails to build if <tt>babel</tt> is installed,
+though none of the other packages interfere with it.</li>
+</ol>
+
+<h3>
+To do (in roughly decreasing order of priority):</h3>
+
+<ul>
+<li>Change package descriptions to not start with "Babel is...".</li>
+
+<li>Add <tt>kaffe |</tt> to the java1-runtime dependencies.</li>
+
+<li>Separate the arch-dependent and -independent build parts.  If nothing else,
+this will allow me to upload a package where the arch-indep parts don't quite
+build, and the autobuilders will do their stuff successfully anyway.  Then
+again, since the arch-indep Java stuff is necessary to build the arch-dependent
+stuff, this making work would require separating <tt>babel</tt> into two
+different source packages!  (Otherwise it would build-depend on itself.)</li>
+
+<li>Write a manpage for <tt>/usr/bin/babel</tt>.
+
+<li>Test the <tt>babel</tt> package with the <tt>hello</tt> example
+provided.</li>
+
+<li>Upload <tt>babel</tt>!
+</ul>
+
+<address><a href="./">Adam Powell</a></address>
+
+</body>
+</html>
--- babel-0.7.4.orig/debian/babel.files
+++ babel-0.7.4/debian/babel.files
@@ -0,0 +1,3 @@
+usr/bin/babel
+usr/share/java/babel*.jar
+usr/share/babel
--- babel-0.7.4.orig/debian/copyright
+++ babel-0.7.4/debian/copyright
@@ -0,0 +1,50 @@
+This package was debianized by Adam C. Powell, IV <hazelsct@debian.org> on
+September 17, 2002.
+
+It was downloaded from http://www.llnl.gov/CASC/components/software.html .
+
+Below is the contents of the COPYRIGHT file distributed with babel.  Note that
+the LICENSE file to which it refers is identical to the GNU LGPL, Version 2.1,
+found on Debian systems in the file /usr/share/common-licenses/LGPL-2.1 .
+
+-------------------------------------------------------------------------------
+
+COPYRIGHT NOTICE
+----------------
+
+(c) 1998-2002 by The Regents of the University of California.
+Produced at the Lawrence Livermore National Laboratory.
+Written by Tammy Dahlgren, Tom Epperly, Scott Kohn, and Gary Kumfert
+           <components@llnl.gov>
+UCRL-CODE-2002-054
+All rights reserved.
+
+This file is part of Babel. For more information, see
+http://www.llnl.gov/CASC/components/.
+
+OUR NOTICE
+
+Our Preamble Notice
+
+A. This notice is required to be provided under our contract with the U.S.
+Department of Energy (DOE). This work was produced at the University of
+California, Lawrence Livermore National Laboratory under Contract
+No. W-7405-ENG-48 with the DOE.
+
+B. Neither the United States Government nor the University of California nor
+any of their employees, makes any warranty, express or implied, or assumes any
+liability or responsibility for the accuracy, completeness, or usefulness of
+any information, apparatus, product, or process disclosed, or represents that
+its use would not infringe privately-owned rights.
+
+C. Also, reference herein to any specific commercial products, process, or
+services by trade name, trademark, manufacturer or otherwise does not
+necessarily constitute or imply its endorsement, recommendation, or favoring by
+the United States Government or the University of California. The views and
+opinions of authors expressed herein do not necessarily state or reflect those
+of the United States Government or the University of California, and shall not
+be used for advertising or product endorsement purposes.
+
+The precise terms and conditions for copying, distribution and modification
+appear in the LICENSE file.
+
--- babel-0.7.4.orig/debian/libsidl0.7.4.files
+++ babel-0.7.4/debian/libsidl0.7.4.files
@@ -0,0 +1 @@
+usr/lib/libsidl-0.7.4.so
--- babel-0.7.4.orig/debian/libsidl-java.files
+++ babel-0.7.4/debian/libsidl-java.files
@@ -0,0 +1 @@
+usr/share/java/sidl*.jar
--- babel-0.7.4.orig/debian/libsidl-dev.files
+++ babel-0.7.4/debian/libsidl-dev.files
@@ -0,0 +1,4 @@
+usr/include/*.h
+usr/lib/*.a
+usr/lib/*.la
+usr/lib/libsidl.so
