From c356bdeeaedd14180dc6278c4486d7ae9f03b47c Mon Sep 17 00:00:00 2001 From: Mike Dubman Date: Wed, 6 Nov 2013 12:50:28 +0000 Subject: [PATCH] packaging: add support for debian + example unfortunately the debian packaging files should reside in the root folder and cannot be placed under contrib/dist/... tree. developed by Aleksey, reviewed by miked cmr=v1.7.4:reviewer=ompi-gk1.7 This commit was SVN r29615. --- Makefile.am | 2 +- configure.ac | 11 +++++++- contrib/Makefile.am | 1 + .../dist/linux/compile_debian_mlnx_example.in | 27 +++++++++++++++++++ debian/changelog.in | 5 ++++ debian/compat | 1 + debian/control.in | 18 +++++++++++++ debian/rules.in | 17 ++++++++++++ debian/source/format | 1 + 9 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 contrib/dist/linux/compile_debian_mlnx_example.in create mode 100644 debian/changelog.in create mode 100644 debian/compat create mode 100644 debian/control.in create mode 100644 debian/rules.in create mode 100644 debian/source/format diff --git a/Makefile.am b/Makefile.am index 715d4aa3d1..a5af9f7060 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,7 +20,7 @@ SUBDIRS = config contrib $(MCA_PROJECT_SUBDIRS) test EXTRA_DIST = README INSTALL VERSION Doxyfile LICENSE autogen.pl autogen.sh \ - README.JAVA.txt + README.JAVA.txt debian include examples/Makefile.include diff --git a/configure.ac b/configure.ac index f3244e1bd2..3304b7a0de 100644 --- a/configure.ac +++ b/configure.ac @@ -1341,6 +1341,11 @@ AC_CONFIG_FILES([ config/Makefile contrib/Makefile + contrib/dist/linux/compile_debian_mlnx_example + + debian/changelog + debian/rules + debian/control test/Makefile test/event/Makefile @@ -1350,7 +1355,11 @@ AC_CONFIG_FILES([ test/support/Makefile test/threads/Makefile test/util/Makefile -]) +],[ + chmod +x debian/rules + chmod +x contrib/dist/linux/compile_debian_mlnx_example + cp LICENSE debian/copyright + ]) OPAL_CONFIG_FILES m4_ifdef([project_orte], [ORTE_CONFIG_FILES]) diff --git a/contrib/Makefile.am b/contrib/Makefile.am index d002a7e988..62222a48f7 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -33,6 +33,7 @@ endif # WANT_FT_CR EXTRA_DIST = \ dist/make_dist_tarball \ dist/linux/openmpi.spec \ + dist/linux/compile_debian_mlnx_example.in \ dist/macosx-pkg/buildpackage.sh \ dist/macosx-pkg/ReadMe.rtf \ platform/optimized \ diff --git a/contrib/dist/linux/compile_debian_mlnx_example.in b/contrib/dist/linux/compile_debian_mlnx_example.in new file mode 100644 index 0000000000..64bf22fd03 --- /dev/null +++ b/contrib/dist/linux/compile_debian_mlnx_example.in @@ -0,0 +1,27 @@ +INSTALL_DIR=${INSTALL_DIR:-/usr/mpi/gcc} +PREFIX=${INSTALL_DIR}/openmpi-@OMPI_MAJOR_VERSION@.@OMPI_MINOR_VERSION@.@OMPI_RELEASE_VERSION@ + +MAINTEINER=${MAINTEINER:-"Mellanox Ltd. "} +UPLOADER=${UPLOADER:-"$MAINTEINER"} + +MXM_PATH=${MXM_PATH:-/opt/mellanox/mxm} +FCA_PATH=${FCA_PATH:-/opt/mellanox/fca} +KNEM_PATH=${KNEM_PATH:-/opt/knem-1.0.90mlnx2} + +[ -d $MXM_PATH ] && WITH_MXM="--with-mxm=$MXM_PATH" +[ -d $FCA_PATH ] && WITH_FCA="--with-fca=$FCA_PATH" +[ -d $KNEM_PATH ] && WITH_KNEM="--with-knem=$KNEM_PATH" + +CONFIG_ARGS=${CONFIG_ARGS:-"--prefix=$PREFIX + --libdir=$OMPI_PREFIX/lib64 \ + --localstatedir=/var + --sharedstatedir=/var/lib + --infodir=/usr/share/info \ + --with-platform=contrib/platform/mellanox/optimized \ + $WITH_MXM \ + $WITH_FCA \ + $WITH_KNEM \ + "} +sed -ie "s/XXXMAINTEINERXXX/$MAINTEINER/; s/XXXUPLOADERXXX/$UPLOADER/" debian/control +export CONFIG_ARGS +dpkg-buildpackage -us -uc diff --git a/debian/changelog.in b/debian/changelog.in new file mode 100644 index 0000000000..d39abdc81d --- /dev/null +++ b/debian/changelog.in @@ -0,0 +1,5 @@ +openmpi (@OMPI_MAJOR_VERSION@.@OMPI_MINOR_VERSION@.@OMPI_RELEASE_VERSION@) unstable; urgency=low + + * Initial release. + + -- Aleksey Senin Thu, 02 May 2013 10:55:55 +0300 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000000..45a4fb75db --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 0000000000..caeb28cec1 --- /dev/null +++ b/debian/control.in @@ -0,0 +1,18 @@ +Source: openmpi +Section: net +Priority: extra +Homepage: http://www.open-mpi.org/ +Maintainer: XXXMAINTEINERXXX +Uploaders: XXXUPLOADERXXX +Build-Depends: dpkg-dev (>= 1.16.1~), debhelper (>= 8.0.0~), libibverbs-dev (>= 1.1.1), gfortran, gcc (>= 4:4.1.2), chrpath, quilt, libcr-dev [amd64 armel armhf i386 powerpc], autoconf (>= 2.59), automake, libtool, libltdl-dev +Standards-Version: 3.9.3 + +Package: openmpi +Depends: ${shlibs:Depends}, ${misc:Depends} +Architecture: amd64 +Description: Open MPI + Open MPI is a project combining technologies and resources from + several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in + order to build the best MPI library available. + This package contains all the tools necessary to compile, link, and run + Open MPI jobs. diff --git a/debian/rules.in b/debian/rules.in new file mode 100644 index 0000000000..b7b2fab0e1 --- /dev/null +++ b/debian/rules.in @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +# export DH_VERBOSE=1 + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +%: + dh $@ --parallel + +override_dh_auto_clean: + +override_dh_auto_configure: + ./configure $(CONFIG_ARGS) + +override_dh_auto_test: + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000000..89ae9db8f8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native)