--- parmetis-3.0.orig/ParMETISLib/stdheaders.h
+++ parmetis-3.0/ParMETISLib/stdheaders.h
@@ -22,5 +22,5 @@
 #include <stdarg.h>
 #include <limits.h>
 #include <time.h>
-#include <mpi.h>
+#include <mpi/mpi.h>
 
--- parmetis-3.0.orig/Makefile
+++ parmetis-3.0/Makefile
@@ -9,4 +9,5 @@
 	(cd METISLib ; make clean )
 	(cd ParMETISLib ; make clean )
 	(cd Test ; make clean )
+	rm -f *.a
 
--- parmetis-3.0.orig/Makefile.in
+++ parmetis-3.0/Makefile.in
@@ -1,6 +1,6 @@
 
 # Which compiler to use
-CC = mpicc
+CC = mpicc.mpich
 
 
 # What optimization level to use
--- parmetis-3.0.orig/debian/changelog
+++ parmetis-3.0/debian/changelog
@@ -0,0 +1,6 @@
+parmetis (3.0-1) unstable; urgency=low
+
+  * First packaging attempt, first upload (closes: #186116).
+  * Only static libraries for now, since that's all that upstream generates.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Thu, 27 Mar 2003 20:15:32 -0500
--- parmetis-3.0.orig/debian/rules
+++ parmetis-3.0/debian/rules
@@ -0,0 +1,55 @@
+#!/usr/bin/make -f
+# based on the sample debian/rules file for GNU hello by Ian Jackson.
+
+package=ParMetis
+export DH_COMPAT=3
+ 
+build:
+	dh_testdir
+	$(MAKE) CC=mpicc.mpich
+	touch $@
+
+clean:
+	dh_testdir
+	$(MAKE) clean
+	rm -f build
+	dh_clean
+
+binary-indep:
+	dh_testdir -i
+	dh_testroot -i
+	dh_installdirs -i
+	dh_installdocs -i
+	dh_installexamples -i
+	dh_installchangelogs -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch:
+	dh_testdir -a
+	dh_testroot -a
+	dh_installdirs -a
+	install -d debian/parmetis-dev/usr/lib
+	install *.a debian/parmetis-dev/usr/lib
+	install -d debian/parmetis-dev/usr/include
+	install *.h debian/parmetis-dev/usr/include
+	chmod 644 debian/parmetis-dev/usr/include/*.h
+	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
--- parmetis-3.0.orig/debian/copyright
+++ parmetis-3.0/debian/copyright
@@ -0,0 +1,196 @@
+This is non-free software written by George Karypis et al. and copyrighted by
+the Regents of the University of Minnesota.  It was downloaded from
+http://www-users.cs.umn.edu/~karypis/metis/ and Debianized by Adam Powell
+<hazelsct@debian.org> on March 10, 2003.  The included copyright notice
+follows, along with the email sent by Dr. Karypis authorizing distribution with
+Debian.
+
+Copyright Notice
+----------------
+
+The ParMETIS/METIS package is copyrighted by the Regents of the 
+University of Minnesota. It can be freely used for educational and 
+research purposes by non-profit institutions and US government agencies 
+only.  Other organizations are allowed to use ParMETIS/METIS only for 
+evaluation purposes, and any further uses will require prior approval. 
+The software may not be sold or redistributed without prior approval. 
+One may make copies of the software for their use provided that the 
+copies, are not sold or distributed, are used under the same terms 
+and conditions.
+
+As unestablished research software, this code is provided on an
+``as is'' basis without warranty of any kind, either expressed or
+implied. The downloading, or executing any part of this software
+constitutes an implicit agreement to these terms. These terms and
+conditions are subject to change at any time without prior notice.
+
+Envelope-to: hazelsct@lyre.mit.edu
+Received: from fort-point-station.mit.edu ([18.7.7.76])
+	by lyre.mit.edu with esmtp (Exim 3.35 #1 (Debian))
+	id 18xTv0-0006OM-00
+	for <hazelsct@lyre.mit.edu>; Mon, 24 Mar 2003 10:31:22 -0500
+Received: from mhub-c2.tc.umn.edu (mhub-c2.tc.umn.edu [160.94.128.45])
+	by fort-point-station.mit.edu (8.12.4/8.9.2) with ESMTP id h2OFVLQt023754
+	for <hazelsct@mit.edu>; Mon, 24 Mar 2003 10:31:22 -0500 (EST)
+Received: from PetrosII (falcon.cs.umn.edu [160.94.179.138] (may be forged)) by mhub-c2.tc.umn.edu with ESMTP for hazelsct@mit.edu; Mon, 24 Mar 2003 09:31:21 -0600 (CST)
+From: "George Karypis" <karypis@cs.umn.edu>
+To: "'Adam C Powell IV'" <hazelsct@mit.edu>
+Subject: RE: Distributing ParMETIS with Debian
+Date: Mon, 24 Mar 2003 09:29:03 -0600
+Message-ID: <000f01c2f21a$1a1b8d80$f88010ac@PetrosII>
+MIME-Version: 1.0
+Content-Type: multipart/alternative;
+	boundary="----=_NextPart_000_0010_01C2F1E7.CF82A420"
+X-Priority: 3 (Normal)
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook, Build 10.0.4024
+In-Reply-To: <3E7E0DF8.8090707@mit.edu>
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
+Importance: Normal
+X-Umn-Remote-Mta: [N] falcon.cs.umn.edu #+HF+LO
+
+This is a multi-part message in MIME format.
+
+------=_NextPart_000_0010_01C2F1E7.CF82A420
+Content-Type: text/plain;
+	charset="US-ASCII"
+Content-Transfer-Encoding: 7bit
+
+ 
+Adam,
+ 
+Sure, go ahead and include ParMetis in Debian. There are a couple
+outstanding bugs with the
+current release of ParMetis that I will be fixing soon, but the changes
+will be minimal.
+ 
+George
+
+-----Original Message-----
+From: Adam C Powell IV [mailto:hazelsct@mit.edu] 
+Sent: Sunday, March 23, 2003 1:42 PM
+To: metis@cs.umn.edu
+Subject: Distributing ParMETIS with Debian
+
+
+Greetings,
+
+I am writing to request your permission to distribute ParMETIS with
+Debian GNU/Linux.  Debian (http://www.debian.org/) is an all-volunteer
+distribution of the Linux kernel with thousands of accompanying software
+packages, similar to but much larger than RedHat, SuSE, Mandrake,
+Lindows, etc. (in fact, Lindows is based on Debian's free packages).  I
+am one of the ~850 volunteer maintainers of Debian; I maintain the PETSc
+<http://www-unix.mcs.anl.gov/petsc/>  and Babel
+<http://www.llnl.gov/CASC/components/babel.html>  packages among others.
+Because PETSc can link to ParMETIS, I would like to be able to include
+it in the Debian distribution.
+
+[I am aware of the work of Eray Ozkural to package METIS for Debian, as
+I was his mentor and sponsor when he was doing that work as part of the
+process of becoming a Debian maintainer.  Unfortunately, for various
+reasons his application to become a maintainer was rejected, and his
+packages including METIS removed.  This will thus be a new packaging
+effort by an already-approved maintainer.]
+
+Debian packages are grouped according to the "freedom" of software
+licenses.  Since the ParMETIS license is not "free" by Debian standards
+(http://www.debian.org/intro/free ; basically the same as the Open
+Source  <http://www.opensource.org/docs/definition.php> Definition), it
+would go ino the "non-free" section of Debian, which would alert
+potential users that copying and usage are restricted, so they should
+check the copyright file for such terms.  (The other two sections are
+"main", consisting entirely of free software, and "contrib", consisting
+of free software which depends on non-free software, e.g. when PETSc
+linking to ParMETIS is uploaded, its dependency on non-free ParMETIS
+will require moving it into contrib.)  In every ParMETIS package (static
+libs, shared libs, documentation, etc.), your copyright conditions would
+appear as the file /usr/share/doc/parmetis*/copyright , and users would
+be bound by those terms just as if they downloaded ParMETIS from your
+website.
+
+When/if I receive your permission, I will upload into the Debian archive
+the pristine ParMETIS source tarball, together with a gzipped patch
+containing the Debian packaging, and a third small file with MD5
+checksums of the first two and a list of Debian packages required to
+build ParMETIS binaries; this third file will be GPG-signed by me to
+guarantee the integrity of all three files.  I would thus become the
+"Debian maintainer" of the ParMETIS package, in the same way as I am the
+maintainer of packages for PETSc, Babel, Surface Evolver, and installers
+for the Compaq Alpha Linux compilers.  With your permission, I would
+like to make some small changes, such as building a shared ParMETIS
+library, and fixing any bugs I might find.  I will inform you in advance
+of any such changes, and you will be able to exercise as much or as
+little control over these changes as you like.
+
+The Debian packaging mentioned above consists of a set of scripts and
+definition files for the building of binary Debian packages based on the
+source code.  Taken together, these files serve a similar purpose to the
+spec file for creating RedHat .rpm packages, but with considerably more
+flexibility.  The binary Debian packages will then be built by
+autobuilder machines for all of the target architectures, which
+currently include: IA-32, IA-64, Alpha, Sparc, PowerPC, M68K (yes, there
+are still a bunch of Amiga users around :-), MIPS (big- and
+little-endian), ARM, S/390 and PA-RISC; support for Hitachi SuperH and
+alternate kernels on some of these architectures is in the works.
+
+This packaging will make ParMETIS and packages which depend on it
+considerably easier to use, by allowing users to download, say, a
+parallel fluid dynamics package named "fluids" by typing "apt-get
+install fluids", which would download and install fluids, the ParMETIS
+library, and all other support libraries required to run fluids.  Users
+(who run Debian) will not need to compile or link anything, this work
+will all be done in advance.
+
+If you (and the University of Minnesota) agree to the above, I will
+begin working on the Debian packaging for ParMETIS, and when that
+packaging is complete, will inform you and upload it into Debian.  This
+will place ParMETIS in the "unstable" distribution immediately, and when
+it meets several criteria (no build failures on any architecture, no
+bugs of severity serious or higher, 10 days since upload into unstable),
+it will be moved into the "testing" distribution.  If the package is in
+the "testing" distribution when a release is made, it will be included
+in that "stable" distribution release.
+
+Independent of your decision regarding Debian, I would like to request
+that you (U.Mn. etc.) make the METIS family available under a free/open
+source license of some kind.  For example, the Babel SIDL compiler is
+released under the GNU Lesser General Public license, which among other
+things, eliminates the need for this sort of permission request for
+Debian redistribution (though I am in frequent contact with Babel's
+authors, and consulted them before my initial upload), and also allows
+me to patch it in various ways important to my users.  In your case, you
+might be more interested in the GNU General Public License, which would
+not allow linking into proprietary software packages.  (As the copyright
+holder, you could also license *METIS to companies under separate
+conditions.)  As another example, I have simplified linking of the PETSc
+libraries with C++ code without the extra disk space and build time
+required by the authors' C++ scheme, and patched a problem in PETSc's
+timestepping code; both of those patches were sent to the PETSc authors.
+Thus open source licensing adds value to PETSc, as it does for such
+well-known software as Linux, Apache, Mozilla, GNOME, OpenOffice,
+autoconf/automake/libtool, etc., and could do the same for ParMETIS.
+
+Thank you for your time and attention.  I hope that you will approve of
+my request to package and distribute ParMETIS with Debian, and that you
+will give serious consideration to open source licensing of ParMETIS.
+
+Sincerely,
+
+-- 
+
+Adam Powell	 http://lyre.mit.edu/~powell/
+<http://lyre.mit.edu/%7Epowell/> 	
+Thomas B. King Assistant Professor of Materials Engineering	
+77 Massachusetts Ave. Rm. 4-117	 Phone (617) 452-2086	
+Cambridge, MA 02139 USA	 Fax (617) 253-5418	
+
+
+------=_NextPart_000_0010_01C2F1E7.CF82A420
+Content-Type: text/html;
+	charset="US-ASCII"
+Content-Transfer-Encoding: quoted-printable
+
+[removed to avoid having to read "MSHTML" formatted material]
+
+------=_NextPart_000_0010_01C2F1E7.CF82A420--
--- parmetis-3.0.orig/debian/control
+++ parmetis-3.0/debian/control
@@ -0,0 +1,27 @@
+Source: parmetis
+Section: non-free/math
+Priority: extra
+Maintainer: Adam C. Powell, IV <hazelsct@debian.org>
+Standards-Version: 3.5.8
+Build-Depends: debhelper (>= 3.0), mpich
+
+Package: parmetis-dev
+Architecture: any
+Depends: mpich
+Description: Parallel Graph Partitioning and Sparse Matrix Ordering Library
+ ParMetis computes minimal-cut partitions of graphs and meshes in parallel, and
+ orders variables for minimal fill when using direct solvers for sparse
+ matrices.  It does all this in parallel, and also can efficiently re-partition
+ a graph or mesh whose connectivity has changed.
+ .
+ For now, only static libraries are implemented, as that's all upstream has.
+
+Package: parmetis-doc
+Architecture: all
+Description: Parallel Graph Partitioning and Sparse Matrix Ordering Lib - Docs
+ ParMetis computes minimal-cut partitions of graphs and meshes in parallel, and
+ orders variables for minimal fill when using direct solvers for sparse
+ matrices.  It does all this in parallel, and also can efficiently re-partition
+ a graph or mesh whose connectivity has changed.
+ .
+ This package contains the documentation.
--- parmetis-3.0.orig/debian/parmetis-dev.docs
+++ parmetis-3.0/debian/parmetis-dev.docs
@@ -0,0 +1 @@
+README
--- parmetis-3.0.orig/debian/parmetis-doc.docs
+++ parmetis-3.0/debian/parmetis-doc.docs
@@ -0,0 +1,2 @@
+README
+Manual/*
--- parmetis-3.0.orig/debian/parmetis-doc.examples
+++ parmetis-3.0/debian/parmetis-doc.examples
@@ -0,0 +1,2 @@
+Graphs/*.graph*
+Graphs/*.hex3d
--- parmetis-3.0.orig/debian/parmetis-doc.doc-base
+++ parmetis-3.0/debian/parmetis-doc.doc-base
@@ -0,0 +1,13 @@
+Document: parmetis-doc
+Title: ParMETIS Parallel Graph Partitioning and Sparse Matrix Ordering
+Author: George Karypis
+Abstract: ParMETIS is an MPI-based parallel library that implements a variety
+ of algorithms for partitioning unstructured graphs, meshes, and for computing
+ fill-reducing orderings of sparse matrices.
+Section: Apps/Math
+
+Format: postscript
+Files: /usr/share/doc/parmetis-doc/*.ps.gz
+
+Format: pdf
+Files: /usr/share/doc/parmetis-doc/*.pdf.gz
