From bf37e5d4126c45f5282944ff393e4eae3b99da41 Mon Sep 17 00:00:00 2001 From: Alexander Wenzel Date: Mon, 23 Sep 2024 07:49:35 +0200 Subject: [PATCH] Enable Debian build for noble. (#542) Signed-off-by: Alexander Wenzel --- build_viewer_debs_noble.sh | 35 +++++++++ noble/debian/changelog | 5 ++ noble/debian/compat | 1 + noble/debian/control | 33 ++++++++ noble/debian/copyright | 0 noble/debian/covesa-dlt-viewer-dev.install | 2 + noble/debian/covesa-dlt-viewer.install | 13 ++++ noble/debian/docs | 6 ++ noble/debian/rules | 89 ++++++++++++++++++++++ noble/debian/source/format | 1 + 10 files changed, 185 insertions(+) create mode 100644 build_viewer_debs_noble.sh create mode 100644 noble/debian/changelog create mode 100644 noble/debian/compat create mode 100644 noble/debian/control create mode 100644 noble/debian/copyright create mode 100644 noble/debian/covesa-dlt-viewer-dev.install create mode 100644 noble/debian/covesa-dlt-viewer.install create mode 100644 noble/debian/docs create mode 100644 noble/debian/rules create mode 100644 noble/debian/source/format diff --git a/build_viewer_debs_noble.sh b/build_viewer_debs_noble.sh new file mode 100644 index 00000000..9288ff28 --- /dev/null +++ b/build_viewer_debs_noble.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# building DLT Viewer debian packages on Ubuntu 24.04 / Noble +# script created 19.6.2018, Gernot Wirschal +# updated 11.06.2024, Alexander Wenzel +set -e +rm -rf debtmp +DTLREV=`git rev-list --all --count` +DEBIAN_REVISION=${DTLREV} +PACKAGE_NAME=covesa-dlt-viewer +cp -r noble/debian . +sed -i '/#define PACKAGE_REVISION/c #define PACKAGE_REVISION "'$DTLREV'"' src/version.h +DLT_VERSION=`cat src/version.h | grep "PACKAGE_VERSION" | grep -v PACKAGE_VERSION_STATE | awk '{print $3}' | tr -d \" ` +DLT_VERSION_STATE=`cat src/version.h | grep "PACKAGE_VERSION_STATE" | awk '{print $3}' | tr -d \" ` +sed -i '/covesa-dlt-viewer/c covesa-dlt-viewer ('${DLT_VERSION}-${DEBIAN_REVISION}') '${DLT_VERSION_STATE}'; urgency=low' ./debian/changelog +sed -i '$ d' ./debian/changelog +date=$(date -Ru) +echo " -- Alexander Wenzel $date" >> ./debian/changelog + +echo "DLT_VERSION: ${DLT_VERSION}" +echo "DEBIAN_REVISION: ${DEBIAN_REVISION}" +echo "DLT_VERSION_STATE: ${DLT_VERSION_STATE}" +echo "PACKAGE_NAME: ${PACKAGE_NAME}" + +mkdir -p ./debtmp/${PACKAGE_NAME}-${DLT_VERSION}-${DEBIAN_REVISION} +rsync -a --exclude=debtmp --exclude=*.sh --exclude=*.bat --exclude=cache --exclude=parser --exclude=bionic * debtmp/${PACKAGE_NAME}-${DLT_VERSION} + +cd debtmp/${PACKAGE_NAME}-${DLT_VERSION} +echo "#############################################" +echo "Create tarball ../${PACKAGE_NAME}_${DLT_VERSION}-${DEBIAN_REVISION}.orig.tar.gz" +echo "#############################################" + +tar -czf ../${PACKAGE_NAME}_${DLT_VERSION}-${DEBIAN_REVISION}.orig.tar.gz * +echo "y" | debuild -uc -us +#make -j8 install + diff --git a/noble/debian/changelog b/noble/debian/changelog new file mode 100644 index 00000000..39d121b5 --- /dev/null +++ b/noble/debian/changelog @@ -0,0 +1,5 @@ +covesa-dlt-viewer (2.26.0) unstable; urgency=low + + * Generated Release + + -- Alexander Wenzel Tue, 23 Apr 2024 11:50:38 +0100 diff --git a/noble/debian/compat b/noble/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/noble/debian/compat @@ -0,0 +1 @@ +9 diff --git a/noble/debian/control b/noble/debian/control new file mode 100644 index 00000000..923accb0 --- /dev/null +++ b/noble/debian/control @@ -0,0 +1,33 @@ +Source: covesa-dlt-viewer +Section: Development +Priority: optional +Maintainer: AlexanderWenzel +Build-Depends: debhelper (>= 9), qtbase5-dev, libqt5serialport5-dev + +Package: covesa-dlt-viewer +Architecture: any +Depends: ${shlibs:Depends} +Description: COVESA DLT Viewer + DLT is a reusable open source software component for standardized + logging and tracing in infotainment ECUs based on the AUTOSAR 4.0 + standard. The goal of DLT is the consolidation of the existing + variety of logging and tracing protocols on one format. + DLT Viewer is a graphical DLT Client written in C++/Qt to receive + and decode logs and traces from an infotainment ECU. + The Open Source Project is hosted by the COVESA organisation. + More information can be found on the homepage of the project: + https://github.com/COVESA/dlt-viewer + +Package: covesa-dlt-viewer-dev +Architecture: any +Depends: ${shlibs:Depends} +Description: COVESA DLT Viewer Development files + DLT is a reusable open source software component for standardized + logging and tracing in infotainment ECUs based on the AUTOSAR 4.0 + standard. The goal of DLT is the consolidation of the existing + variety of logging and tracing protocols on one format. + DLT Viewer is a graphical DLT Client written in C++/Qt to receive + and decode logs and traces from an infotainment ECU. + The Open Source Project is hosted by the COVESA organisation. + More information can be found on the homepage of the project: + https://github.com/COVESA/dlt-viewer diff --git a/noble/debian/copyright b/noble/debian/copyright new file mode 100644 index 00000000..e69de29b diff --git a/noble/debian/covesa-dlt-viewer-dev.install b/noble/debian/covesa-dlt-viewer-dev.install new file mode 100644 index 00000000..65ef1074 --- /dev/null +++ b/noble/debian/covesa-dlt-viewer-dev.install @@ -0,0 +1,2 @@ +usr/lib/*/libqdlt.so +usr/include/qdlt/*.h diff --git a/noble/debian/covesa-dlt-viewer.install b/noble/debian/covesa-dlt-viewer.install new file mode 100644 index 00000000..afdb315c --- /dev/null +++ b/noble/debian/covesa-dlt-viewer.install @@ -0,0 +1,13 @@ +usr/bin/dlt-viewer +usr/bin/dlt-commander +usr/lib/*/libqdlt.so.* +usr/share/applications/org.genivi.DLTViewer.desktop +usr/share/pixmaps/org.genivi.DLTViewer.ico +usr/share/icons/hicolor/*/apps/org.genivi.DLTViewer.png +usr/share/icons/hicolor/symbolic/apps/org.genivi.DLTViewer-symbolic.svg +usr/share/dlt-viewer/plugins/libfile*.so +usr/share/dlt-viewer/plugins/libdltdbus*.so +usr/share/dlt-viewer/plugins/libdltview*.so +usr/share/dlt-viewer/plugins/libnonv*.so +#usr/share/dlt-viewer/plugins/*.xml +#usr/share/doc/genivi-dlt-viewer/filters diff --git a/noble/debian/docs b/noble/debian/docs new file mode 100644 index 00000000..319a1e36 --- /dev/null +++ b/noble/debian/docs @@ -0,0 +1,6 @@ +doc/dlt_viewer_user_manual.pdf +doc/dlt_viewer_plugins_programming_guide.pdf +doc/search *.pdf +ReleaseNotes_Viewer.txt +plugin/examples/*.xml +filters diff --git a/noble/debian/rules b/noble/debian/rules new file mode 100644 index 00000000..87828f15 --- /dev/null +++ b/noble/debian/rules @@ -0,0 +1,89 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=9 + +CFLAGS = -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +CFLAGS += -O0 +else +CFLAGS += -O2 +endif + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + qmake BuildDltViewer.pro + make -j $(shell grep -c processor /proc/cpuinfo) + # --- end custom part for compiling + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + + # --- end custom part for cleaning up + + dh_prep + +install: build + dh_testdir + dh_testroot + #dh_clean -k + dh_prep + dh_installdirs + + # Add here commands to install the package + # The DESTDIR Has To Be Exactly /usr/src/packages/BUILD/debian/ + make install INSTALL_ROOT=$(shell pwd)/debian/tmp + # --- end custom part for installing + +# Build architecture-independent files here. +binary-indep: build install + # We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs + dh_install +# dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron + dh_installman + dh_installinfo +# dh_install --sourcedir=$(shell pwd)/debian/tmp --fail-missing + dh_install --sourcedir=$(shell pwd)/debian/tmp --list-missing + dh_makeshlibs -a -n +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip + dh_compress -Xxml -Xpdf + dh_fixperms + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/noble/debian/source/format b/noble/debian/source/format new file mode 100644 index 00000000..89ae9db8 --- /dev/null +++ b/noble/debian/source/format @@ -0,0 +1 @@ +3.0 (native)