--- salome-3.2.6.orig/debian/salome-mpi-c++.patch
+++ salome-3.2.6/debian/salome-mpi-c++.patch
@@ -0,0 +1,29 @@
+--- salome-3.2.6.orig/KERNEL_SRC_3.2.6/configure	2007-04-24 11:35:12.000000000 -0400
++++ salome-3.2.6/KERNEL_SRC_3.2.6/configure	2008-01-08 13:24:25.000000000 +0000
+@@ -23461,7 +23461,7 @@
+   OCC_VERSION_MAJOR=0
+   OCC_VERSION_MINOR=0
+   OCC_VERSION_MAINTENANCE=0
+-  ff=$CASROOT/inc/Standard_Version.hxx
++  ff=$CASROOT/include/opencascade/Standard_Version.hxx
+   if test -f $ff ; then
+     grep "define OCC_VERSION_MAJOR" $ff > /dev/null
+     if test $? = 0 ; then
+@@ -23521,7 +23521,7 @@
+           CAS_CPPFLAGS="$CAS_CPPFLAGS -DOCC_CONVERT_SIGNALS"
+           ;;
+       esac
+-      CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc"
++      CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/include/opencascade"
+       ;;
+    osf*)
+       CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+@@ -28259,7 +28259,7 @@
+ 
+   if test "$WITHMPI" = "yes";then
+     mpi_ok=yes
+-    MPI_LIBS="$MPI_LIBS -lmpi"
++    MPI_LIBS="$MPI_LIBS -lmpi -lmpi++"
+   else
+     mpi_ok=no
+   fi
--- salome-3.2.6.orig/debian/copyright
+++ salome-3.2.6/debian/copyright
@@ -0,0 +1,27 @@
+This package was debianized by Adam C. Powell, IV <hazelsct@debian.org> on
+January 9, 2008.
+
+It was downloaded from http://www.salome-project.org/
+
+The copyright notice is not in any single file but is in files like
+KERNEL_SRC_3.2.6/Makefile.am which includes the following, and refers to the
+GNU Lesser General Public License (LGPL) whose text can be found in:
+/usr/share/common-licenses/LGPL-2.1
+
+# Copyright (C) 2005  OPEN CASCADE, CEA, EDF R&D, LEG
+#           PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either 
+# version 2.1 of the License.
+# 
+# This library is distributed in the hope that it will be useful 
+# but WITHOUT ANY WARRANTY; without even the implied warranty of 
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+# Lesser General Public License for more details.
+# 
+# You should have received a copy of the GNU Lesser General Public  
+# License along with this library; if not, write to the Free Software 
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+# 
+# http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
--- salome-3.2.6.orig/debian/control
+++ salome-3.2.6/debian/control
@@ -0,0 +1,30 @@
+Source: salome
+Section: non-free/science
+Priority: extra
+Maintainer: Adam C. Powell, IV <hazelsct@debian.org>
+Standards-Version: 3.7.3.0
+Build-Depends: debhelper (>= 3.0), python2.4, swig, libhdf5-openmpi-dev | libhdf5-dev, libopencascade6.2-dev | libopencascade-dev, omniidl4, libomniorb4-dev, libomnithread3-dev, python-omniorb2, omniidl4-python, libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, libqt3-mt-dev | libqt3-dev, libboost-thread-dev, libcos4-dev, boost-build, libopenmpi-dev, libcppunit-dev
+Build-Depends-Indep: doxygen, graphviz, texlive-latex-base, python-docutils
+Homepage: http://www.salome-platform.org/
+
+Package: salome
+Architecture: any
+Section: non-free/science
+Depends: ${shlibs:Depends}
+Description: Salomé numerical simulation pre- and post-processor
+ Salomé is a pre- and post-processor for numerical simulations.  It can import
+ CAD files in IGES and STEP formats, facilitates component integration in
+ heterogeneous systems, and has a user-friendly GUI as well as a python console
+ with all of the platform functionality.
+
+Package: salome-doc
+Architecture: all
+Section: non-free/doc
+Suggests: libsalome6.2-dev, salome-tools
+Description: Salomé numerical simulation pre- and post-processor documentation
+ Salomé is a suite for 3D surface and solid modeling, visualization, data
+ exchange and rapid application development.  It is most suited for development
+ of numerical simulation software including CAD/CAM/CAE, AEC and GIS, as well
+ as PDM applications.
+ .
+ This package contains the documentation for Salomé.
--- salome-3.2.6.orig/debian/changelog
+++ salome-3.2.6/debian/changelog
@@ -0,0 +1,10 @@
+salome (3.2.6-1) unstable; urgency=low
+
+  * First Debianization of Salomé.
+  * Needs to use MPI prefix for HDF5 prefix because HDF5 test comes first
+    (i.e. upstream assumes that HDF5 is independent of MPI).
+  * Patches configure to include -lmpi++ in MPI_LIBS and properly specify
+    the Debian location of OpenCASCADE headers.
+
+ -- Adam C. Powell, IV <hazelsct@debian.org>  Tue, 08 Jan 2008 15:52:23 -0500
+
--- salome-3.2.6.orig/debian/rules
+++ salome-3.2.6/debian/rules
@@ -0,0 +1,90 @@
+#!/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=salome
+
+# 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/salome-mpi-c++.patch; \
+	  rm patch-stamp; \
+	fi
+
+clean: unpatch
+	dh_testdir
+	dh_clean
+	if [ -e KERNEL_SRC_3.2.6/Makefile ]; then \
+	  $(MAKE) -C KERNEL_SRC_3.2.6 clean; \
+	fi
+	rm -f *-stamp
+	dh_clean
+
+patch-stamp:
+	dh_testdir
+	if [ ! -e patch-stamp ]; then \
+	  patch -p1 < debian/salome-mpi-c++.patch; \
+	  touch patch-stamp; \
+	fi
+
+# Hack alert!  Because Salomé checks for HDF5 before MPI, we need to pass the
+# MPI include prefix as the HDF5 include prefix.  I've offered to patch this
+# via the Salomé forum, but haven't heard back from them yet.
+configure-stamp: patch-stamp
+	dh_testdir
+	(cd KERNEL_SRC_3.2.6 && ./configure --prefix=/usr QTDIR=/usr \
+	 CASROOT=/usr --with-hdf5=/usr/lib/openmpi --with-mpi=/usr/lib/openmpi)
+	touch $@
+
+build: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	$(MAKE) -C KERNEL_SRC_3.2.6 -j $(NJOBS)
+	touch $@
+
+install: build
+	dh_testdir
+	$(MAKE) -C KERNEL_SRC_3.2.6 install DESTDIR=$(CURDIR)/debian/tmp
+	touch $@
+
+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_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 build
