forked from lutris/lutris
-
Notifications
You must be signed in to change notification settings - Fork 2
/
snapcraft.yaml
123 lines (104 loc) · 6.78 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
name: lutris
version: git
confinement: devmode #chaning to strict causes errors trying to read nvidia version file, need to figure it out
base: core18
grade: stable
architectures:
- build-on: amd64
- build-on: i386
summary: lutris snap
description: |
Lutris is a gaming platform for GNU/Linux. Its goal is to make
gaming on Linux as easy as possible by taking care of installing
and setting up the game for the user. The only thing you have to
do is play the game. It aims to support every game that is playable
on Linux.
parts:
enable-i386:
plugin: nil
override-build: |
snapcraftctl build
if [ "$SNAPCRAFT_ARCH_TRIPLET" = "x86_64-linux-gnu" ]; then
dpkg --add-architecture i386
apt update
fi
desktop-gnome-platform:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-depth: 1
source-subdir: gtk
plugin: make
build-packages: [build-essential, libgtk-3-dev]
override-build: |
snapcraftctl build
mkdir -pv $SNAPCRAFT_PART_INSTALL/gnome-platform
after: [enable-i386]
wine:
plugin: nil
build-packages: [dpkg, wget]
override-build: |
snapcraftctl build
ARCH="$(dpkg --print-architecture)"
WINE_REL="wine-devel"
WINE_VER="4.7"
# wget and dpkg extract the wine debs
## supporting binaries which are arch-specific but the same filenames in both architectures so we only install the native architecture
DEB_URLS="https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-${ARCH}/${WINE_REL}_${WINE_VER}~bionic_${ARCH}.deb"
## wine loaders - this one is the native system architecture
DEB_URLS="$DEB_URLS https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-${ARCH}/${WINE_REL}-${ARCH}_${WINE_VER}~bionic_${ARCH}.deb"
if [ "$ARCH" = "amd64" ]; then
## on amd64 builds we need to also bundle the i386 wine loaders
DEB_URLS="$DEB_URLS https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/main/binary-i386/${WINE_REL}-i386_${WINE_VER}~bionic_i386.deb"
fi
for DEB_URL in ${DEB_URLS}; do
DEB=$(basename "${DEB_URL}")
echo "Downloading ${DEB_URL}..."
wget --quiet "${DEB_URL}" -O "${SNAPCRAFT_PART_INSTALL}/${DEB}"
echo "Unpacking ${DEB}..."
dpkg -x "${SNAPCRAFT_PART_INSTALL}/${DEB}" ${SNAPCRAFT_PART_INSTALL}
rm -f "${SNAPCRAFT_PART_INSTALL}/${DEB}"
done
# Organise and cleanup
cp -a ${SNAPCRAFT_PART_INSTALL}/opt/${WINE_REL}/* ${SNAPCRAFT_PART_INSTALL}/
stage: [-opt, -share/applications, -share/man, -usr/share/doc, -usr/share/lintian]
after: [enable-i386]
wine-runtime:
plugin: nil
stage-packages: [libasound2, libasound2-plugins, libglib2.0-0, libgphoto2-6, gstreamer1.0-plugins-base, libgstreamer-plugins-base1.0-0, liblcms2-2, libldap-2.4-2, libmpg123-0, libncurses5, libopenal1, libpcap0.8, libpulse0, libudev1, libxext6, libxml2, zlib1g, libcups2, libdbus-1-3, libfontconfig1, libfreetype6, libgif7, libglu1-mesa, libgnutls30, libgpg-error0, libgsm1, libgssapi-krb5-2, libjpeg8, libodbc1, libosmesa6, libpng16-16, libsane, libsdl2-2.0-0, libsqlite3-0, libtiff5, libva2, libv4l-0, libvulkan1, libxcomposite1, libxcursor1, libxfixes3, libxi6, libxinerama1, libxrandr2, libxrender1, libxslt1.1, libxxf86vm1, locales-all, va-driver-all, samba-libs, winbind, adwaita-icon-theme, dmz-cursor-theme, gnome-themes-standard, ibus-gtk3, libappindicator3-1, libgdk-pixbuf2.0-0, libgtk-3-0, libgtk-3-bin, libibus-1.0-5, libxkbcommon0, light-themes, shared-mime-info, ttf-ubuntu-font-family, unity-gtk3-module, xdg-user-dirs, on amd64: ['libasound2:i386', 'libasound2-plugins:i386', 'libc6:i386', 'libglib2.0-0:i386', 'libgphoto2-6:i386', 'gstreamer1.0-plugins-base:i386', 'libgstreamer-plugins-base1.0-0:i386', 'liblcms2-2:i386', 'libldap-2.4-2:i386', 'libmpg123-0:i386', 'libncurses5:i386', 'libopenal1:i386', 'libpcap0.8:i386', 'libpulse0:i386', 'libudev1:i386', 'libxext6:i386', 'libxml2:i386', 'zlib1g:i386', 'libcups2:i386', 'libdbus-1-3:i386', 'libfontconfig1:i386', 'libfreetype6:i386', 'libgif7:i386', 'libglu1-mesa:i386', 'libgnutls30:i386', 'libgpg-error0:i386', 'libgsm1:i386', 'libgssapi-krb5-2:i386', 'libjpeg8:i386', 'libodbc1:i386', 'libosmesa6:i386', 'libpng16-16:i386', 'libsane:i386', 'libsdl2-2.0-0:i386', 'libsqlite3-0:i386', 'libtiff5:i386', 'libv4l-0:i386', 'libva2:i386', 'libvulkan1:i386', 'libxcomposite1:i386', 'libxcursor1:i386', 'libxfixes3:i386', 'libxi6:i386', 'libxinerama1:i386', 'libxrandr2:i386', 'libxrender1:i386', 'libxslt1.1:i386', 'libxxf86vm1:i386', 'va-driver-all:i386', 'samba-libs:i386', 'winbind:i386', 'ibus-gtk3:i386', 'libappindicator3-1:i386', 'libgdk-pixbuf2.0-0:i386', 'libgtk-3-0:i386', 'libgtk-3-bin:i386', 'libibus-1.0-5:i386', 'libxkbcommon0:i386', 'unity-gtk3-module:i386']]
stage: [-etc/init, -etc/init.d, -etc/logrotate.d, -usr/share/apps, -usr/share/applications, -usr/share/bug, -usr/share/doc, -usr/share/doc-base, -usr/share/debhelper, -usr/share/lintian, -usr/share/man, -usr/share/pixmaps, -usr/share/pkgconfig, -lib/ld-linux.so.2]
after: [enable-i386]
lutris:
plugin: python
python-version: python3
source: https://github.com/lutris/lutris.git
override-build: |
snapcraftctl build
sed -i 's|Name=Lutris|Name=Lutris|' ${SNAPCRAFT_PART_INSTALL}/share/applications/net.lutris.Lutris.desktop
stage-packages: ['python3-all-dev', 'gir1.2-gtk-3.0', 'gir1.2-glib-2.0', 'gir1.2-gnomedesktop-3.0', 'gir1.2-webkit2-4.0', gir1.2-notify-0.7, libgirepository1.0-dev, libc-bin]
after: [enable-i386]
lutris-runtime:
plugin: nil
stage-packages: [python3, python3-setproctitle, python3-yaml, python3-requests, python3-pil, python3-gi, dh-python, curl, cabextract, psmisc, gvfs-backends, unzip, p7zip, mesa-utils, fluid-soundfont-gs, libgnutls30, x11-xserver-utils, on amd64: ['libxrandr-dev:i386', 'libgnutls30:i386', 'x11-xserver-utils:i386', 'libc6-i386', 'lib32gcc1'] ]
stage: [-lib/ld-linux.so.2, -usr/bin/cpp-7, -usr/share/doc/cpp/README.Debian, -usr/share/man/man1/cpp-7.1.gz]
after: [enable-i386]
plugs:
gnome-3-28-1804:
interface: content
target: $SNAP/gnome-platform
default-provider: gnome-3-28-1804
slots:
lutris:
interface: dbus
bus: session
name: net.lutris.Lutris
apps:
lutris:
command: bin/desktop-launch $SNAP/bin/lutris -d
plugs: [home, daemon-notify, network, network-bind, network-manager, desktop, desktop-legacy, unity7, wayland, opengl, pulseaudio, gsettings, x11, screen-inhibit-control, kvm, libvirt, removable-media, joystick, io-ports-control, hardware-observe, mount-observe]
slots: [ lutris ]
desktop: share/applications/net.lutris.Lutris.desktop
wine:
command: bin/desktop-launch $SNAP/bin/wine
wine64:
command: bin/desktop-launch $SNAP/bin/wine64
winecfg:
command: bin/desktop-launch $SNAP/bin/winecfg