Skip to content

Commit 61ef48b

Browse files
gocarlosdanmar
authored andcommitted
[WIP] Package cppcheck as snap app (#1029)
* added first approach to the snapcraft packaging * rm opencv stuff * added Qt5LinguistTools stuff * fixed building problems * changed to strict mode
1 parent eabe578 commit 61ef48b

4 files changed

Lines changed: 68 additions & 0 deletions

File tree

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ build*
8989
# Temporal files
9090
*.swp
9191

92+
# Snapcraft build
93+
part
94+
prime
95+
parts
96+
stage
97+
*.snap
98+
snap/.snapcraft
99+
92100
# Manual folder
93101
man/manual.log
94102
man/manual.tex
103+

snap/gui/cppcheck-gui.desktop

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=Cppcheck
4+
Comment=A tool for static C/C++ code analysis
5+
Exec=cppcheck-gui
6+
Icon=${SNAP}/meta/gui/cppcheck-gui.png
7+
Terminal=true
8+
StartupNotify=true
9+
Categories=Development;Debugger;Qt;

snap/gui/cppcheck-gui.png

2.48 KB
Loading

snap/snapcraft.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: cppcheckgui
2+
version: '1.81.99'
3+
summary: A tool for static C/C++ code analysis
4+
description: |
5+
A tool for static C/C++ code analysis
6+
grade: stable
7+
confinement: strict
8+
icon: snap/gui/cppcheck-gui.png
9+
type: app
10+
11+
apps:
12+
cppcheckgui:
13+
command: desktop-launch ${SNAP}/bin/cppcheck-gui
14+
plugs: [home, unity7, x11, network-bind, network-control]
15+
16+
parts:
17+
cppcheckgui:
18+
source-type: git
19+
plugin: cmake
20+
configflags:
21+
- -DBUILD_GUI=ON
22+
after: [desktop-qt5]
23+
build-packages:
24+
# A list of Ubuntu packages to be installed on the host to aid in building the part.
25+
# These packages will not go into the final snap.
26+
- build-essential
27+
- qt5-default
28+
- qtbase5-dev
29+
- dpkg-dev
30+
# For Qt5LinguistTools
31+
- qttools5-dev
32+
- qttools5-dev-tools
33+
desktop-qt5:
34+
stage-packages:
35+
# A set of Ubuntu packages to be downloaded and unpacked to join the part before it’s built.
36+
# Note that these packages are not installed on the host.
37+
# Like the rest of the part, all files from these packages will make it into the final snap unless filtered out via the prime keyword.
38+
- libqt5gui5
39+
- libqt5svg5 # for loading icon themes which are svg
40+
- libtiff5-dev
41+
- libjpeg8-dev
42+
- libxkbcommon0
43+
- ttf-ubuntu-font-family
44+
- dmz-cursor-theme
45+
- light-themes
46+
- shared-mime-info
47+
- libgdk-pixbuf2.0-0
48+
- locales-all
49+
- xcb
50+
- libxcb1

0 commit comments

Comments
 (0)