--- spooles-2.2.orig/debian/changelog
+++ spooles-2.2/debian/changelog
@@ -0,0 +1,8 @@
+spooles (2.2-1) unstable; urgency=low
+
+  * First Debianization of SPOOLES (closes: #462867).
+  * Added shared libraries to original static-only distribution.
+  * Building docs in main documentation directory, not */doc directories yet.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Sun, 27 Jan 2008 20:10:36 -0500
+
--- spooles-2.2.orig/debian/copyright
+++ spooles-2.2/debian/copyright
@@ -0,0 +1,14 @@
+This package was debianized by Adam C. Powell, IV <hazelsct@debian.org> on
+January 27, 2008.
+
+It was downloaded from http://www.netlib.org/linalg/spooles/
+
+SPOOLES is public domain, as described in lines 70-76 of spooles.2.2.html:
+
+This release is entirely within the public domain; 
+there are no licensing restrictions,
+and there is no warranty of any sort.
+</b>
+</p><p>
+Contact <tt>cleve.ashcraft@boeing.com</tt> for more information, 
+comments and bug reports.
--- spooles-2.2.orig/debian/rules
+++ spooles-2.2/debian/rules
@@ -0,0 +1,99 @@
+#!/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=spooles
+
+# Support multiple makes at once
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+NJOBS := 1
+endif
+
+unpatch:
+	dh_testdir
+	if [ -e patch-stamp ]; then \
+	  patch -p1 -R < debian/patch-latex-usepackage; \
+	  patch -p1 -R < debian/patch-shared-libs; \
+	  patch -p1 -R < debian/patch-makefiles; \
+	  rm -f patch-stamp; \
+	fi
+
+clean:
+	dh_testdir
+	dh_clean
+	make clean
+	rm -f */*/*.lo
+	debian/rules unpatch
+	rm -f *-stamp
+
+patch-stamp:
+	dh_testdir
+	if [ ! -e patch-stamp ]; then \
+	  patch -p1 < debian/patch-makefiles; \
+	  patch -p1 < debian/patch-shared-libs; \
+	  patch -p1 < debian/patch-latex-usepackage; \
+	  touch $@; \
+	fi
+
+build: build-stamp
+build-stamp: patch-stamp
+	make lib
+	touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp: patch-stamp
+	for texdocdir in AllInOne FrontTrees ReferenceManual; do \
+	  (cd documentation/$$texdocdir; \
+	   latex main; \
+	   latex main; \
+	   latex main; \
+	   dvips main -o $$texdocdir.ps); \
+	done
+	touch $@
+
+install-arch: build
+	dh_testdir
+	install -d debian/tmp/usr/lib
+	cp -a libspooles* debian/tmp/usr/lib/
+	for headerfile in `find . -name \*.h -print`; do \
+	  install -D $$headerfile debian/tmp/usr/include/spooles/$$headerfile;\
+	done
+
+install-indep: build-indep
+
+binary-indep: install-indep
+	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-arch
+	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 install-arch install-indep build build-indep
--- spooles-2.2.orig/debian/control
+++ spooles-2.2/debian/control
@@ -0,0 +1,39 @@
+Source: spooles
+Section: math
+Priority: extra
+Maintainer: Adam C. Powell, IV <hazelsct@debian.org>
+Standards-Version: 3.7.3.0
+Build-Depends: debhelper (>= 3.0)
+Build-Depends-Indep: texlive-latex-base, texlive-generic-extra
+Homepage: http://www.netlib.org/linalg/spooles/
+
+Package: libspooles-dev
+Architecture: any
+Section: libdevel
+Depends: libspooles2.2 (= ${binary:Version})
+Suggests: spooles-doc
+Description: SPOOLES SParse Object Oriented Linear Equations Solver development files
+ SPOOLES is a library for solving sparse real and complex linear systems of
+ equations, written in the C language using object oriented design.
+ .
+ This package contains the SPOOLES development files.
+
+Package: libspooles2.2
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: SPOOLES SParse Object Oriented Linear Equations Solver shared library
+ SPOOLES is a library for solving sparse real and complex linear systems of
+ equations, written in the C language using object oriented design.
+ .
+ This package contains the SPOOLES shared library.
+
+Package: spooles-doc
+Architecture: all
+Section: doc
+Suggests: libspooles2.2-dev
+Description: SPOOLES numerical simulation pre- and post-processor documentation
+ SPOOLES is a library for solving sparse real and complex linear systems of
+ equations, written in the C language using object oriented design.
+ .
+ This package contains the documentation for SPOOLES.
--- spooles-2.2.orig/debian/compat
+++ spooles-2.2/debian/compat
@@ -0,0 +1 @@
+5
--- spooles-2.2.orig/debian/patch-latex-usepackage
+++ spooles-2.2/debian/patch-latex-usepackage
@@ -0,0 +1,33 @@
+--- spooles-2.2/documentation/AllInOne/main.tex~	1999-01-13 20:33:25.000000000 +0000
++++ spooles-2.2/documentation/AllInOne/main.tex	2008-01-27 21:12:09.000000000 +0000
+@@ -12,7 +12,7 @@
+ \parskip        3 pt plus 1 pt minus 1 pt
+ 
+ \makeindex
+-\input psfig
++\usepackage{psfig}
+ 
+ \newcommand{\bfi}{{\bf i}}
+ \newcommand{\bfj}{{\bf j}}
+--- spooles-2.2/documentation/FrontTrees/main.tex~	1998-12-05 21:28:54.000000000 +0000
++++ spooles-2.2/documentation/FrontTrees/main.tex	2008-01-27 21:12:56.000000000 +0000
+@@ -12,7 +12,7 @@
+ \parskip        3 pt plus 1 pt minus 1 pt
+ 
+ \makeindex
+-\input psfig
++\usepackage{psfig}
+ 
+ \newcommand{\bfi}{{\bf i}}
+ \newcommand{\bfj}{{\bf j}}
+--- spooles-2.2/documentation/ReferenceManual/main.tex~	1999-01-16 18:05:40.000000000 +0000
++++ spooles-2.2/documentation/ReferenceManual/main.tex	2008-01-27 21:13:19.000000000 +0000
+@@ -14,7 +14,7 @@
+ \parskip        3 pt plus 1 pt minus 1 pt
+ 
+ \makeindex
+-\input psfig
++\usepackage{psfig}
+ 
+ \newcommand{\bfi}{{\bf i}}
+ \newcommand{\bfj}{{\bf j}}
--- spooles-2.2.orig/debian/patch-makefiles
+++ spooles-2.2/debian/patch-makefiles
@@ -0,0 +1,47 @@
+--- spooles-2.2/Make.inc~	1999-01-18 16:48:55.000000000 -0500
++++ spooles-2.2/Make.inc	2008-01-27 13:17:26.000000000 -0500
+@@ -12,7 +12,7 @@
+ # for solaris
+ #
+ # CC = gcc
+-  CC = /usr/lang-4.0/bin/cc
++#  CC = /usr/lang-4.0/bin/cc
+ #
+ # for sgi
+ #
+@@ -28,7 +28,7 @@
+ # 
+ # OPTLEVEL = 
+ # OPTLEVEL = -g -v
+-  OPTLEVEL = -O
++  OPTLEVEL = -O2
+ # OPTLEVEL = -xO5 -v
+ # OPTLEVEL = -O3
+ # OPTLEVEL = -O4
+@@ -43,7 +43,7 @@
+ #  set any load flags
+ #
+ #  LDFLAGS = -Wl,+parallel -Wl,+tm,spp2000 # for hp exemplar
+-   LDFLAGS =
++#   LDFLAGS =
+ #
+ #---------------------------------------------------------------------
+ #
+@@ -103,7 +103,7 @@
+ #  MPI install library
+ #
+ # MPI_INSTALL_DIR = 
+-  MPI_INSTALL_DIR = /usr/local/mpich-1.0.13
++  MPI_INSTALL_DIR = /usr/lib/openmpi
+ #
+ #---------------------------------------------------------------------
+ #
+@@ -115,7 +115,7 @@
+ #
+ # for solaris
+ #
+-  MPI_LIB_PATH = -L$(MPI_INSTALL_DIR)/lib/solaris/ch_p4
++  MPI_LIB_PATH = -L$(MPI_INSTALL_DIR)/lib/
+ #
+ # for hp
+ #
--- spooles-2.2.orig/debian/patch-shared-libs
+++ spooles-2.2/debian/patch-shared-libs
@@ -0,0 +1,36 @@
+--- spooles-2.2/makeLib~	1998-12-16 12:47:58.000000000 -0500
++++ spooles-2.2/makeLib	2008-01-27 14:31:13.000000000 -0500
+@@ -64,14 +64,19 @@
+    $srcname = " \\\n     " . $src ;
+    print $srcname ;
+ }
++print "\n\n.SUFFIXES: .c .o .lo .a .so" ;
+ print "\n\nOBJ_FILES = \$\{SRC:.c=.o\}" ;
++print "\n\nLOBJ_FILES = \$\{SRC:.c=.lo\}" ;
+ print "\n\n" ;
+ print <<'EOF' ;
+ .c.o :
+ 	$(PURIFY) $(CC) -c $(CFLAGS) $*.c -o $(OBJ)_$*.o
+ 
+-../../spooles.a : ${OBJ_FILES}
+-	$(AR) $(ARFLAGS) ../../spooles.a $(OBJ)_*.o
++.c.lo :
++	$(PURIFY) $(CC) -c $(CFLAGS) $*.c -fPIC -DPIC -o $(OBJ)_$*.lo
++
++../../libspooles.a : ${OBJ_FILES} ${LOBJ_FILES}
++	$(AR) $(ARFLAGS) ../../libspooles.a $(OBJ)_*.o
+ 	rm -f $(OBJ)_*.o
+-	$(RANLIB) ../../spooles.a
++	$(RANLIB) ../../libspooles.a
+ EOF
+--- spooles-2.2/makefile~	1999-01-25 15:39:39.000000000 -0500
++++ spooles-2.2/makefile	2008-01-27 14:35:17.000000000 -0500
+@@ -123,6 +123,8 @@
+ 	cd Utilities        ; make lib
+ 	cd ZV               ; make lib
+ 	cd misc             ; make lib
++	gcc -shared */*/*.lo -Wl,-soname,libspooles.so.2.2 -o libspooles.so.2.2
++	ln -s libspooles.so.2.2 libspooles.so
+ #cd MPI              ; make lib
+ #cd MT               ; make lib
+ 
--- spooles-2.2.orig/debian/libspooles2.2.files
+++ spooles-2.2/debian/libspooles2.2.files
@@ -0,0 +1 @@
+usr/lib/*.so.*
--- spooles-2.2.orig/debian/spooles-doc.docs
+++ spooles-2.2/debian/spooles-doc.docs
@@ -0,0 +1,5 @@
+documentation/AllInOne/AllInOne.ps
+documentation/FrontTrees/FrontTrees.ps
+documentation/ReferenceManual/ReferenceManual.ps
+documentation/PP99/ASHCRAFC.ps.gz
+spooles.2.2.html
--- spooles-2.2.orig/debian/libspooles-dev.files
+++ spooles-2.2/debian/libspooles-dev.files
@@ -0,0 +1,3 @@
+usr/lib/*.so
+usr/lib/*.a
+usr/include/*
