Commit 1520e7fb authored by John Doe's avatar John Doe
Browse files

bookworm / split obs in multiple files

parent 60c852e1
......@@ -11,7 +11,6 @@ class sms::ardour (
require put::debian
require sms::audio
require sms::gitrepos
require put::xfdesktop
$pkgs = [
......
......@@ -163,7 +163,6 @@ class sms::audiosoftware {
'libgnutls-dane0',
'libgnutls-openssl27',
'libgnutls28-dev',
'libgnutlsxx28',
'libgpg-error-dev',
'libidn11-dev',
'liblua5.2-0',
......
......@@ -17,6 +17,12 @@ class sms::kernel (
#$$kversion = "5.10.0-10-rt-amd64"
$kversion = "5.16.0-0.bpo.4-rt-amd64"
}
'bookworm': {
#$$kversion = "5.10.0-10-rt-amd64"
$kversion = "5.17.0-1-rt-amd64"
}
default: {
fail("Unsupported Debian-flavor machine: ${::lsbdistcodename}")
}
......
......@@ -31,7 +31,6 @@ $pkgs = [
'libgnutls-dane0',
'libgnutls-openssl27',
'libgnutls28-dev',
'libgnutlsxx28',
'libgpg-error-dev',
'libidn11-dev',
'liblua5.2-0',
......
......@@ -13,9 +13,9 @@ class sms::obs
require sms::ndi
require sms::v4l2sink
require put::nodejs
require sms::gitrepos
require sms::pythonstuff
require sms::etcdefault
#require sms::obsfromsrc
Exec {
user => 'root',
......@@ -28,14 +28,6 @@ class sms::obs
$srcdir = '/usr/local/src'
exec{ 'purge stuff we install from source':
command => '/usr/bin/apt-get -y purge obs-studio'
}
$pkgs = [
'ffmpeg',
'build-essential',
......@@ -152,195 +144,6 @@ class sms::obs
action => 'accept',
}
put::buildfromgit { 'obs-studio':
repo_name => 'obs-studio',
tag => ['obsbuild'],
# websocket does not compile with this one# revision => '27.2.0',
#revision => '27.1.3', # < this works with websocket for sure
revision => '27.2.4',
#srcdir => "/usr/local/src",
repo => 'https://github.com/obsproject/obs-studio.git',
cwd => './build',
commands => [
'cmake -DUNIX_STRUCTURE=1 -DBUILD_BROWSER=OFF -DENABLE_PIPEWIRE=OFF -DCMAKE_INSTALL_PREFIX=/usr ..',
# for master / newer version # 'cmake -DBUILD_BROWSER=ON -DENABLE_PIPEWIRE=OFF -DCEF_ROOT_DIR=/opt/cef -DENABLE_AJA=OFF -DCMAKE_INSTALL_PREFIX=/usr ..'
'make -j $(nproc)',
'make install',
'ldconfig'],
}
put::buildfromgit { 'obs-gstreamer':
repo => 'https://github.com/fzwoch/obs-gstreamer.git',
revision => '6b15a17e4691b754ee442964e5c97c9faef15343',
commands => ['mkdir -p build', 'meson --buildtype=release --prefix /usr build', 'ninja -C build', 'ninja -C build install'],
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-gstreamer.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-gstreamer.so',
}
put::buildfromgit { 'obs-v4l2sink':
repo => 'https://github.com/CatxFish/obs-v4l2sink.git',
commands => ['mkdir -p build', "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr", 'make -j $(nproc)', 'make install'],
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-v4l2sink.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-v4l2sink.so',
}
put::buildfromgit { 'obs-ndi':
repo => 'https://github.com/Palakis/obs-ndi.git',
cwd => 'build',
#revision => '5b8a7f8577eb2bb205699916a24ef9cc38deffd6',
revision => '4.9.1',
commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc)', 'make install '],
require => Put::Buildfromgit['obs-studio'],
}
put::buildfromgit { 'obs-websocket':
repo => 'https://github.com/obsproject/obs-websocket.git',
cwd => 'build',
#revision => '4.9.1',
revision => 'df2049b7515ff47a33193865c8ee04ef3bb0ce9b',
#revision => '4.9.1-compat',
commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc) ', 'make install'],
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-websocket-compat.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-websocket-compat.so',
}
# FIXME: forgot what this is, and doesn't build
# put::buildfromgit { 'obs-dir-watch-media':
# repo => 'https://github.com/exeldro/obs-dir-watch-media.git',
# cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc)', 'make install'] ,
# require => Put::Buildfromgit['obs-studio'],
# }
#FIXME: does not build
# put::buildfromgit { 'obs-rtspserver':
# repo => 'https://github.com/iamscottxu/obs-rtspserver.git',
## cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make', 'make install'] ,
# require => Put::Buildfromgit['obs-studio'],
# }
put::buildfromgit { 'obs-vnc':
repo => 'https://github.com/norihiro/obs-vnc.git',
cwd => 'build',
#revision => '4.7.0',
revision => '3af8844d34e115ae9de36aacacc9b5a9e8970352',
commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc)', 'make install'] ,
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-vnc.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-vnc.so',
}
# FIXME: can't find obs-frontend-api.h
# put::buildfromgit { 'obs-multi-rtmp':
# repo => 'https://github.com/sorayuki/obs-multi-rtmp.git',
# cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make', 'make install'],
# require => Put::Buildfromgit['obs-studio'],
# }
#FIXME: /usr/local/src/obs-studio/libobs/obs-internal.h:40:10: fatal error: caption/caption.h: No such file or directory
# put::buildfromgit { 'obs-gphoto':
# repo => 'https://github.com/Atterratio/obs-gphoto.git',
# cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make', 'make install'] ,
# require => Put::Buildfromgit['obs-studio'],
# }
# put::buildfromgit { 'obs-facemask':
# repo => 'https://github.com/stream-labs/facemask-plugin.git',
# cwd => 'build',
# revision => 'master',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DPATH_OBS_STUDIO=${srcdir}/obs-studio/ -DCMAKE_INSTALL_PREFIX=/opt ..", 'make', 'make install'],
##cmake -DPATH_OBS_STUDIO=/usr/local/src/obs-studio/ -DCMAKE_INSTALL_PREFIX=/opt -DPATH_DLIB=../thirdparty/dlib/ ..
##cmake -DPATH_OBS_STUDIO=/usr/local/src/obs-studio/ -DCMAKE_INSTALL_PREFIX=/opt -DPATH_DLIB=../thirdparty/dlib/ -DPATH_FREETYPE=../thirdparty/freetype2 ..
# #debiandeps => ['libdlib-dev', 'libopenblas-dev', 'liblapack-dev', 'nvidia-cuda-dev'],
# }
put::buildfromgit { 'obs-tablet-remote':
repo => 'https://github.com/t2t2/obs-tablet-remote.git',
revision => '386d6d865892d21bbb088c80ef01a759d7f89ed7',
commands => ['npm install', 'npm run build -- --homepage /'],
require => Put::Buildfromgit['obs-studio'],
}
put::buildfromgit { 'miditoobs':
repo => 'https://github.com/lebaston100/MIDItoOBS.git',
revision => 'master',
# chmod is because program hardcodes debug.log in folde and cannot write there
commands => ['pip3 install -r requirements.txt', 'chmod 777 -R .'],
require => Put::Buildfromgit['obs-studio'],
}
# put::userunit {'miditoobs-web':
# after => ['obs-web'],
# cwd => '',
# # command => '',
# user => 'user',
# wantedby => [ 'xsession_started.target' ],
# }
put::buildfromgit { 'obs-web':
repo => 'https://github.com/Niek/obs-web.git',
revision => 'master',
commands => ['npm i', 'npm run build'],
require => Put::Buildfromgit['obs-studio'],
}
put::userunit {'obs-web':
command => '/usr/bin/npm run dev',
cwd => '/usr/local/src/obs-web/',
user => 'user',
after => [ 'jack.service'],
partof => [ 'xsession.target' ],
wantedby => [ 'xsession.target' ],
#wants => [ 'obs.service'],
#partof => [ 'xsession.target' ],
#wantedby => [ 'xsession_started.target' ],
}
firewall { '121 obs-web':
dport => '5000',
proto => 'tcp',
action => 'accept',
}
put::userunit { 'obs':
command => '/usr/bin/obs',
......@@ -358,16 +161,6 @@ put::userunit { 'obs':
}
#FIXME: install obs-tablet-remote somewhere, and not run it in development mode all the time
put::userunit {'obs-tablet-remote':
command => '/usr/bin/npm run dev',
cwd => '/usr/local/src/obs-tablet-remote/',
user => 'user',
after => [ 'jack.service'],
partof => [ 'xsession.target' ],
wantedby => [ 'xsession.target' ],
}
put::userunit {'feedmanager':
command => '/home/user/src/streaming-media-stuff/feedmanager/feeds.py',
cwd => '/home/user/src/streaming-media-stuff/feedmanager',
......
# software build from source
class sms::obs
(
String $user = 'user',
String $userdir = '/home/user',
)
{
tag 'slow', 'building_software', 'sms'
require put::debian
require sms::audio
require sms::builddeps
require sms::ndi
require sms::v4l2sink
require put::nodejs
require sms::pythonstuff
require sms::etcdefault
require sms::obs
Exec {
user => 'root',
cwd => '/root/',
timeout => 9999,
path => '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
environment => ['HOME=/root' ]
}
$srcdir = '/usr/local/src'
include put::nodejs
put::buildfromgit { 'obs-v4l2sink':
repo => 'https://github.com/CatxFish/obs-v4l2sink.git',
commands => ['mkdir -p build', "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr", 'make -j $(nproc)', 'make install'],
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-v4l2sink.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-v4l2sink.so',
}
put::buildfromgit { 'obs-ndi':
repo => 'https://github.com/Palakis/obs-ndi.git',
cwd => 'build',
#revision => '5b8a7f8577eb2bb205699916a24ef9cc38deffd6',
revision => '4.9.1',
commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc)', 'make install '],
require => Put::Buildfromgit['obs-studio'],
}
# FIXME: forgot what this is, and doesn't build
# put::buildfromgit { 'obs-dir-watch-media':
# repo => 'https://github.com/exeldro/obs-dir-watch-media.git',
# cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc)', 'make install'] ,
# require => Put::Buildfromgit['obs-studio'],
# }
#FIXME: does not build
# put::buildfromgit { 'obs-rtspserver':
# repo => 'https://github.com/iamscottxu/obs-rtspserver.git',
## cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make', 'make install'] ,
# require => Put::Buildfromgit['obs-studio'],
# }
put::buildfromgit { 'obs-vnc':
repo => 'https://github.com/norihiro/obs-vnc.git',
cwd => 'build',
#revision => '4.7.0',
revision => '3af8844d34e115ae9de36aacacc9b5a9e8970352',
commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc)', 'make install'] ,
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-vnc.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-vnc.so',
}
# FIXME: can't find obs-frontend-api.h
# put::buildfromgit { 'obs-multi-rtmp':
# repo => 'https://github.com/sorayuki/obs-multi-rtmp.git',
# cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make', 'make install'],
# require => Put::Buildfromgit['obs-studio'],
# }
#FIXME: /usr/local/src/obs-studio/libobs/obs-internal.h:40:10: fatal error: caption/caption.h: No such file or directory
# put::buildfromgit { 'obs-gphoto':
# repo => 'https://github.com/Atterratio/obs-gphoto.git',
# cwd => 'build',
# #revision => '4.7.0',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make', 'make install'] ,
# require => Put::Buildfromgit['obs-studio'],
# }
# put::buildfromgit { 'obs-facemask':
# repo => 'https://github.com/stream-labs/facemask-plugin.git',
# cwd => 'build',
# revision => 'master',
# commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DPATH_OBS_STUDIO=${srcdir}/obs-studio/ -DCMAKE_INSTALL_PREFIX=/opt ..", 'make', 'make install'],
##cmake -DPATH_OBS_STUDIO=/usr/local/src/obs-studio/ -DCMAKE_INSTALL_PREFIX=/opt -DPATH_DLIB=../thirdparty/dlib/ ..
##cmake -DPATH_OBS_STUDIO=/usr/local/src/obs-studio/ -DCMAKE_INSTALL_PREFIX=/opt -DPATH_DLIB=../thirdparty/dlib/ -DPATH_FREETYPE=../thirdparty/freetype2 ..
# #debiandeps => ['libdlib-dev', 'libopenblas-dev', 'liblapack-dev', 'nvidia-cuda-dev'],
# }
put::buildfromgit { 'obs-tablet-remote':
repo => 'https://github.com/t2t2/obs-tablet-remote.git',
revision => '386d6d865892d21bbb088c80ef01a759d7f89ed7',
commands => ['npm install', 'npm run build -- --homepage /'],
require => Put::Buildfromgit['obs-studio'],
}
put::buildfromgit { 'miditoobs':
repo => 'https://github.com/lebaston100/MIDItoOBS.git',
revision => 'master',
# chmod is because program hardcodes debug.log in folde and cannot write there
commands => ['pip3 install -r requirements.txt', 'chmod 777 -R .'],
require => Put::Buildfromgit['obs-studio'],
}
# put::userunit {'miditoobs-web':
# after => ['obs-web'],
# cwd => '',
# # command => '',
# user => 'user',
# wantedby => [ 'xsession_started.target' ],
# }
put::buildfromgit { 'obs-web':
repo => 'https://github.com/Niek/obs-web.git',
revision => 'master',
commands => ['npm i', 'npm run build'],
require => Put::Buildfromgit['obs-studio'],
}
put::userunit {'obs-web':
command => '/usr/bin/npm run dev',
cwd => '/usr/local/src/obs-web/',
user => 'user',
after => [ 'jack.service'],
partof => [ 'xsession.target' ],
wantedby => [ 'xsession.target' ],
#wants => [ 'obs.service'],
#partof => [ 'xsession.target' ],
#wantedby => [ 'xsession_started.target' ],
}
firewall { '121 obs-web':
dport => '5000',
proto => 'tcp',
action => 'accept',
}
#FIXME: install obs-tablet-remote somewhere, and not run it in development mode all the time
put::userunit {'obs-tablet-remote':
command => '/usr/bin/npm run dev',
cwd => '/usr/local/src/obs-tablet-remote/',
user => 'user',
after => [ 'jack.service'],
partof => [ 'xsession.target' ],
wantedby => [ 'xsession.target' ],
}
}
# obs packages
class sms::obsfrompkg
(
String $user = 'user',
String $userdir = '/home/user',
)
{
tag 'slow', 'building_software', 'sms'
require put::debian
require sms::audio
require sms::builddeps
require sms::ndi
require sms::v4l2sink
require put::nodejs
require sms::pythonstuff
Exec {
user => 'root',
cwd => '/root/',
timeout => 9999,
path => '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
environment => ['HOME=/root' ]
}
$srcdir = '/usr/local/src'
exec{ 'purge stuff we install from source':
command => '/usr/bin/apt-get -y purge obs-studio'
}
$pkgs = [
'ffmpeg',
'build-essential',
'checkinstall',
'cmake',
'libasound2-dev',
'libavcodec-dev',
'libavdevice-dev',
'libavfilter-dev',
'libavformat-dev',
'libavutil-dev',
'libcurl4-openssl-dev',
'libfdk-aac-dev',
'libfontconfig-dev',
'libfreetype6-dev',
'libgl1-mesa-dev',
'libjack-jackd2-dev',
'libjansson-dev',
'libluajit-5.1-dev',
'libpulse-dev',
'libqt5x11extras5-dev',
'libqt5multimedia5',
'lua5.3',
'libspeexdsp-dev',
'libswresample-dev',
'libswscale-dev',
'libudev-dev',
'libv4l-dev',
'libvlc-dev',
'libx11-dev',
'libx264-dev',
'libxcb-shm0-dev',
'libxcb-xinerama0-dev',
'libxcomposite-dev',
'libxinerama-dev',
'pkg-config',
'python3-dev',
'qtbase5-dev',
'libqt5svg5-dev',
'swig',
'ninja-build',
'meson',
'libgstreamer1.0-dev',
'libgstreamer-plugins-bad1.0-dev',
'libgstreamer-plugins-base1.0-dev',
'libgstrtspserver-1.0-dev',
'gstreamer1.0-plugins-good',
'gstreamer1.0-plugins-ugly',
'libqt5gstreamerutils-1.0-0',
'gstreamer1.0-tools',
'libass-dev',
'libfreetype6-dev',
'libsdl2-dev',
'libtool',
'libva-dev',
'libvdpau-dev',
'libvorbis-dev',
'libxcb1-dev',
'libxcb-shm0-dev',
'libxcb-xfixes0-dev',
'pkg-config',
'texinfo',
'wget',
'zlib1g-dev',
'nasm',
'libx264-dev',
'libx265-dev',
'libnuma-dev',
'libvpx-dev',
'libfdk-aac-dev',
'libmp3lame-dev',
'libopus-dev',
'avahi-utils',
'libgstreamer1.0-dev',
'libgstreamer-plugins-base1.0-dev',
'gstreamer1.0-plugins-base',
'gstreamer1.0-plugins-good',
'gstreamer1.0-plugins-bad',
'gstreamer1.0-plugins-ugly',
'gstreamer1.0-libav',
'libgstrtspserver-1.0-dev',
'python3-pip',
'intel-media-va-driver-non-free',
'i965-va-driver-shaders',
'libxcb-composite0-dev'
]
include put::nodejs
ensure_packages($pkgs, {ensure => 'installed'})
put::buildfromgit { 'obs-studio':
repo_name => 'obs-studio',
tag => ['obsbuild'],
# websocket does not compile with this one# revision => '27.2.0',
#revision => '27.1.3', # < this works with websocket for sure
revision => '27.2.4',
#srcdir => "/usr/local/src",
repo => 'https://github.com/obsproject/obs-studio.git',
cwd => './build',
commands => [
'cmake -DUNIX_STRUCTURE=1 -DBUILD_BROWSER=OFF -DENABLE_PIPEWIRE=OFF -DCMAKE_INSTALL_PREFIX=/usr ..',
# for master / newer version # 'cmake -DBUILD_BROWSER=ON -DENABLE_PIPEWIRE=OFF -DCEF_ROOT_DIR=/opt/cef -DENABLE_AJA=OFF -DCMAKE_INSTALL_PREFIX=/usr ..'
'make -j $(nproc)',
'make install',
'ldconfig'],
}
put::buildfromgit { 'obs-gstreamer':
repo => 'https://github.com/fzwoch/obs-gstreamer.git',
revision => '6b15a17e4691b754ee442964e5c97c9faef15343',
commands => ['mkdir -p build', 'meson --buildtype=release --prefix /usr build', 'ninja -C build', 'ninja -C build install'],
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-gstreamer.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-gstreamer.so',
}
put::buildfromgit { 'obs-websocket':
repo => 'https://github.com/obsproject/obs-websocket.git',
cwd => 'build',
#revision => '4.9.1',
revision => 'df2049b7515ff47a33193865c8ee04ef3bb0ce9b',
#revision => '4.9.1-compat',
commands => [ "cmake -DLIBOBS_INCLUDE_DIR=${srcdir}/obs-studio/libobs -DCMAKE_INSTALL_PREFIX=/usr ..", 'make -j $(nproc) ', 'make install'],
require => Put::Buildfromgit['obs-studio'],
}
-> file { '/usr/lib/obs-plugins/obs-websocket-compat.so':
ensure => 'link',
target => '/usr/lib/x86_64-linux-gnu/obs-plugins/obs-websocket-compat.so',
}