Skip to content

Commit

Permalink
Packaging: Added docker script to build a snap package
Browse files Browse the repository at this point in the history
Issue #37
  • Loading branch information
pentix committed Oct 14, 2019
1 parent 44b7be5 commit 2f4f252
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packaging/snap/Makefile
Original file line number Diff line number Diff line change
@@ -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'
52 changes: 52 additions & 0 deletions packaging/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2f4f252

Please sign in to comment.