--- babel-0.8.0.orig/runtime/Makefile.am
+++ babel-0.8.0/runtime/Makefile.am
@@ -166,6 +166,9 @@
 	@-if test "X$(srcdir)" != "X."; then				\
 	  echo $(RM) -rf python;						\
 	  $(RM) -rf python;						\
+	else \
+	  echo $(RM) -rf python/build; \
+	  $(RM) -rf python/build; \
 	fi
 
 clean-local-python2:
@@ -186,6 +189,9 @@
 	@-if test "X$(srcdir)" != "X."; then				\
 	  echo $(RM) -rf python;						\
 	  $(RM) -rf python;						\
+	else \
+	  echo $(RM) -rf python/build; \
+	  $(RM) -rf python/build; \
 	fi
 
 dist-hook-python: all-local-python
--- babel-0.8.0.orig/runtime/Makefile.in
+++ babel-0.8.0/runtime/Makefile.in
@@ -699,6 +699,9 @@
 	@-if test "X$(srcdir)" != "X."; then				\
 	  echo $(RM) -rf python;						\
 	  $(RM) -rf python;						\
+	else \
+	  echo $(RM) -rf python/build; \
+	  $(RM) -rf python/build; \
 	fi
 
 clean-local-python2:
@@ -719,6 +722,9 @@
 	@-if test "X$(srcdir)" != "X."; then				\
 	  echo $(RM) -rf python;						\
 	  $(RM) -rf python;						\
+	else \
+	  echo $(RM) -rf python/build; \
+	  $(RM) -rf python/build; \
 	fi
 
 dist-hook-python: all-local-python
--- babel-0.8.0.orig/runtime/sidl/Makefile.am
+++ babel-0.8.0/runtime/sidl/Makefile.am
@@ -34,7 +34,8 @@
                    no-installman no-texinfo.tex 1.5
 
 VERSION=@VERSION@
-data_DATA = sidl.sidl
+sharedir = $(datadir)/babel-$(VERSION)
+share_DATA = sidl.sidl
 
 if SUPPORT_FORTRAN77 
 FORTRAN_SOURCES = SIDLfortran.c SIDLfortarray.c
@@ -73,7 +74,7 @@
 libsidl_la_LDFLAGS = -no-undefined -release $(VERSION)
 
 AM_CPPFLAGS = -DHAVE_LTDL $(JNI_INCLUDES)
-EXTRA_DIST = $(data_DATA) $(RUNTIME_ONLY_FILES) ltdl.h ignore_me.h.in babel.make
+EXTRA_DIST = $(share_DATA) $(RUNTIME_ONLY_FILES) ltdl.h ignore_me.h.in babel.make
 
 HEADERS_ABBREV = \
 	SIDL_bool_fAbbrev.h \
--- babel-0.8.0.orig/runtime/sidl/Makefile.in
+++ babel-0.8.0/runtime/sidl/Makefile.in
@@ -193,7 +193,9 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-data_DATA = sidl.sidl
+sharedir = $(datadir)/babel-$(VERSION)
+share_DATA = sidl.sidl
+
 @SUPPORT_FORTRAN77_FALSE@@SUPPORT_FORTRAN90_TRUE@FORTRAN_SOURCES = SIDLfortran.c SIDLfortarray.c
 
 @SUPPORT_FORTRAN77_TRUE@FORTRAN_SOURCES = SIDLfortran.c SIDLfortarray.c
@@ -220,7 +222,7 @@
 libsidl_la_LDFLAGS = -no-undefined -release $(VERSION)
 
 AM_CPPFLAGS = -DHAVE_LTDL $(JNI_INCLUDES)
-EXTRA_DIST = $(data_DATA) $(RUNTIME_ONLY_FILES) ltdl.h ignore_me.h.in babel.make
+EXTRA_DIST = $(share_DATA) $(RUNTIME_ONLY_FILES) ltdl.h ignore_me.h.in babel.make
 
 HEADERS_ABBREV = \
 	SIDL_bool_fAbbrev.h \
@@ -423,7 +425,6 @@
 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 DIST_SOURCES = $(am__libsidl_la_SOURCES_DIST)
-DATA = $(data_DATA)
 
 HEADERS = $(include_HEADERS) $(nodist_execincl_HEADERS)
 
@@ -513,24 +514,6 @@
 distclean-libtool:
 	-rm -f libtool
 uninstall-info-am:
-dataDATA_INSTALL = $(INSTALL_DATA)
-install-dataDATA: $(data_DATA)
-	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(datadir)
-	@list='$(data_DATA)'; for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " $(dataDATA_INSTALL) $$d$$p $(DESTDIR)$(datadir)/$$f"; \
-	  $(dataDATA_INSTALL) $$d$$p $(DESTDIR)$(datadir)/$$f; \
-	done
-
-uninstall-dataDATA:
-	@$(NORMAL_UNINSTALL)
-	@list='$(data_DATA)'; for p in $$list; do \
-	  f="`echo $$p | sed -e 's|^.*/||'`"; \
-	  echo " rm -f $(DESTDIR)$(datadir)/$$f"; \
-	  rm -f $(DESTDIR)$(datadir)/$$f; \
-	done
 includeHEADERS_INSTALL = $(INSTALL_HEADER)
 install-includeHEADERS: $(include_HEADERS)
 	@$(NORMAL_INSTALL)
@@ -568,6 +551,25 @@
 	  rm -f $(DESTDIR)$(execincldir)/$$f; \
 	done
 
+shareDATA_INSTALL = $(INSTALL_DATA)
+install-shareDATA: $(share_DATA)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(sharedir)
+	@list='$(share_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(shareDATA_INSTALL) $$d$$p $(DESTDIR)$(sharedir)/$$f"; \
+	  $(shareDATA_INSTALL) $$d$$p $(DESTDIR)$(sharedir)/$$f; \
+	done
+
+uninstall-shareDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(share_DATA)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(sharedir)/$$f"; \
+	  rm -f $(DESTDIR)$(sharedir)/$$f; \
+	done
+
 ETAGS = etags
 ETAGSFLAGS =
 
@@ -655,10 +657,10 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) babel_config.h
+all-am: Makefile $(LTLIBRARIES) $(HEADERS) babel_config.h
 
 installdirs:
-	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(datadir) $(DESTDIR)$(includedir) $(DESTDIR)$(execincldir)
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(sharedir) $(DESTDIR)$(includedir) $(DESTDIR)$(execincldir)
 
 install: install-am
 install-exec: install-exec-am
@@ -702,7 +704,7 @@
 
 info-am:
 
-install-data-am: install-dataDATA install-includeHEADERS
+install-data-am: install-shareDATA install-includeHEADERS
 
 install-exec-am: install-libLTLIBRARIES install-nodist_execinclHEADERS
 
@@ -729,7 +731,7 @@
 
 ps-am:
 
-uninstall-am: uninstall-dataDATA uninstall-includeHEADERS \
+uninstall-am: uninstall-includeHEADERS \
 	uninstall-libLTLIBRARIES uninstall-nodist_execinclHEADERS
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
@@ -737,14 +739,14 @@
 	distclean-compile distclean-generic distclean-hdr \
 	distclean-libtool distclean-tags distdir dvi dvi-am info \
 	info-am install install-am install-data install-data-am \
-	install-dataDATA install-exec install-exec-am \
+	install-exec install-exec-am install-shareDATA \
 	install-includeHEADERS install-info install-info-am \
 	install-libLTLIBRARIES install-man \
 	install-nodist_execinclHEADERS install-strip installcheck \
 	installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-dataDATA \
+	tags uninstall uninstall-am \
 	uninstall-includeHEADERS uninstall-info-am \
 	uninstall-libLTLIBRARIES uninstall-nodist_execinclHEADERS
 
--- babel-0.8.0.orig/bin/babel.in
+++ babel-0.8.0/bin/babel.in
@@ -64,9 +64,11 @@
 #test if $0 is the same inode as where babel script is installed.
 path2me=$0
 myname=babel
+SYSJAR=/usr/share/java
 is_installed="false"
 if $TEST_EF ${bindir}/${myname} -ef $path2me; then 
   is_installed="true"
+  BABELJAR="${datadir}/java"
   if $verbose; then 
      echo "Just use paths determined at configure time to find jar files..."
   fi
@@ -111,6 +113,7 @@
     exit -1 
   fi 
   cd $PWD_SAVE
+  BABELJAR="${prefix}/lib"
 fi
 if $verbose; then 
   echo "  prefix=\"${prefix}\""
@@ -121,17 +124,17 @@
 #
 # Set the CLASSPATH based on the BABEL home directory
 #
-if test -e ${prefix}/lib/${PACKAGE}-${VERSION}.jar; then
+if test -e ${BABELJAR}/${PACKAGE}-${VERSION}.jar; then
   if $verbose; then
-    echo "Looking for jar files in \"${prefix}/lib\"...";
+    echo "Looking for jar files in \"${BABELJAR}\"...";
   fi
 else 
   echo "ERROR: $0 " >&2
-  echo "   Expected to find ${prefix}/lib/${PACKAGE}-${VERSION}.jar" >&2
+  echo "   Expected to find ${BABELJAR}/${PACKAGE}-${VERSION}.jar" >&2
   exit 1
 fi
 
-BABELCP=${prefix}/lib/${PACKAGE}-${VERSION}.jar:${prefix}/lib/java-getopt-1.0.7.jar:${prefix}/lib/xerces-1.1.1.jar:${prefix}/lib/jcert-1.0.1.jar:${prefix}/lib/jnet-1.0.1.jar:${prefix}/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
@@ -187,9 +190,9 @@
 
 if $verbose; then 
   echo ${JAVA} \
-    -classpath "${CLASSPATH}" \
+    -addclasspath "${CLASSPATH}" \
     gov.llnl.babel.CommandLineDriver ${REPOSITORY_PATH} ${args}
 fi;
 ${JAVA} \
-  -classpath "${CLASSPATH}" \
+  -addclasspath "${CLASSPATH}" \
   gov.llnl.babel.CommandLineDriver ${REPOSITORY_PATH} ${args}
--- babel-0.8.0.orig/doc/Makefile.am
+++ babel-0.8.0/doc/Makefile.am
@@ -13,7 +13,7 @@
 
 SUBDIRS = babel101 html papers talks manuals
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc
 doc_DATA = index.html
 EXTRA_DIST = $(doc_DATA)
 
--- babel-0.8.0.orig/doc/Makefile.in
+++ babel-0.8.0/doc/Makefile.in
@@ -192,7 +192,7 @@
 
 SUBDIRS = babel101 html papers talks manuals
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc
 doc_DATA = index.html
 EXTRA_DIST = $(doc_DATA)
 subdir = doc
--- babel-0.8.0.orig/doc/index.html
+++ babel-0.8.0/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.8.0.orig/doc/babel101/Makefile.am
+++ babel-0.8.0/doc/babel101/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/babel101
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/babel101
 
 docdata = \
   Babel101.html \
--- babel-0.8.0.orig/doc/babel101/Makefile.in
+++ babel-0.8.0/doc/babel101/Makefile.in
@@ -190,7 +190,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/babel101
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/babel101
 
 docdata = \
   Babel101.html \
--- babel-0.8.0.orig/doc/html/Makefile.am
+++ babel-0.8.0/doc/html/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/compiler-javadoc
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/compiler-javadoc
 
 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.8.0.orig/doc/html/Makefile.in
+++ babel-0.8.0/doc/html/Makefile.in
@@ -191,7 +191,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/compiler-javadoc
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/compiler-javadoc
 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
@@ -409,8 +409,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.8.0.orig/doc/papers/Makefile.am
+++ babel-0.8.0/doc/papers/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/papers
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/papers
 
 doc_DATA = \
   hpdc99.pdf \
--- babel-0.8.0.orig/doc/papers/Makefile.in
+++ babel-0.8.0/doc/papers/Makefile.in
@@ -190,7 +190,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/papers
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/papers
 
 doc_DATA = \
   hpdc99.pdf \
--- babel-0.8.0.orig/doc/talks/Makefile.am
+++ babel-0.8.0/doc/talks/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/talks
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/talks
 
 doc_DATA = \
   siam98.pdf \
--- babel-0.8.0.orig/doc/talks/Makefile.in
+++ babel-0.8.0/doc/talks/Makefile.in
@@ -190,7 +190,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/talks
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/talks
 
 doc_DATA = \
   siam98.pdf \
--- babel-0.8.0.orig/doc/manuals/Makefile.am
+++ babel-0.8.0/doc/manuals/Makefile.am
@@ -11,7 +11,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                    no-installman no-texinfo.tex 1.5
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/manuals
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/manuals
 
 doc_DATA = users_guide.pdf users_guide.ps #ref_manual.pdf ref_manual.ps 
 
--- babel-0.8.0.orig/doc/manuals/Makefile.in
+++ babel-0.8.0/doc/manuals/Makefile.in
@@ -190,7 +190,7 @@
                    no-installman no-texinfo.tex 1.5
 
 
-docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/manuals
+docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)-doc/manuals
 
 doc_DATA = users_guide.pdf users_guide.ps #ref_manual.pdf ref_manual.ps 
 subdir = doc/manuals
--- babel-0.8.0.orig/compiler/Makefile.am
+++ babel-0.8.0/compiler/Makefile.am
@@ -79,13 +79,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.8.0.orig/compiler/Makefile.in
+++ babel-0.8.0/compiler/Makefile.in
@@ -388,13 +388,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.8.0.orig/lib/Makefile.am
+++ babel-0.8.0/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.8.0.orig/lib/Makefile.in
+++ babel-0.8.0/lib/Makefile.in
@@ -193,7 +193,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.8.0.orig/debian/python2.2-babel.files
+++ babel-0.8.0/debian/python2.2-babel.files
@@ -0,0 +1,2 @@
+usr/lib/python*
+usr/include/python*
--- babel-0.8.0.orig/debian/rules
+++ babel-0.8.0/debian/rules
@@ -0,0 +1,70 @@
+#!/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
+	# JAVADOC because kaffe's javadoc tries (unsuccessfully) to run Sun's:
+	# "java.lang.ClassNotFoundException: sun/tools/javadoc/Main"
+	# Likewise for jdb.
+	JAVADOC=echo JDB=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
+	rm -f lib/babel*.jar lib/sidl*.jar
+	dh_clean
+
+# TODO: change these symlinks to alternatives links in postinst/prerm.
+# Move babel to babel-0.8.0, alternative symlink to that, with manpage slave.
+install: build
+	$(MAKE) install prefix=`pwd`/debian/tmp/usr
+	ln -s babel-0.8.0.jar debian/tmp/usr/share/java/babel.jar
+	ln -s sidl-0.8.0.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_installman -pbabel-0.8.0 debian/babel.1
+	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_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.8.0.orig/debian/changelog
+++ babel-0.8.0/debian/changelog
@@ -0,0 +1,31 @@
+babel (0.8.0-1) unstable; urgency=low
+
+  * New upstream.
+  * Changed package names to babel-$(VERSION) so multiple versions can be
+    installed (following upstream convention for /usr/share subdirs).
+  * Switched from gcc-3.2 and friends back to (implicit) gcc.
+  * Lots of minute changes to patches, too numerous to describe.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Tue,  4 Feb 2003 11:36:10 -0500
+
+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.8.0.orig/debian/README.Debian.html
+++ babel-0.8.0/debian/README.Debian.html
@@ -0,0 +1,124 @@
+<!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.llnl.gov/CASC/components/babel.html">Babel</a> Debian
+Package Current Status</h1></center>
+
+<center>
+<h3>Adam Powell, last modified February 4, 2003 for version
+0.8.0-1</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-0.8.0</tt></b> has the SIDL compiler itself, which consists of
+the <tt>babel-0.8.0.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-0.8.0</tt> directory which contains
+<tt>sidl.sidl</tt>, the <tt>.dtd</tt> files, and the <tt>repository</tt>
+subdirectory.</li>
+
+<li><b><tt>libsidl0.8.0-java</tt></b> has the <tt>sidl-0.8.0.jar</tt> runtime
+Java archive file.</li>
+
+<li><b><tt>libsidl0.8.0</tt></b>* has the C runtime shared library.</li>
+
+<li><b><tt>libsidl-dev</tt></b>* has the C runtime static library, headers, and
+symlinks needed to develop against the shared library.</li>
+
+<li><b><tt>python2.2-babel</tt></b>* has the python runtime modules and
+headers.</li>
+
+<li><b><tt>babel-0.8.0-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/170059">bug 170059 in kaffe</a>,
+whose <tt>jar uf</tt> function is broken.<p>
+
+In packages from 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>libgetopt-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 is necessary only for <tt>babel</tt> to
+access the
+<a href="http://www.llnl.gov/CASC/components/alexandria.html">Alexandria</a>
+component repository.</li>
+
+<li>It would be nice if variables like <tt>docdir</tt> and <tt>jardir</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.</li>
+</ol>
+
+<h3>
+To do (in roughly decreasing order of priority):</h3>
+
+<ul>
+<li>Upload <tt>babel</tt>!
+
+<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 better manpage for <tt>/usr/bin/babel</tt> and contribute it
+upstream.</li>
+
+<li>Test the <tt>babel</tt> package with the <tt>hello</tt> example
+provided.</li>
+</ul>
+
+<address><a href="./">Adam Powell</a></address>
+
+</body>
+</html>
--- babel-0.8.0.orig/debian/control
+++ babel-0.8.0/debian/control
@@ -0,0 +1,121 @@
+Source: babel
+Section: devel
+Priority: extra
+Maintainer: Adam C. Powell, IV <hazelsct@debian.org>
+Standards-Version: 3.5.7
+Build-Depends: debhelper (>= 3.0), gcc | c-compiler, g77 | fortran-compiler, g++ | c++-compiler, kaffe | java-virtual-machine, python2.2, python2.2-dev, python2.2-numeric, libltdl3-dev, gcj | java-compiler, libxerces-java, libgetopt-java
+Build-Depends-Indep: latex2html
+
+Package: babel-0.8.0
+Architecture: all
+Section: devel
+Depends: kaffe | java1-runtime, libgetopt-java, libxerces-java
+Suggests: babel-0.8.0-doc
+Provides: babel
+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: libsidl0.8.0-java
+Architecture: all
+Section: devel
+Depends: kaffe | java1-runtime
+Provides: libsidl-java
+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.8.0 (= ${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.8.0
+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-0.8.0-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.8.0.orig/debian/libsidl0.8.0.files
+++ babel-0.8.0/debian/libsidl0.8.0.files
@@ -0,0 +1 @@
+usr/lib/libsidl-*.so
--- babel-0.8.0.orig/debian/babel.1
+++ babel-0.8.0/debian/babel.1
@@ -0,0 +1,12 @@
+.TH babel 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.8.0.orig/debian/libsidl0.8.0-java.files
+++ babel-0.8.0/debian/libsidl0.8.0-java.files
@@ -0,0 +1 @@
+usr/share/java/sidl*.jar
--- babel-0.8.0.orig/debian/babel-0.8.0.files
+++ babel-0.8.0/debian/babel-0.8.0.files
@@ -0,0 +1,3 @@
+usr/bin/babel
+usr/share/java/babel*.jar
+usr/share/babel-0.8.0
--- babel-0.8.0.orig/debian/babel-0.8.0-doc.doc-base
+++ babel-0.8.0/debian/babel-0.8.0-doc.doc-base
@@ -0,0 +1,21 @@
+Document: babel-0.8.0-doc
+Title: Babel/SIDL Version 0.8.0 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-0.8.0-doc/index.html
+Files: /usr/share/doc/babel-0.8.0-doc/babel101/*.html
+
+Format: PDF
+Files: /usr/share/doc/babel-0.8.0-doc/*/*.pdf.gz
+
+Format: postscript
+Files: /usr/share/doc/babel-0.8.0-doc/*/*.ps.gz
--- babel-0.8.0.orig/debian/copyright
+++ babel-0.8.0/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.8.0.orig/debian/babel-0.8.0-doc.files
+++ babel-0.8.0/debian/babel-0.8.0-doc.files
@@ -0,0 +1 @@
+usr/share/doc/babel-0.8.0-doc
--- babel-0.8.0.orig/debian/babel-0.8.0.docs
+++ babel-0.8.0/debian/babel-0.8.0.docs
@@ -0,0 +1 @@
+debian/README.Debian.html
--- babel-0.8.0.orig/debian/libsidl-dev.files
+++ babel-0.8.0/debian/libsidl-dev.files
@@ -0,0 +1,4 @@
+usr/include/*.h
+usr/lib/*.a
+usr/lib/*.la
+usr/lib/libsidl.so
--- babel-0.8.0.orig/debian/babel-0.8.0-doc.docs
+++ babel-0.8.0/debian/babel-0.8.0-doc.docs
@@ -0,0 +1 @@
+debian/README.Debian.html
