-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
139 lines (134 loc) · 4.18 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: hyperion-ng
adopt-info: hyperion-ng
base: core22
grade: stable
confinement: strict
architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf
apps:
hyperion-ng:
extensions: [gnome]
command: usr/local/bin/hyperiond
common-id: com.hyperion-project.hyperion
desktop: usr/share/applications/com.hyperion-project.hyperion.desktop
plugs:
- camera
- framebuffer
- hidraw
- home
- network-control
- network-status
- network-bind
- network
- raw-usb
- serial-port
- desktop
- desktop-legacy
- wayland
- x11
- unity7
environment:
QT_PLUGIN_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/plugins
parts:
hyperion-ng:
source: https://github.com/hyperion-project/hyperion.ng
source-type: git
plugin: cmake
cmake-generator: Ninja
cmake-parameters:
- -DCMAKE_BUILD_TYPE=Release
- -DUSE_SYSTEM_MBEDTLS_LIBS=ON
- -DUSE_SYSTEM_FLATBUFFERS_LIBS=ON
- -DUSE_SYSTEM_PROTO_LIBS=ON
- -DENABLE_DEPLOY_DEPENDENCIES=OFF
parse-info:
- usr/share/metainfo/com.hyperion-project.hyperion.metainfo.xml
build-packages:
- git
- cmake
- build-essential
- qt6-base-dev
- libqt6serialport6-dev
- libqt6sql6-sqlite
- libqt6websockets6-dev
- libxkbcommon-dev
- libvulkan-dev
- libgl1-mesa-dev
- python3-dev
- libusb-1.0-0-dev
- libcec-dev
- libp8-platform-dev
- libudev-dev
- libavahi-core-dev
- libavahi-compat-libdnssd-dev
- zlib1g-dev
- libasound2-dev
- libjpeg-dev
- libturbojpeg0-dev
- libmbedtls-dev
- libflatbuffers-dev
- flatbuffers-compiler
- libprotobuf-dev
- protobuf-compiler
- libftdi1-dev
- libssl-dev
- libglib2.0-dev
- libxrandr-dev
- libxrender-dev
- libxcb-image0-dev
- libxcb-util0-dev
- libxcb-shm0-dev
- libxcb-render0-dev
- libxcb-randr0-dev
stage-packages:
- libqt6core6
- libqt6gui6
- libqt6network6
- libqt6widgets6
- libqt6sql6
- libqt6serialport6
- libqt6sql6-sqlite
- libqt6websockets6
- qt6-gtk-platformtheme
- qt6-qpa-plugins
- qt6-wayland
- libpython3.10
- libusb-1.0-0
- libasound2
- libmbedtls14
- libprotobuf23
- libturbojpeg
- libcec6
override-pull: |
craftctl default
craftctl set version=$(cat .version)
mkdir -p ${CRAFT_PART_INSTALL}/usr/share/icons/hicolor/256x256/apps
cp ${CRAFT_PART_SRC}/resources/icons/hyperion-256px.png ${CRAFT_PART_INSTALL}/usr/share/icons/hicolor/256x256/apps/com.hyperion-project.hyperion.png
mkdir -p ${CRAFT_PART_INSTALL}/usr/share/applications
cp ${CRAFT_PART_SRC}/cmake/linux/desktop/hyperion.desktop ${CRAFT_PART_INSTALL}/usr/share/applications/com.hyperion-project.hyperion.desktop
sed -i 's|Icon=hyperion|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/com.hyperion-project.hyperion.png|' ${CRAFT_PART_INSTALL}/usr/share/applications/com.hyperion-project.hyperion.desktop
mkdir -p ${CRAFT_PART_INSTALL}/usr/share/metainfo
cp ${CRAFT_PART_SRC}/cmake/linux/desktop/hyperion.metainfo.xml ${CRAFT_PART_INSTALL}/usr/share/metainfo/com.hyperion-project.hyperion.metainfo.xml
stage:
- -usr/local/share/hyperion/service
- -usr/local/share/hyperion/icons
- -usr/local/share/hyperion/desktop
- -usr/local/share/hyperion/scripts
# This part removes all the files in this snap which already exist in connected content and base snaps. Since these files will be available
# at runtime from the content and base snaps, they do not need to be included in this snap itself.
# More info: https://forum.snapcraft.io/t/reducing-the-size-of-desktop-snaps/17280#heading--cleanup-part
cleanup:
after:
- hyperion-ng
plugin: nil
build-snaps:
- core22
- gnome-42-2204
- gtk-common-themes
override-prime: |
set -eux
for snap in "core22" "gnome-42-2204" "gtk-common-themes" ; do
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
done