summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinh Cong Toan <toan.dinhcong@vn.bosch.com>2021-08-17 11:20:59 +0700
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-10-05 11:19:26 +0900
commitb90a2b3d7cfe4d32dcd142c3591cde5655be60ae (patch)
tree6d98f498424f2971996c569393893d4d334eab9d
parentbca4804feaed8e5a5363972a6ac05e0f9586cee9 (diff)
downloadDLT-daemon-b90a2b3d7cfe4d32dcd142c3591cde5655be60ae.tar.gz
debian: improve debian build package
Currently, when building dlt debian package, our libdlt.so can not be linked to other binary consoles. Adding build option of dh_shlibdeps to specific the path of libdlt.so, and linking step should not be broken. With default enabling flag WITH_MAN in debian rules, pandoc package must be added in Build_Depends option for debian control. Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
-rw-r--r--debian/control4
-rwxr-xr-xdebian/rules11
2 files changed, 12 insertions, 3 deletions
diff --git a/debian/control b/debian/control
index 98cebea..1558343 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: dlt-daemon
Section: utils
Priority: extra
Maintainer: Advanced Driver Information Technology
-Build-Depends: debhelper (>= 9), cmake,
+Build-Depends: debhelper (>= 9), cmake, pandoc,
libdbus-1-dev, pkg-config, zlib1g-dev, libsystemd-dev
@@ -56,4 +56,4 @@ Package: dlt-examples
Architecture: any
Depends: libdlt2, ${shlibs:Depends}, ${misc:Depends}
Description: Diagnostic Log and Trace daemon - Examples
- This package includes example binaries to demonstrate several use cases. \ No newline at end of file
+ This package includes example binaries to demonstrate several use cases.
diff --git a/debian/rules b/debian/rules
index 993ce30..df6d7c9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,10 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
+# Debian host name can be different between each architectures
+# Preparing it's name for libdlt.so path
+DEB_HOST_MULTIARCH = $(shell dpkg-architecture -q DEB_HOST_MULTIARCH)
+
%:
dh $@ --buildsystem cmake --builddirectory=build
@@ -10,7 +14,12 @@ override_dh_auto_configure:
-DWITH_MAN=ON -DWITH_DLT_DBUS=ON \
-DWITH_DLT_KPI=ON -DWITH_DLT_ADAPTOR=ON \
-DWITH_DLT_SYSTEM=ON -DCMAKE_INSTALL_PREFIX=/opt/tooling/dlt \
- -DCMAKE_INSTALL_SYSCONFDIR=/opt/tooling/dlt/etc
+ -DCMAKE_INSTALL_SYSCONFDIR=/opt/tooling/dlt/etc \
+ -DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH)
+
+# Specific the path of libdlt.so for linking
+override_dh_shlibdeps:
+ dh_shlibdeps -l$(CURDIR)/debian/tmp/opt/tooling/dlt/lib/$(DEB_HOST_MULTIARCH)/
override_dh_install:
sed -i 's/INSTALL_PREFIX_PATH/opt\/tooling\/dlt/g' debian/*.install; \