diff --git a/packaging/snap/Makefile b/packaging/snap/Makefile new file mode 100644 index 0000000..e2646be --- /dev/null +++ b/packaging/snap/Makefile @@ -0,0 +1,10 @@ +all: + docker run --rm -id --workdir=/snap --name=qjournalctl-snap --volume=$(realpath .):/out ubuntu + touch qjournalctl_0.6_amd64.snap + + docker exec -i qjournalctl-snap apt-get update + docker exec -i qjournalctl-snap apt-get -y install snapd snapcraft + + docker cp snapcraft.yaml qjournalctl-snap:/snap/ + docker exec -i qjournalctl-snap snapcraft + docker exec -i qjournalctl-snap bash -c 'cp /snap/*.snap /out' diff --git a/packaging/snap/snapcraft.yaml b/packaging/snap/snapcraft.yaml new file mode 100644 index 0000000..30368af --- /dev/null +++ b/packaging/snap/snapcraft.yaml @@ -0,0 +1,52 @@ +name: qjournalctl +version: "0.6" +summary: A Qt-based Graphical User Interface for systemd's journalctl command +description: | + A Qt-based Graphical User Interface for + systemd's journalctl command + +base: core18 +confinement: classic + +parts: + qjournalctl: + plugin: qmake + qt-version: qt5 + + source-type: tar + source: https://github.com/pentix/qjournalctl/archive/v0.6.tar.gz + + override-build: | + wget https://www.libssh.org/files/0.9/libssh-0.9.0.tar.xz + tar xf libssh-0.9.0.tar.xz + cd libssh-0.9.0 + + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=/snap/parts/qjournalctl/install/ .. + make install -j$(nproc) + + cd ../.. + + PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/snap/parts/qjournalctl/install/lib/pkgconfig/ QT_SELECT=qt5 qmake qjournalctl.pro -r -spec linux-g++ CONFIG+=release QMAKE_LIBDIR=/snap/parts/qjournalctl/install/lib/ + + make install -j$(nproc) + + build-packages: + - build-essential + - libssl-dev + - libzip-dev + - pkg-config + - g++ + - make + - cmake + - wget + - qtbase5-dev + + stage-packages: + - qtbase5-dev + +apps: + qjournalctl: + command: qjournalctl +