This repository has been archived by the owner on Dec 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 208
/
snapcraft.yaml
145 lines (132 loc) · 3.76 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
140
141
142
143
144
145
name: guiscrcpy
version: v4.7.3
summary: An opensource GUI for android screen mirroring
description: |
A full fledged GUI integration for the award winning open source scrcpy, for
Android Screen mirroring
grade: stable
confinement: strict
base: core18
architectures:
- build-on: amd64
apps:
scrcpy:
command: usr/local/bin/scrcpy
environment:
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/android:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio:/var/lib/snapd/lib/gl"
MESA_GLSL_CACHE_DIR: "$SNAP_USER_DATA"
LIBGL_DRIVERS_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri"
SCRCPY_SERVER_PATH: "$SNAP/usr/local/share/scrcpy/scrcpy-server"
adb:
command: usr/bin/adb
environment:
LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/android/"
guiscrcpy:
command: bin/guiscrcpy
environment:
PATH: $SNAP/lib:$SNAP/usr/lib:$SNAP/bin:$SNAP/usr/bin:$SNAP/usr/local/bin:$PATH
GUISCRCPY_SCRCPY: "$SNAP/usr/local/bin/scrcpy"
GUISCRCPY_ADB: "$SNAP/usr/bin/adb"
SCRCPY_SERVER_PATH: "$SNAP/usr/local/share/scrcpy/scrcpy-server"
GUISCRCPY_SNAP: "TRUE"
command-chain: &command-chain-common
- bin/debian-multiarch-triplet-provider-launch
- bin/classic-launch
- bin/desktop-launch
- bin/guiscrcpy
desktop: share/applications/guiscrcpy.desktop
parts:
debian-multiarch-triplet-provider-launch:
plugin: nil
stage-snaps:
- debian-multiarch-triplet-provider-launch
classic-launch:
plugin: nil
stage-snaps:
- classic-launch
# Remote part for support of various desktop technologies
# Refer: https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml
desktop-qt5:
build-packages:
- build-essential
- qtbase5-dev
- dpkg-dev
make-parameters:
- FLAVOR=qt5
plugin: make
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
stage-packages:
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libqt5gui5
- libgdk-pixbuf2.0-0
- libqt5svg5
- try:
- appmenu-qt5
- locales-all
- xdg-user-dirs
- fcitx-frontend-qt5
scrcpy-server:
plugin: nil
override-pull:
wget https://github.com/Genymobile/scrcpy/releases/download/v1.15.1/scrcpy-server-v1.15.1
override-build: |
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/local/share/scrcpy/
cp scrcpy-server-v1.15.1 $SNAPCRAFT_PART_INSTALL/usr/local/share/scrcpy/scrcpy-server
scrcpy:
source: https://github.com/Genymobile/scrcpy.git
plugin: meson
meson-parameters:
- --buildtype=release
- --strip
- -Db_lto=true
- -Dcompile_server=false
override-pull: |
snapcraftctl pull
snapcraftctl set-version $(git describe --tag)
build-packages:
- make
- gcc
- pkg-config
- meson
- ninja-build
- libavcodec-dev
- libavformat-dev
- libavutil-dev
- libsdl2-dev
- wget
stage-packages:
- ffmpeg
- libsdl2-2.0-0
- libslang2
- libglu1-mesa
- adb
guiscrcpy:
after: [desktop-qt5, classic-launch, debian-multiarch-triplet-provider-launch]
# See 'snapcraft plugins'
plugin: python
python-version: python3
source: .
plugs:
adb-support:
desktop:
desktop-legacy:
x11:
unity7:
wayland:
opengl:
home:
process-control:
network-bind:
network:
adb:
interface: content
target: $SNAP/usr/bin
# some parts are inherited from https://github.com/sisco311/scrcpy-snap/blob/master/snap/snapcraft.yaml
# Thanks @sisco311 for the amazing snap!!