-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
158 lines (149 loc) · 4.42 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
146
147
148
149
150
151
152
153
154
155
156
157
158
name: ags # you probably want to 'snapcraft register <name>'
version: '3.5.0.10' # just for humans, typically '1.2+git' or '1.3.2'
summary: adventure game studio engine for playing ags games. # 79 char long summary
description: |
Run adventure games made in Adventure Game Studio, by using the ags linux engine.
When installed, just run ags in the folder that contains the game!
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
apps:
ags:
command: desktop-launch alsa-launch allegro-modules-launch ${SNAP}/bin/ags
plugs:
- desktop
- desktop-legacy
- home
- pulseaudio
- x11
- opengl
parts:
lib-alleg:
after: [alsa, desktop-glib-only]
#source: https://github.com/liballeg/allegro5/releases/download/4.4.3.1/allegro-4.4.3.1.tar.gz
#source-type: tar
source: https://github.com/adventuregamestudio/lib-allegro.git
source-type: git
source-branch: allegro-4.4.2-agspatch
plugin: cmake
override-build: |
snapcraftctl build
cat > allegro-modules-launch <<EOF
#!/bin/bash
if [ "\$SNAP_ARCH" == "amd64" ]; then
ARCH="x86_64-linux-gnu"
elif [ "\$SNAP_ARCH" == "armhf" ]; then
ARCH="arm-linux-gnueabihf"
elif [ "\$SNAP_ARCH" == "arm64" ]; then
ARCH="aarch64-linux-gnu"
else
ARCH="\$SNAP_ARCH-linux-gnu"
fi
export ALLEGRO_MODULES="\$SNAP/usr/lib/\$ARCH/allegro/4.4.2"
exec "\$@"
EOF
install -m755 -D -t $SNAPCRAFT_PART_INSTALL/bin allegro-modules-launch
configflags:
- -DWANT_DOCS=0
- -DALLEGRO_WITH_ALSADIGI=1
build-packages:
- g++
- gcc
- make
- libpng12-dev
- git
- debhelper
- build-essential
- pkg-config
- libaldmb1-dev
- libfreetype6-dev
- libtheora-dev
- libvorbis-dev
- libogg-dev
- libasound2-dev
ags:
after: [alsa, desktop-glib-only,lib-alleg]
plugin: make
make-parameters:
- --directory=Engine
make-install-var: PREFIX
source-type: tar
source: https://github.com/adventuregamestudio/ags/releases/download/v.3.5.0.10/ags_linux_v.3.5.0.10.tar.xz
override-pull: |
snapcraftctl pull
# sed -i '605s/DIGI_NONE/DIGI_ALSA/' $SNAPCRAFT_PART_SRC/Engine/main/engine.cpp
build-packages:
- g++
- gcc
- make
- libpng12-dev
- git
- debhelper
- build-essential
- pkg-config
- libaldmb1-dev
- libfreetype6-dev
- libtheora-dev
- libvorbis-dev
- libogg-dev
stage-packages:
- libx11-6
- libxcursor1
- libpng12-0
- libaldmb1
- libfreetype6
- libtheora0
- libogg0
- libvorbis0a
- libvorbisfile3
stage:
- -usr/share/alsa/alsa.conf
- -usr/share/alsa/cards/USB-Audio.conf
- -usr/share/alsa/cards/aliases.conf
- -usr/share/alsa/pcm/dmix.conf
- -usr/share/alsa/pcm/dsnoop.conf
- -usr/share/alsa/pcm/surround21.conf
- -usr/share/alsa/pcm/surround40.conf
- -usr/share/alsa/pcm/surround41.conf
- -usr/share/alsa/pcm/surround50.conf
- -usr/share/alsa/pcm/surround51.conf
- -usr/share/alsa/pcm/surround71.conf
- -usr/lib/x86_64-linux-gnu/libasound.so.2
- -usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
# specify remote part build order
alsa:
after: [alsa-lib, alsa-plugins]
alsa-lib:
# configflags needed until LP#1766878 is fixed
configflags:
- --prefix=/usr
- --sysconfdir=/etc
- --libexec=/usr/lib
- --libdir=/usr/lib
- --localstatedir=/var
- --with-configdir=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/share/alsa
- --with-plugindir=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/alsa-lib
- --disable-alisp
- --disable-aload
- --disable-python
- --disable-static
- --disable-topology
- --disable-ucm
- --enable-symbolic-functions
alsa-plugins:
after: [alsa-lib]
# configflags needed until LP#1766878 is fixed
configflags:
- --prefix=/usr
- --sysconfdir=/etc
- --libexec=/usr/lib
- --libdir=/usr/lib
- --localstatedir=/var
- --disable-arcamav
- --disable-avcodec
- --disable-jack
- --disable-mix
- --disable-oss
- --disable-usbstream
- --with-plugindir=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/lib/alsa-lib
- --disable-static
- LDFLAGS=-L$SNAPCRAFT_STAGE/usr/lib