-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathno.mifi.losslesscut.yaml
85 lines (77 loc) · 3.3 KB
/
no.mifi.losslesscut.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
app-id: no.mifi.losslesscut
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node18
command: /app/bin/run.sh
finish-args:
- --socket=x11
- --share=ipc
- --device=dri # Without DRI the app doesn't come up :-/
- --socket=pulseaudio # We want to play sound, I suppose
# Electron cannot do portals :(
- --filesystem=xdg-download
- --filesystem=xdg-public-share
- --filesystem=xdg-videos
- --talk-name=org.freedesktop.Notifications
modules:
- name: lossless-cut
buildsystem: simple
run-tests: true
build-options:
append-path: /usr/lib/sdk/node18/bin
env:
NPM_CONFIG_LOGLEVEL: info
npm_config_nodedir: /usr/lib/sdk/node18
XDG_CACHE_HOME: /run/build/lossless-cut/flatpak-node/cache
modules:
- ffmpeg.yaml
- name: libvips
buildsystem: meson
sources:
- type: archive
url: https://github.com/libvips/libvips/releases/download/v8.15.1/vips-8.15.1.tar.xz
sha256: 06811f5aed3e7bc03e63d05537ff4b501de5283108c8ee79396c60601a00830c
x-checker-data:
type: json
url: https://api.github.com/repos/libvips/libvips/releases/latest
version-query: .tag_name | sub("^v"; "")
url-query: .assets[] | select(.name=="vips-" + $version + ".tar.xz")
| .browser_download_url
build-commands:
- node --version
- yarn --version
- $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn2-setup.sh
- yarn install
- if [ $(arch) = "x86_64" ]; then install -Dm a+rx /app/bin/ffmpeg ffmpeg/linux-x64/ffmpeg; install
-Dm a+rx /app/bin/ffprobe ffmpeg/linux-x64/ffprobe; elif [ $(arch) = "aarch64"
]; then install -Dm a+rx /app/bin/ffmpeg ffmpeg/linux-arm64/ffmpeg; install
-Dm a+rx /app/bin/ffprobe ffmpeg/linux-arm64/ffprobe; else echo "unknown";
exit 1; fi
- yarn build
- |
. flatpak-node/electron-builder-arch-args.sh
yarn run pack-linux $ELECTRON_BUILDER_ARCH_ARGS --config.asar=false --dir
- mkdir -p /app/lossless-cut
- cp -ar dist/linux-*unpacked/* /app/lossless-cut/
# Install the required static files
- install run.sh /app/bin/run.sh
- desktop-file-edit --set-key Exec --set-value /app/bin/run.sh no.mifi.losslesscut.desktop
- install -Dm 0644 no.mifi.losslesscut.desktop /app/share/applications/no.mifi.losslesscut.desktop
- install -Dm 0644 no.mifi.losslesscut.appdata.xml /app/share/metainfo/no.mifi.losslesscut.appdata.xml
- install -Dm 0644 src/icon.svg /app/share/icons/hicolor/scalable/apps/no.mifi.losslesscut.svg
test-commands:
- /app/lossless-cut/resources/ffmpeg -version
# This is what the app would call. Let's try it ourselves to see whether we're good.
- /app/lossless-cut/resources/ffmpeg '-hide_banner' '-f' 'lavfi' '-i' 'nullsrc=s=256x256:d=1'
'-f' 'null' '-'
sources:
- type: archive
url: https://github.com/mifi/lossless-cut/archive/v3.55.1.tar.gz
sha256: f1c39a0fafb217b03b2dc6e5fe608a953e9478f634c7eb8c9406038928d1f936
- type: script
dest-filename: run.sh
commands:
- /app/lossless-cut/losslesscut --no-sandbox
- generated-sources.json