From 625d285d1b656a206d58c0c3fc9367d422e51524 Mon Sep 17 00:00:00 2001 From: Patrick Eigensatz Date: Mon, 16 Sep 2019 18:12:24 +0200 Subject: [PATCH] Packaging: Added scripts + docker instance to build .deb package See Issue #37 --- .gitignore | 1 + packaging/deb/Dockerfile | 15 ++++++++++++ packaging/deb/build_deb.sh | 23 ++++++++++++++++++ packaging/deb/control | 8 ++++++ .../share/applications/qjournalctl.desktop | 10 ++++++++ .../files/usr/share/pixmaps/qjournalctl.png | Bin 0 -> 1181 bytes 6 files changed, 57 insertions(+) create mode 100644 packaging/deb/Dockerfile create mode 100755 packaging/deb/build_deb.sh create mode 100644 packaging/deb/control create mode 100644 packaging/files/usr/share/applications/qjournalctl.desktop create mode 100644 packaging/files/usr/share/pixmaps/qjournalctl.png diff --git a/.gitignore b/.gitignore index 833ec3e..9abb530 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ qjournalctl.pro.user build/* src/version.h qrc_icon.cpp +*.deb diff --git a/packaging/deb/Dockerfile b/packaging/deb/Dockerfile new file mode 100644 index 0000000..a159343 --- /dev/null +++ b/packaging/deb/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu + +ARG LIBSSHVERS=0.9 +ARG LIBSSHVERSION=0.9.0 + +WORKDIR /build + +# Get dependencies +RUN apt-get update -y +RUN apt-get install -y build-essential pkg-config qtbase5-dev cmake g++ libssl-dev xz-utils libzip-dev wget + +# Manually build libssh +RUN wget https://www.libssh.org/files/$LIBSSHVERS/libssh-$LIBSSHVERSION.tar.xz && tar xf libssh-$LIBSSHVERSION.tar.xz && cd libssh-$LIBSSHVERSION && mkdir build && cd build && cmake .. && make -j$(nproc) && make install && cd ../.. && rm -rf /build/* + +# Ready to build qjournalctl now :) diff --git a/packaging/deb/build_deb.sh b/packaging/deb/build_deb.sh new file mode 100755 index 0000000..6adb6d0 --- /dev/null +++ b/packaging/deb/build_deb.sh @@ -0,0 +1,23 @@ +#/bin/bash + +NAME=qjournalctl +VERSION=0.6 +PKGREV=1 +OUT="$NAME""_$VERSION-$PKGREV" + +# Build +QT_SELECT=qt5 qmake /source/qjournalctl.pro -r -spec linux-g++ CONFIG+=release +make -j$(nproc) + +# Move required files +cp -r /source/packaging/files $OUT/ +mkdir -p $OUT/usr/bin +mv qjournalctl $OUT/usr/bin + +# debian pkg files +mkdir -p $OUT/DEBIAN/ +cp /source/packaging/deb/control $OUT/DEBIAN/ +dpkg-deb --build $OUT + +# Keep ownership +cat $OUT.deb > /out/$OUT.deb diff --git a/packaging/deb/control b/packaging/deb/control new file mode 100644 index 0000000..5d65f7f --- /dev/null +++ b/packaging/deb/control @@ -0,0 +1,8 @@ +Package: qjournalctl +Version: 0.6-1 +Section: admin +Priority: optional +Architecture: amd64 +Depends: libssh (>= 0.8.7), qtbase5-dev (>= 1.2.6) +Maintainer: Patrick Eigensatz +Description: A Qt-based Graphical User Interface for systemd's journalctl command diff --git a/packaging/files/usr/share/applications/qjournalctl.desktop b/packaging/files/usr/share/applications/qjournalctl.desktop new file mode 100644 index 0000000..100b199 --- /dev/null +++ b/packaging/files/usr/share/applications/qjournalctl.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=QJournalctl +Comment=Graphical User Interface for systemd's journalctl +Exec=qjournalctl +Icon=qjournalctl +Terminal=false +StartupNotify=false +Categories=System; diff --git a/packaging/files/usr/share/pixmaps/qjournalctl.png b/packaging/files/usr/share/pixmaps/qjournalctl.png new file mode 100644 index 0000000000000000000000000000000000000000..42c3888e94697c70830a71b0f22faa5710e11a5b GIT binary patch literal 1181 zcmV;O1Y-M%P)WFU8GbZ8()Nlj2>E@cM*00aR^L_t(|+U=apZqzUo zh0kq=0W?MIXb~F(3wQ`#kB8x1cmu==wNm%3Kn3Qqagb{{j+5B&&zvKT)Ty0J#$WEA z9gnCgsCsn9As`TnKnR2)5CWkHgg__)ArOi{C;}l6ia-d2B9P9tJC!dgA`0Lhz|s8c zFm^+#s?b96K=>jecLv4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