Installing rdma-ndd service
---------------------------

To install the rdma-ndd.service, the package needs rebuilding applying the
following patch. This service can't be installed because it needs the
service rdma that is not installed in Debian by any package.


diff --git a/debian/control b/debian/control
index af442dd..ac7cd0f 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: OFED and Debian Development and Discussion <pkg-ofed-devel@lists.al
 Uploaders: Ana Beatriz Guerrero Lopez <ana@debian.org>
 Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev,
  libibumad-dev (>= 1.3.7), libibmad-dev (>= 1.3.12), libopensm-dev (>= 3.3.12),
- libudev-dev, python-docutils
+ libudev-dev, python-docutils, dh-systemd, systemd
 Standards-Version: 3.9.8
 Vcs-Git: https://anonscm.debian.org/git/pkg-ofed/infiniband-diags.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ofed/infiniband-diags.git
diff --git a/debian/infiniband-diags.install b/debian/infiniband-diags.install
index 9ed3e40..186d1bb 100644
--- a/debian/infiniband-diags.install
+++ b/debian/infiniband-diags.install
@@ -1,2 +1,3 @@
 usr/sbin
 usr/share/perl5
+lib/systemd/system/rdma-ndd.service
diff --git a/debian/rules b/debian/rules
index a158c75..1353514 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,10 +4,10 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-	dh $@ --with autoreconf
+	dh $@ --with autoreconf,systemd
 
 override_dh_auto_configure:
-	dh_auto_configure -- --with-ibpath_override=/usr/sbin
+	dh_auto_configure -- --with-ibpath_override=/usr/sbin --exec-prefix=/usr
 
 override_dh_install:
 	mv debian/tmp/usr/sbin/ibfindnodesusing.pl debian/tmp/usr/sbin/ibfindnodesusing
