1
1
name : gpsbabel # you probably want to 'snapcraft register <name>'
2
2
base : core24 # the base snap is the execution environment for this snap
3
- version : ' 0.1' # just for humans, typically '1.2+git' or '1.3.2'
4
- summary : " Convert, manipulate and transfer GPS data"
3
+ summary : " Convert, manipulate and transfer GPS data."
5
4
description : |
6
5
Convert, manipulate and transfer data from GPS programs or GPS
7
6
recievers. Open source and supported on macOS, Windows and Linux.
@@ -16,21 +15,58 @@ confinement: strict # use 'strict' once you have the right plugs and slots
16
15
17
16
apps :
18
17
gpsbabel :
18
+ extensions : [gnome]
19
19
plugs :
20
20
- home
21
21
- raw-usb
22
22
- removable-media
23
23
- serial-port
24
24
command : usr/bin/gpsbabel
25
+ gpsbabelfe :
26
+ # avoid issues with fonts replaced by empty squares
27
+ # avoid issue: pxbackend-WARNING **: 08:18:06.724: GNOME desktop detected but no schemes installed, aborting.
28
+ extensions : [gnome]
29
+ plugs :
30
+ - desktop
31
+ - desktop-legacy
32
+ - network-status
33
+ - home
34
+ - removable-media
35
+ - network
36
+ - opengl
37
+ - unity7
38
+ - wayland
39
+ - x11
40
+ command-chain :
41
+ - usr/bin/gpsbabelfe.sh
42
+ command : usr/bin/gpsbabelfe
43
+ environment :
44
+ # QT_DEBUG_PLUGINS: 1
45
+ # bug https://forum.snapcraft.io/t/libpxbackend-1-0-so-cannot-open-shared-object-file-no-such-file-or-directory/44263
46
+ # error while loading shared libraries: libpxbackend-1.0.so: cannot open shared object file: No such file or directory
47
+ LD_LIBRARY_PATH : $LD_LIBRARY_PATH:$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy
48
+
49
+ plugs :
50
+ # avoid FATAL:credentials.cc(122)] Check failed: . : Permission denied (13) with map preview
51
+ # requires manual connection
52
+ browser-sandbox : # gpsbabelfe
53
+ interface : browser-support
54
+ allow-sandbox : true
25
55
26
56
# remap the ubuntu qt6 install directories to the snap.
27
57
layout :
28
58
/usr/share/qt6 :
29
59
symlink : $SNAP/usr/share/qt6
30
60
/usr/lib/qt6 :
31
61
symlink : $SNAP/usr/lib/qt6
32
- /usr/lib/x86_64-linux-gnu/qt6 :
33
- symlink : $SNAP/usr/lib/x86_64-linux-gnu/qt6
62
+ /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6 :
63
+ symlink : $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6
64
+ # XKB_CONFIG_ROOT, QT_XKB_CONFIG_ROOT not enough to prevent "xkbcommon: ERROR: Couldn't find file "rules/evdev" in include paths"
65
+ # to overcome this symlink /usr/share/X11/xkb
66
+ # see https://bugreports.qt.io/browse/QTBUG-105124
67
+ # supposedly fixed in Qt 6.5.
68
+ /usr/share/X11/xkb :
69
+ symlink : $SNAP/gnome-platform/usr/share/X11/xkb
34
70
35
71
adopt-info : gpsbabel
36
72
parts :
@@ -46,15 +82,13 @@ parts:
46
82
override-pull : |
47
83
craftctl default
48
84
# add install command to CMakeLists.txt
49
- echo "install(TARGETS gpsbabel CONFIGURATIONS Release RUNTIME DESTINATION /usr/bin)" >> CMakeLists.txt
50
- # no gui
51
- sed -i -e's/add_subdirectory(gui)/#add_subdirectory(gui)/' CMakeLists.txt
85
+ echo "install(TARGETS gpsbabel gpsbabelfe CONFIGURATIONS Release RUNTIME DESTINATION /usr/bin)" >> CMakeLists.txt
86
+ echo "install(PROGRAMS snap/local/gpsbabelfe.sh DESTINATION /usr/bin)" >> CMakeLists.txt
52
87
# jam repo sha into GITHUB_SHA
53
88
sed -i -e"/GB.SHA/i set(ENV{GITHUB_SHA} \"$(git log -1 --format=%h)\")" gbversion.cmake
54
89
# set snap version
55
90
# ensure version has at most 32 characters
56
- craftctl set version=$(git log -1 --format='LinuxInstaller-%ad-%h' --date=format:%Y%m%d)
57
-
91
+ craftctl set version="$(git describe | sed -e 's/gpsbabel_//' -e 's/_/./g')"
58
92
build-packages :
59
93
- git
60
94
- vim
@@ -67,9 +101,61 @@ parts:
67
101
- libudev-dev
68
102
- qt6-base-dev
69
103
- qt6-5compat-dev
104
+ - qt6-serialport-dev
105
+ - libx11-xcb-dev
106
+ - libxkbcommon-dev
107
+ - qt6-tools-dev
108
+ - qt6-translations-l10n
109
+ - qt6-webengine-dev
110
+ - qt6-wayland
111
+
70
112
stage-packages :
71
113
- zlib1g
72
114
- libshp4
73
115
- libusb-1.0-0
74
116
- libqt6core6
75
117
- libqt6core5compat6
118
+ - libqt6gui6
119
+ - libqt6network6
120
+ - libqt6serialport6
121
+ - libqt6widgets6
122
+ - libqt6xml6
123
+ - libqt6webenginewidgets6
124
+ - libqt6webenginecore6
125
+ - libqt6webenginecore6-bin
126
+ - qt6-translations-l10n
127
+ - qt6-qpa-plugins
128
+ - qt6-wayland
129
+
130
+ gpu-2404 :
131
+ after : [gpsbabel]
132
+ source : https://github.com/canonical/gpu-snap.git
133
+ plugin : dump
134
+ override-prime : |
135
+ craftctl default
136
+ ${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404
137
+ prime :
138
+ - bin/gpu-2404-wrapper
139
+
140
+ cleanup :
141
+ after :
142
+ - gpsbabel
143
+ - gpu-2404
144
+ plugin : nil
145
+ build-snaps : # List all content-snaps and base snaps you're using here
146
+ - core24
147
+ - gnome-46-2404
148
+ - mesa-2404
149
+ override-prime : |
150
+ set -eux
151
+ for snap in "core24" "gnome-46-2404" "mesa-2404"; do # List all content-snaps and base snaps you're using here
152
+ cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$CRAFT_PRIME/{}" \;
153
+ done
154
+
155
+ lint :
156
+ ignore :
157
+ - library :
158
+ # these are all required by libQt6WebEngineCore.so.6.4.2
159
+ - usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libharfbuzz-subset.so.0.*
160
+ - usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libharfbuzz.so.0.*
161
+ - usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libpsl.so.5.*
0 commit comments