-
Notifications
You must be signed in to change notification settings - Fork 1
/
de.bforartists.Bforartists.yaml
199 lines (189 loc) · 6.41 KB
/
de.bforartists.Bforartists.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Flatpak name with runtime
# and runtime version
id: de.bforartists.Bforartists
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: bforartists
# Sandbox permissions, fine tuned for
# the vast majority of Linux users
finish-args:
- --share=ipc
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio
- --device=dri
- --share=network
- --filesystem=home
- --filesystem=/tmp
- --filesystem=/run/spnav.sock:ro
- --env=SPNAV_SOCKET=/run/spnav.sock
- --env=TMP_DIR=/tmp
- --env=TMP=/tmp
- --env=LD_LIBRARY_PATH=/app/lib
# We bundle non-free codecs with Bforartists,
# which are build when the Flatpak is
# built. To allow users/distro maintainers
# to remove non-free codecs, we make this an
# extension that can be removed
add-extensions:
de.bforartists.Bforartists.Codecs:
directory: lib/codecs
add-ld-path: lib
bundle: true
autodelete: true
org.freedesktop.Platform.ffmpeg-full:
directory: lib/ffmpeg
version: '23.08'
add-ld-path: .
cleanup-commands:
- mkdir -p /app/lib/ffmpeg
modules:
- shared-modules/libdecor/libdecor-0.2.0.json
# Build codecs, including non-free ones
- name: x264
config-opts:
- --prefix=/app/lib/codecs
- --enable-lto
- --enable-pic
- --enable-shared
- --disable-cli
sources:
- type: git
url: https://code.videolan.org/videolan/x264.git
commit: 31e19f92f00c7003fa115047ce50978bc98c3a0d
cleanup:
- /lib/codecs/include
- /lib/codecs/lib/pkgconfig
# We build ffmpeg as Blender (and by extension,
# Bforartists) doesn't work well with OpenH264
- name: ffmpeg
build-options:
env:
PKG_CONFIG_PATH: /app/lib/codecs/lib/pkgconfig
config-opts:
- --prefix=/app/lib/codecs
- --enable-shared
- --disable-static
- --disable-doc
- --enable-gpl
- --enable-version3
- --disable-nonfree
- --enable-optimizations
- --enable-pthreads
- --disable-bzlib
- --disable-libgsm
- --enable-libtheora
- --enable-libvorbis
- --enable-libvpx
- --enable-libx264
- --enable-zlib
- --disable-libxcb
- --disable-lzma
- --disable-programs
- --disable-network
- --disable-protocols
- --enable-protocol=file
- --disable-devices
- --enable-muxer=avi
- --enable-muxer=h264
- --enable-muxer=mov
- --enable-muxer=mp4
- --enable-muxer=ogg
- --enable-muxer=webm
- --enable-demuxer=avi
- --enable-demuxer=h264
- --enable-demuxer=mov
- --enable-demuxer=mp3
- --enable-demuxer=ogg
- --enable-demuxer=wav
- --enable-parser=h264
- --enable-parser=vorbis
- --enable-encoder=aac
- --enable-encoder=libtheora
- --enable-encoder=libvorbis
- --enable-encoder=libvpx_vp8
- --enable-encoder=libvpx_vp9
- --enable-encoder=libx264
- --enable-encoder=mpeg4
- --enable-decoder=aac
- --enable-decoder=h264
- --enable-decoder=libvorbis
- --enable-decoder=libvpx_vp8
- --enable-decoder=libvpx_vp9
- --enable-decoder=mp3
- --enable-decoder=mpeg4
- --enable-decoder=pcm_s16le
- --enable-decoder=theora
sources:
- type: archive
url: https://www.ffmpeg.org/releases/ffmpeg-6.1.1.tar.xz
sha256: 8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968
cleanup:
- /lib/codecs/include
- /lib/codecs/lib/pkgconfig
- /lib/codecs/share
# Libcrypt for BlenderKit support
# https://github.com/flathub/org.blender.Blender/issues/166
- name: libxcrypt
config-opts:
- --prefix=/app
- --enable-shared
- --enable-obsolute-api=glibc
sources:
- type: archive
url: https://github.com/besser82/libxcrypt/releases/download/v4.4.36/libxcrypt-4.4.36.tar.xz
sha256: e5e1f4caee0a01de2aee26e3138807d6d3ca2b8e67287966d1fefd65e1fd8943
# Bforartists itself
- name: bforartists
buildsystem: simple
# All commands executed that ultimately
# install Bforartists to the Flatpak
# runtime. This includes desktop files/icons,
# as well as the metadata file used for Flathub
build-commands:
- mv Bforartists*Linux* bforartists
- install -Dm755 bforartists.sh /app/bin/bforartists
- mv bforartists /app/bforartists
- install -Dm644 /app/bforartists/bforartists.desktop /app/share/applications/$FLATPAK_ID.desktop
- desktop-file-edit --set-icon=${FLATPAK_ID} /app/share/applications/${FLATPAK_ID}.desktop
- install -Dm644 $FLATPAK_ID.svg /app/share/icons/hicolor/scalable/apps/$FLATPAK_ID.svg
- install -Dm644 /app/bforartists/bforartists-symbolic.svg /app/share/icons/hicolor/symbolic/apps/$FLATPAK_ID-symbolic.svg
- cd /app/bforartists/*.*/datafiles && mv locale /app/share/locale && ln -sf
/app/share/locale locale
- install -Dm644 $FLATPAK_ID.metainfo.xml /app/share/metainfo/$FLATPAK_ID.metainfo.xml
# Bforartists tar archive, retrived from
# GitHub releases and verified with a sha256
# checksum. For every update, the URL and checksum
# need to be updated. For the checksum, it is as simple
# as downloading the tar archive and running
# sha256sum <bforartists tar archive>
sources:
- type: archive
url: https://github.com/Bforartists/Bforartists/releases/download/v4.2.2/Bforartists-4.2.2-Linux.tar.xz
sha256: 570ba3338bb4a40c49aebbdbaa0799cc59d367eb864fbe2814b9b6e1a51cd073
strip-components: 0
# This is to verify that the URL indeed
# exists. This is different from the
# checksum, which checks if the downloaded
# tar archive is indeed the correct archive
#
# In addition, this also checks for new updates
# to the tar archive automatically
x-checker-data:
type: anitya
project-id: 359756
stable-only: true
versions:
'>=': 3.6.0
url-template: https://github.com/Bforartists/Bforartists/releases/download/v$version/Bforartists-$version-Linux.tar.xz
# Metadata and script that executes Bforartists
- type: file
path: de.bforartists.Bforartists.metainfo.xml
- type: file
path: branding/de.bforartists.Bforartists.svg
- type: script
commands:
- cd /app/bforartists
- exec ./bforartists "$@"
dest-filename: bforartists.sh