-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathsnapcraft.yaml
More file actions
98 lines (82 loc) · 3.52 KB
/
snapcraft.yaml
File metadata and controls
98 lines (82 loc) · 3.52 KB
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
name: pbtk # you probably want to 'snapcraft register <name>'
adopt-info: share
title: pbtk
license: GPL-3.0+
base: core24 # the base snap is the execution environment for this snap
version: '1.1.1' # just for humans, typically '1.2+git' or '1.3.2'
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
plugs:
shared-memory:
private: true
apps:
pbtk:
command: bin/pbtk
desktop: usr/share/applications/re.fossplant.pbtk.desktop
environment:
# Concurrent paths for plugins:
# lib/python3.12/site-packages/PySide6/Qt/plugins/platforms/libqwayland-egl.so
# usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-egl.so
# usr/lib/x86_64-linux-gnu/qt6/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so
PYTHONPATH: $SNAP/usr/lib/python3:$SNAP/usr/lib/python3/dist-packages:$SNAP/usr/lib/python3/site-packages${PYTHONPATH:+:$PYTHONPATH}
# PATH: $SNAP/usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR/bin${PATH:+:$PATH}
# LD_LIBRARY_PATH: /usr/lib:/snap/kde-pyside6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
# QT_QPA_PLATFORM: xcb
# QT_QPA_PLATFORM_PLUGIN_PATH: $SNAP/lib/python3.12/site-packages/PySide6/Qt/plugins/platforms:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/plugins/platforms # Explicitly set plugin path
# LD_LIBRARY_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/mesa:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy
extensions: [kde-neon-6]
plugs:
- home
- unity7
jar-extract:
command: bin/pbtk-jar-extract
plugs:
- home
from-binary:
command: bin/pbtk-from-binary
plugs:
- home
web-extract:
command: bin/pbtk-web-extract
plugs:
- home
- network
parts:
pbtk:
plugin: python
source: .
override-pull: |
snapcraftctl pull
sed -ri 's/"pyside.+",//g' pyproject.toml
sed -ri 's/"system-pyside.+",//g' pyproject.toml
share:
plugin: dump
source: packaging/assets/
parse-info: [re.fossplant.pbtk.metainfo.xml]
source-type: local
stage-snaps:
- kde-pyside6-core24-sdk
stage-packages:
- libdrm-common
- openjdk-8-jre
override-pull: |
snapcraftctl pull
# Point icon to the correct location
sed -i -e 's|Icon=re.fossplant.pbtk|Icon=/usr/share/icons/hicolor/scalable/apps/re.fossplant.pbtk.svg|g' re.fossplant.pbtk.desktop
install -Dm644 re.fossplant.pbtk.metainfo.xml -t usr/share/metainfo/
install -Dm644 re.fossplant.pbtk.desktop -t usr/share/applications/
install -Dm644 re.fossplant.pbtk.svg -t usr/share/icons/hicolor/scalable/apps/
mkdir -p bin
mkdir -p usr/bin
ln -s ../usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR/bin/java bin/java
ln -s ../../usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR/bin/java usr/bin/java
mkdir -p usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR/jre/lib/security
rm -f usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR/jre/lib/security/cacerts
ln -s ../../../../../../../etc/ssl/certs/java/cacerts usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR/jre/lib/security/cacerts
layout:
/usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR:
bind: $SNAP/usr/lib/jvm/java-8-openjdk-$CRAFT_ARCH_BUILD_FOR
/usr/share/libdrm:
bind: $SNAP/usr/share/libdrm
/etc/ssl/certs/java:
bind: $SNAP_COMMON/etc/ssl/certs/java