obs-studio/main.sh

39 lines
1.9 KiB
Bash
Raw Permalink Normal View History

2023-03-04 19:20:25 +01:00
#! /bin/bash
2023-03-04 19:28:20 +01:00
set -e
2023-03-04 18:33:16 +01:00
# Add dependent repositories
2023-03-08 15:36:14 +01:00
wget -q -O - https://ppa.pika-os.com/key.gpg | sudo apt-key add -
add-apt-repository https://ppa.pika-os.com
add-apt-repository ppa:pikaos/pika
add-apt-repository ppa:kubuntu-ppa/backports
2023-03-04 18:33:16 +01:00
# Clone Upstream
2023-03-08 15:56:39 +01:00
git clone --recursive https://github.com/obsproject/obs-studio.git
2023-04-28 20:14:47 +02:00
2023-04-28 19:26:48 +02:00
cp -rvf ./debian ./obs-studio/
2023-03-04 18:33:16 +01:00
cd ./obs-studio
2023-04-28 19:16:31 +02:00
2023-04-28 22:11:16 +02:00
# remove -Werror flag to mitigate FTBFS with ffmpeg
2023-04-28 21:41:22 +02:00
sed -i 's|-Werror-implicit-function-declaration||g' CMakeLists.txt
## remove Werror to fix compile error
sed -i 's| -Werror||g' cmake/Modules/CompilerConfig.cmake
2023-04-28 21:54:33 +02:00
sed -i 's| -Wswitch||g' cmake/Modules/CompilerConfig.cmake
2023-04-28 21:41:22 +02:00
2023-04-28 21:02:44 +02:00
for i in ../patches/*.patch; do patch -Np1 -i $i ;done
2023-03-04 18:33:16 +01:00
2023-04-28 19:26:48 +02:00
# Get build deps brute force
2023-04-28 21:25:00 +02:00
apt-get install -y cmake ninja-build pkg-config clang clang-format build-essential curl ccache git libffmpeg-amf-dev
2023-04-28 19:58:30 +02:00
apt-get install -y libavcodec-dev libavdevice-dev libnss3-dev libnspr4-dev libpipewire-0.3-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev libcurl4-openssl-dev libmbedtls-dev libgl1-mesa-dev libjansson-dev libluajit-5.1-dev python3-dev libx11-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcb-composite0-dev libxcomposite-dev libxinerama-dev libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev swig libcmocka-dev libxss-dev libglvnd-dev libgles2-mesa libgles2-mesa-dev libwayland-dev librist-dev libsrt-openssl-dev libpci-dev
2023-04-28 19:29:53 +02:00
apt-get install -y qt6-base-dev qt6-base-private-dev libqt6svg6-dev qt6-wayland qt6-image-formats-plugins
apt-get install -y libasound2-dev libfdk-aac-dev libfontconfig-dev libfreetype6-dev libjack-jackd2-dev libpulse-dev libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev libdrm-dev
2023-03-04 18:33:16 +01:00
2023-04-28 19:49:52 +02:00
./CI/linux/01_install_dependencies.sh
./CI/linux/02_build_obs.sh
./CI/linux/03_package_obs.sh
2023-04-28 19:16:31 +02:00
2023-03-04 18:33:16 +01:00
# Move the debs to output
2023-04-28 20:14:47 +02:00
mkdir -p ../output
2023-04-28 20:21:12 +02:00
ls build/
mv build/*.deb ../output/
2023-04-28 20:14:47 +02:00
cd ../