-
Notifications
You must be signed in to change notification settings - Fork 34
/
snapcraft.yaml
712 lines (673 loc) · 21.2 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
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
name: obs-studio
summary: OBS - Free and open source software for live streaming and screen recording
description: |
OBS Studio is software designed for capturing, compositing, encoding, recording,
and streaming video content, efficiently.
It's distributed under the GNU General Public License v2 - see the accompanying COPYING file for more details.
adopt-info: obs
base: core18
grade: stable
confinement: strict
architectures:
- build-on: amd64
- build-on: i386
# We should migrate to using the official folder for obs-studio config
#plugs:
# obs-config-dir:
# interface: personal-files
# write: [$HOME/.config/obs-studio]
plugs:
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes
layout:
/usr/lib/obs-plugins:
bind: $SNAP/usr/lib/obs-plugins
/usr/lib/obs-scripting:
bind: $SNAP/usr/lib/obs-scripting
/usr/local/lib:
bind: $SNAP/usr/local/lib
/usr/share/alsa:
bind: $SNAP/usr/share/alsa
/usr/share/obs:
bind: $SNAP/usr/share/obs
/usr/share/X11:
bind: $SNAP/usr/share/X11
apps:
obs-studio:
command: desktop-launch $SNAP/bin/launcher
command-chain:
- sem-open-preload-launch
environment:
# Tell libGL where to find the drivers
LIBGL_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri
LIBVA_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri
# Mesa Libs for OpenGL support
# Workaround in snapd for proprietary nVidia drivers mounts the drivers in
# /var/lib/snapd/lib/gl that needs to be in LD_LIBRARY_PATH
# Without that OpenGL using apps do not work with the nVidia drivers.
# Ref.: https://bugs.launchpad.net/snappy/+bug/1588192
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa-egl:$LIBGL_DRIVERS_PATH:/var/lib/snapd/lib/gl:$SNAP_USER_DATA/.config/obs-studio/plugins
plugs:
- browser-support
- network
- network-bind
- desktop
- desktop-legacy
- opengl
- pulseaudio
- audio-playback
- audio-record
- x11
- unity7
- camera
- home
- removable-media
- wayland
- jack1
- joystick
parts:
sem-open-preload:
source: https://github.com/sergiusens/sem-open-preload.git
plugin: make
make-parameters:
- CC=gcc-8
- CXX=g++-8
build-packages:
- gcc-8
- g++-8
desktop-qt5:
build-packages:
- gcc-8
- g++-8
- qtbase5-dev
- dpkg-dev
plugin: make
make-parameters:
- CC=gcc-8
- CXX=g++-8
- FLAVOR=qt5
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: qt
stage-packages:
- libqt5gui5
- libqt5svg5
- qtwayland5
- shared-mime-info
- xdg-user-dirs
nv-codec-headers:
plugin: make
make-parameters:
- CC=gcc-8
- CXX=g++-8
- PREFIX=/usr
source: https://github.com/FFmpeg/nv-codec-headers.git
source-tag: 'n9.1.23.1'
build-packages:
- gcc-8
- g++-8
- pkg-config
ffmpeg:
after: [ nv-codec-headers ]
plugin: autotools
source: https://github.com/FFmpeg/FFmpeg.git
source-branch: release/4.2
source-depth: 1
build-packages:
- gcc-8
- g++-8
- libass-dev
- libbz2-dev
- libdrm-dev
- libfdk-aac-dev
- libgnutls28-dev
- liblzma-dev
- libmp3lame-dev
- libomxil-bellagio-dev
- libopenal-dev
- libopencore-amrnb-dev
- libopencore-amrwb-dev
- libopus-dev
- libpulse-dev
- librsvg2-dev
- libsctp-dev
- libsdl2-dev
- libspeex-dev
- libtheora-dev
- libtwolame-dev
- libva-dev
- libv4l-dev
- libvdpau-dev
- libvorbis-dev
- libvpx-dev
- libx264-dev
- libx265-dev
- libxcb-shape0-dev
- libxcb-shm0-dev
- libxcb-xfixes0-dev
- libxv-dev
- libxvidcore-dev
- ocl-icd-opencl-dev
- opencl-headers
- pkg-config
- yasm
- on amd64:
- libcrystalhd-dev
- on i386:
- libcrystalhd-dev
stage-packages:
- libass9
- libdrm2
- libfdk-aac1
- libgnutls30
- libmp3lame0
- libopenal1
- libopencore-amrnb0
- libopencore-amrwb0
- libopus0
- libpulse0
- librsvg2-2
- libsdl2-2.0-0
- libspeex1
- libtheora0
- libtwolame0
- libv4l-0
- libv4l2rds0
- libva-drm2
- libva-glx2
- libva-wayland2
- libvdpau-va-gl1
- libvorbis0a
- libvorbisenc2
- libvpx5
- libx264-152
- libx265-146
- libx11-6
- libxau6
- libxcb-shape0
- libxcb-shm0
- libxcb-xfixes0
- libxcb1
- libxdmcp6
- libxext6
- libxv1
- libxvidcore4
- mesa-va-drivers
- mesa-vdpau-drivers
- ocl-icd-libopencl1
- on amd64:
- i965-va-driver
- libcrystalhd3
- on i386:
- i965-va-driver
- libcrystalhd3
configflags:
- --cc=gcc-8
- --cxx=g++-8
- --prefix=/usr
- --disable-debug
- --disable-doc
- --disable-programs
- --disable-static
- --enable-avisynth
- --enable-cuda
- --enable-cuvid
- --enable-libdrm
- --enable-gnutls
- --enable-gpl
- --enable-libass
- --enable-libfdk-aac
- --enable-libfontconfig
- --enable-libfreetype
- --enable-libmp3lame
- --enable-libopencore_amrnb
- --enable-libopencore_amrwb
- --enable-libopus
- --enable-libpulse
- --enable-sdl2
- --enable-libspeex
- --enable-libtheora
- --enable-libtwolame
- --enable-libv4l2
- --enable-libvorbis
- --enable-libvpx
- --enable-libx264
- --enable-libxcb
- --enable-libxvid
- --enable-nonfree
- --enable-nvenc
- --enable-omx
- --enable-openal
- --enable-opencl
- --enable-runtime-cpudetect
- --enable-librsvg
- --enable-shared
- --enable-vaapi
- --enable-vdpau
- --enable-version3
- --enable-xlib
prime:
- usr/bin
- usr/lib
- usr/lib/pkgconfig
- usr/include
- -usr/share/doc
- -usr/share/man
libuiohook:
plugin: autotools
configflags:
- CC=gcc-8
- CCX=g++-8
- --prefix=/usr
source: https://github.com/kwhat/libuiohook.git
source-tag: '1.0.3'
build-packages:
- gcc-8
- g++-8
- libxinerama-dev
- libxt-dev
- libxtst-dev
- pkg-config
stage-packages:
- libxinerama1
- libxt6
- libxtst6
netlib:
plugin: cmake
source: https://github.com/univrsal/netlib.git
source-tag: 'v0.2'
build-packages:
- gcc-8
- g++-8
override-build: |
cmake \
-DCMAKE_CXX_COMPILER=g++-8 \
-DCMAKE_C_COMPILER=gcc-8 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
${SNAPCRAFT_PART_SRC}
make
organize:
libnetlib.so: usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libnetlib.so
netlib_client: usr/bin/netlib_client
netlib_server: usr/bin/netlib_server
obs:
plugin: cmake
after:
- desktop-qt5
- ffmpeg
# Required for input-overlay
- libuiohook
- netlib
configflags:
- -DCMAKE_C_COMPILER=gcc-8
- -DCMAKE_CXX_COMPILER=g++-8
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DUNIX_STRUCTURE=1
- -DDISABLE_UPDATE_MODULE=TRUE
- -DBUILD_BROWSER=ON
- -DCEF_ROOT_DIR=$SNAPCRAFT_PART_SRC/cef_binary
source: https://github.com/obsproject/obs-studio.git
override-pull: |
snapcraftctl pull
set -x
# Checkout that latest stable version
last_committed_tag="$(git -C ../src tag | grep -v rc| sort -V | tail -n 1)"
last_released_tag="$(snap info obs-studio | awk '$1 == "beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${last_committed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout "${last_committed_tag}"
cd ../src
git checkout "${last_committed_tag}"
fi
snapcraftctl set-version "$(git describe --tags)"
# Get the cef_binary
ARCHITECTURE=$(dpkg --print-architecture)
if [ "${ARCHITECTURE}" = "amd64" ]; then
SUFFIX="linux64"
elif [ "${ARCHITECTURE}" = "i386" ]; then
SUFFIX="linux32"
else
SUFFIX=""
fi
if [ -n "${SUFFIX}" ]; then
wget --quiet "https://cdn-fastly.obsproject.com/downloads/cef_binary_3770_${SUFFIX}.tar.bz2" -O $SNAPCRAFT_PART_SRC/cef.tar.bz2
mkdir -p ${SNAPCRAFT_PART_SRC}/cef_binary
tar jxvf ${SNAPCRAFT_PART_SRC}/cef.tar.bz2 -C ${SNAPCRAFT_PART_SRC}/cef_binary --strip-components=1
rm ${SNAPCRAFT_PART_SRC}/cef.tar.bz2
fi
####
# The following plugins are all intended to be built in tree
####
# SceneSwitcher - https://github.com/WarmUpTill/SceneSwitcher
cd ${SNAPCRAFT_PART_SRC}/UI/frontend-plugins/
git clone --recursive https://github.com/WarmUpTill/SceneSwitcher.git --branch 1.6.1
echo "add_subdirectory(SceneSwitcher)" >> CMakeLists.txt
# StreamFX - https://github.com/Xaymar/obs-StreamFX
cd ${SNAPCRAFT_PART_SRC}/UI/frontend-plugins/
git submodule add https://github.com/Xaymar/obs-StreamFX.git streamfx --branch 0.8.0
echo "add_subdirectory(streamfx)" >> CMakeLists.txt
# Source Switcher - https://github.com/exeldro/obs-source-switcher
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/exeldro/obs-source-switcher.git source-switcher
echo "add_subdirectory(source-switcher)" >> CMakeLists.txt
# Move Transition - https://github.com/exeldro/obs-move-transition
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/exeldro/obs-move-transition.git move-transition --branch 1.7.1
echo "add_subdirectory(move-transition)" >> CMakeLists.txt
# Freeze Filter - https://github.com/exeldro/obs-freeze-filter
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/exeldro/obs-freeze-filter.git freeze-filter
echo "add_subdirectory(freeze-filter)" >> CMakeLists.txt
# Replay Source - https://github.com/exeldro/obs-replay-source
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/exeldro/obs-replay-source.git replay-source
sed -i 's/install_obs_plugin_with_data(replay-source data)/install_obs_plugin(replay-source)/' replay-source/CMakeLists.txt
echo "add_subdirectory(replay-source)" >> CMakeLists.txt
# Directory watch media - https://github.com/exeldro/obs-dir-watch-media
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/exeldro/obs-dir-watch-media.git dir-watch-media
echo "add_subdirectory(dir-watch-media)" >> CMakeLists.txt
# Spectralizer - https://github.com/univrsal/spectralizer
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/univrsal/spectralizer.git --branch v1.2
echo "add_subdirectory(spectralizer)" >> CMakeLists.txt
# Scrab - https://github.com/univrsal/scrab
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/univrsal/scrab.git --branch v1.1
echo "add_subdirectory(scrab)" >> CMakeLists.txt
# Input Overlay - https://github.com/univrsal/input-overlay
cd ${SNAPCRAFT_PART_SRC}/plugins/
git clone --recursive https://github.com/univrsal/input-overlay.git --branch v4.8
echo "add_subdirectory(input-overlay)" >> CMakeLists.txt
override-build: |
# obs-frontend-api.h is required for plugins to build
mkdir -p ${SNAPCRAFT_STAGE}/usr/include/obs || true
cp -v ${SNAPCRAFT_PART_SRC}/UI/obs-frontend-api/*.h ${SNAPCRAFT_STAGE}/usr/include/obs/
# ObsPluginHelpers.cmake
mkdir -p ${SNAPCRAFT_STAGE}/usr/include/cmake/external || true
cp -v ${SNAPCRAFT_PART_SRC}/cmake/external/*.cmake ${SNAPCRAFT_STAGE}/usr/include/cmake/external/
snapcraftctl build
# Fix some missing theme assets
cp ${SNAPCRAFT_PART_SRC}/UI/data/themes/Dark/close.svg ${SNAPCRAFT_PART_INSTALL}/usr/share/obs/obs-studio/themes/Dark/Close.svg
cp ${SNAPCRAFT_PART_SRC}/UI/data/themes/Dark/popout.svg ${SNAPCRAFT_PART_INSTALL}/usr/share/obs/obs-studio/themes/Dark/Popout.svg
build-packages:
# Based on https://obsproject.com/wiki/install-instructions#debian-based-build-directions
- bzip2
- gcc-8
- g++-8
- wget
- build-essential
- libmbedtls-dev
- libasound2-dev
#- libavcodec-dev # comes via the FFmpeg part
#- libavdevice-dev # comes via the FFmpeg part
#- libavfilter-dev # comes via the FFmpeg part
#- libavformat-dev # comes via the FFmpeg part
#- libavutil-dev # comes via the FFmpeg part
- libcurl4-openssl-dev
- libfdk-aac-dev
- libfontconfig1-dev
- libfreetype6-dev
- libgl1-mesa-dev
- libjack-dev # not libjack-jackd2-dev as upstream suggests
- libjansson-dev
- libluajit-5.1-dev
- libpulse-dev
- libqt5x11extras5-dev
- libspeexdsp-dev
#- libswresample-dev # comes via the FFmpeg part
#- libswscale-dev # comes via the FFmpeg part
- libudev-dev
- libv4l-dev
- libvlc-dev
- libx11-dev
- libx264-dev
- libxcb-xinput-dev
- libxcb-shm0-dev
- libxcb-xinerama0-dev
- libxcomposite-dev
- libxinerama-dev
- pkg-config
- python3-dev
- qtbase5-dev
- libqt5svg5-dev
- swig
- libxcb-randr0-dev
- libxcb-xfixes0-dev
- libx11-xcb-dev
- libxcb1-dev
# Required by cef_binary_3770
- libnss3-dev
- libnspr4-dev
- libxtst-dev
# Required by Spectralizer
- libfftw3-dev
# Required by StreamFX
- ninja-build
stage-packages:
# Based on https://obsproject.com/wiki/install-instructions#debian-based-build-directions
- libmbedcrypto1
- libmbedtls10
- libmbedx509-0
- libasound2
- libcurl4
- libfdk-aac1
- libfreetype6
- libgl1
- libglvnd0
- jackd1 # not libjack-jackd2-0 as upstream suggests
- libjansson4
- libluajit-5.1-2
- libpulse0
- libqt5x11extras5
- libspeexdsp1
- libv4l-0
- libv4lconvert0
- libv4l2rds0
- libvlc5
- libx11-6
- libx264-152
- libxcb-shm0
- libxcb-xinerama0
- libxcomposite1
- libxinerama1
- libpython3.6
- libqt5core5a
- libqt5svg5
- libqt5xml5
- libxcb-xinput0
- libxcb-randr0
- libxcb-xfixes0
- libx11-xcb1
- libxcb1
# Required by cef_binary_3770
- libatk-bridge2.0-0
- libatspi2.0-0
- libnss3
- libnspr4
- libxtst6
# Required by Spectralizer
- libfftw3-3
obs-v4l2sink:
plugin: cmake
after: [ obs ]
source: https://github.com/CatxFish/obs-v4l2sink.git
override-build: |
set -x
cd $SNAPCRAFT_PART_SRC
cmake \
-DCMAKE_C_COMPILER=gcc-8 \
-DCMAKE_CXX_COMPILER=g++-8 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DLIBOBS_INCLUDE_DIR=$SNAPCRAFT_STAGE/usr/include/obs/ \
$SNAPCRAFT_PART_SRC 2>/dev/null || true
make
make install DESTDIR=$SNAPCRAFT_PART_INSTALL
obs-transition-matrix:
plugin: cmake
after: [ obs ]
source: https://github.com/admshao/obs-transition-matrix.git
source-tag: 'v1.0'
configflags:
- -DCMAKE_C_COMPILER=gcc-8
- -DCMAKE_CXX_COMPILER=g++-8
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DLIBOBS_INCLUDE_DIR=$SNAPCRAFT_STAGE/usr/include/obs/
- -DLIBOBS_LIB=$SNAPCRAFT_STAGE/usr/lib/
obs-dvd-screensaver:
plugin: cmake
after: [ obs ]
source: https://github.com/univrsal/dvds3.git
source-tag: 'independent-build'
configflags:
- -DCMAKE_C_COMPILER=gcc-8
- -DCMAKE_CXX_COMPILER=g++-8
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
override-build: |
snapcraftctl build
mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/share/obs/obs-plugins/dvd-screensaver/ || true
cp -v ${SNAPCRAFT_PART_SRC}/data/dvd.png ${SNAPCRAFT_PART_INSTALL}/usr/share/obs/obs-plugins/dvd-screensaver/
organize:
root/.config/obs-studio/plugins/dvd-screensaver/bin/*bit/dvd-screensaver.so: usr/lib/obs-plugins/
root/.config/obs-studio/plugins/dvd-screensaver/data/locale/*.ini: usr/share/obs/obs-plugins/dvd-screensaver/locale/
prime:
- -root
obs-vintage-filter:
plugin: cmake
after: [ obs ]
source: https://github.com/cg2121/obs-vintage-filter.git
source-tag: 'v0.1'
configflags:
- -DCMAKE_C_COMPILER=gcc-8
- -DCMAKE_CXX_COMPILER=g++-8
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DLIBOBS_INCLUDE_DIR=$SNAPCRAFT_STAGE/usr/include/obs/
- -DLIBOBS_LIB=$SNAPCRAFT_STAGE/usr/lib/
obs-rgb-levels:
plugin: cmake
after: [ obs ]
source: https://github.com/petrifiedpenguin/obs-rgb-levels-filter.git
configflags:
- -DCMAKE_C_COMPILER=gcc-8
- -DCMAKE_CXX_COMPILER=g++-8
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DLIBOBS_INCLUDE_DIR=$SNAPCRAFT_STAGE/usr/include/obs/
- -DLIBOBS_LIB=$SNAPCRAFT_STAGE/usr/lib/
obs-vnc:
plugin: cmake
after: [ obs ]
source: https://github.com/norihiro/obs-vnc.git
source-tag: '0.1.0'
build-packages:
- libvncserver-dev
stage-packages:
- libvncclient1
override-build: |
set -x
mkdir -p $SNAPCRAFT_PART_SRC/build
cd $SNAPCRAFT_PART_SRC/build
cmake \
-DCMAKE_C_COMPILER=gcc-8 \
-DCMAKE_CXX_COMPILER=g++-8 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DLIBOBS_INCLUDE_DIR=$SNAPCRAFT_STAGE/usr/include/obs/ \
$SNAPCRAFT_PART_SRC 2>/dev/null || true
make
make install DESTDIR=$SNAPCRAFT_PART_INSTALL
organize:
usr/lib/$SNAPCRAFT_ARCH_TRIPLET/obs-plugins/obs-vnc.so: usr/lib/obs-plugins/
obs-websocket:
plugin: cmake
after: [ obs ]
source: https://github.com/Palakis/obs-websocket.git
source-tag: '4.8.0'
configflags:
- -DCMAKE_C_COMPILER=gcc-8
- -DCMAKE_CXX_COMPILER=g++-8
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DLIBOBS_INCLUDE_DIR=$SNAPCRAFT_STAGE/usr/include/obs/
- -DUSE_UBUNTU_FIX=true
build-packages:
- libasio-dev
- libwebsocketpp-dev
prime:
- -usr/lib/$SNAPCRAFT_ARCH_TRIPLET/obs-plugins/obs-websocket.so
libndi:
plugin: nil
build-packages:
- libarchive-tools
- wget
stage-packages:
- libavahi-client3
- libavahi-common3
override-build: |
wget -c http://514f211588de67e4fdcf-437b8dd50f60b69cf0974b538e50585b.r63.cf1.rackcdn.com/Utilities/SDK/NDI_SDK_Linux_v2/InstallNDISDK_v4_Linux.tar.gz
mkdir NDISDK || true
bsdtar -x -f InstallNDISDK_v4_Linux.tar.gz -C NDISDK
cd NDISDK
TARGET="$(sed -n '/^__NDI_ARCHIVE_BEGIN__$/=' "InstallNDISDK_v4_Linux.sh")"
TARGET="$((TARGET + 1))"
tail -n +"$TARGET" "InstallNDISDK_v4_Linux.sh" | tar -zxvf -
SDK="${SNAPCRAFT_PART_BUILD}/NDISDK/NDI SDK for Linux"
# binaries
install -D -m755 "${SDK}/bin/${SNAPCRAFT_ARCH_TRIPLET}/"ndi* -t "${SNAPCRAFT_PART_INSTALL}/usr/bin"
# headers
install -D -m644 "${SDK}/include/"*.h -t "${SNAPCRAFT_PART_INSTALL}/usr/include"
# library
install -D -m755 "${SDK}/lib/${SNAPCRAFT_ARCH_TRIPLET}/libndi.so.4".*.* -t "${SNAPCRAFT_PART_INSTALL}/usr/local/lib/"
cd "${SNAPCRAFT_PART_INSTALL}/usr/local/lib"
ln -s "libndi.so.4".*.* "libndi.so.4"
ln -s "libndi.so.4".*.* libndi.so
obs-ndi:
plugin: cmake
after:
- obs
- libndi
source: https://github.com/Palakis/obs-ndi.git
source-tag: '4.9.1'
configflags:
- -DCMAKE_C_COMPILER=gcc-8
- -DCMAKE_CXX_COMPILER=g++-8
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DUSE_UBUNTU_FIX=true
- -DLIBOBS_INCLUDE_DIR=$SNAPCRAFT_STAGE/usr/include/obs/
prime:
- -usr/lib/$SNAPCRAFT_ARCH_TRIPLET/obs-plugins/obs-ndi.so
launcher:
after: [ obs ]
plugin: dump
source: snap/local/
organize:
'launcher': bin/
cleanup:
after: [ launcher ]
plugin: nil
override-prime: |
set -eux
for CRUFT in usr/include usr/share/bug usr/share/lintian usr/share/man; do
rm -rf ${SNAPCRAFT_PRIME}/${CRUFT}
done
find ${SNAPCRAFT_PRIME}/usr/share/doc/ -type f -not -name 'copyright' -delete
rm -v ${SNAPCRAFT_PRIME}/usr/share/doc/*/changelog.Debian.gz || true
find ${SNAPCRAFT_PRIME}/usr/share -type d -empty -delete