From ce79ae14fd521fef03b1c861a63467fa16dd1fcb Mon Sep 17 00:00:00 2001
From: Louis Maillard <louis.maillard@savoirfairelinux.com>
Date: Wed, 23 Oct 2024 10:02:16 -0400
Subject: [PATCH] packaging: fix paths when building packages

On Ubuntu/debian, it have happenned that some build have inconsistent
paths like /usr/usr/lib. To avoid this, hard-coded most of the paths
like we are doing in Fedora.

Change-Id: I8c1a3567490e02ac11ec57315bc3a7cc38d02ea0
---
 extras/packaging/gnu-linux/debian/rules | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/extras/packaging/gnu-linux/debian/rules b/extras/packaging/gnu-linux/debian/rules
index 76b2cb0..a23ed36 100755
--- a/extras/packaging/gnu-linux/debian/rules
+++ b/extras/packaging/gnu-linux/debian/rules
@@ -19,4 +19,11 @@ override_dh_auto_configure:
 		  -DBUILD_SHARED_LIBS=ON \
 		  -DBUILD_DEPS_STATIC=ON \
 		  -DTRIM_PREFIX_PATH=ON \
-		  -DDNC_SYSTEMD=ON
+		  -DDNC_SYSTEMD=ON \
+		  -DCMAKE_INSTALL_BINDIR=/usr/bin \
+		  -DCMAKE_INSTALL_MANDIR=/usr/share/man \
+		  -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/dhtnet \
+		  -DCMAKE_INSTALL_INCLUDEDIR=/usr/include \
+		  -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+		  -DDNC_SYSTEMD_UNIT_FILE_LOCATION=/usr/lib/systemd/system \
+		  -DDNC_SYSTEMD_PRESET_FILE_LOCATION=/usr/lib/systemd/system-preset
-- 
GitLab