2018-10-14 13:29:02 +01:00
|
|
|
#!/bin/bash
|
2018-10-17 08:30:33 +01:00
|
|
|
set -x
|
2018-10-14 21:50:14 +01:00
|
|
|
|
2018-10-16 08:16:41 +01:00
|
|
|
export OLDDIR=`pwd`
|
2018-10-23 14:11:29 +01:00
|
|
|
export PATH="/usr/lib/ccache:/usr/lib/ccache/bin:$PATH"
|
2018-10-17 08:30:33 +01:00
|
|
|
|
2018-11-05 08:08:07 +00:00
|
|
|
export CFLAGS="-Os -pipe"
|
2018-10-23 13:59:52 +01:00
|
|
|
|
2018-11-06 09:21:43 +00:00
|
|
|
mkdir -p ~/.cache/deps
|
|
|
|
|
2018-11-06 09:48:16 +00:00
|
|
|
if [[ "${USE_PREBUILT_MPV}" ]]; then
|
2018-11-06 09:21:43 +00:00
|
|
|
wget https://github.com/NamedKitten/mpv-builder/releases/download/continuous/deps.tar.xz
|
2018-11-06 10:04:08 +00:00
|
|
|
sudo tar xvf deps.tar.xz -C /
|
2018-11-06 09:44:19 +00:00
|
|
|
exit 0
|
2018-11-06 09:21:43 +00:00
|
|
|
fi
|
|
|
|
|
2018-10-27 19:46:35 +01:00
|
|
|
#rm -rf mpv-build
|
2018-11-05 08:08:07 +00:00
|
|
|
git clone --depth 1 https://github.com/mpv-player/mpv-build mpv-build
|
|
|
|
cd mpv-build
|
2018-10-14 13:29:02 +01:00
|
|
|
|
2018-10-18 08:19:38 +01:00
|
|
|
export MPVDIR=`pwd`
|
2018-10-23 12:23:54 +01:00
|
|
|
|
2018-11-05 08:08:07 +00:00
|
|
|
rm -rf ffmpeg mpv libass
|
2018-10-23 12:23:54 +01:00
|
|
|
|
2018-11-05 08:29:32 +00:00
|
|
|
echo "--disable-programs --disable-runtime-cpudetect --disable-asm --enable-small" > ffmpeg_options
|
2018-11-05 08:08:07 +00:00
|
|
|
echo "--enable-libmpv-shared --prefix=/usr --disable-vapoursynth --enable-lgpl" > mpv_options
|
|
|
|
echo "--disable-cplayer --disable-caca --disable-wayland --disable-gl-wayland --disable-libarchive --disable-zlib --disable-tv --disable-debug-build --disable-manpage-build --disable-libsmbclient --disable-wayland --disable-sdl --disable-sndio --enable-plain-gl" >> mpv_options
|
2018-10-23 13:59:52 +01:00
|
|
|
|
2018-11-06 09:44:19 +00:00
|
|
|
./use-mpv-release
|
|
|
|
./use-ffmpeg-release
|
|
|
|
./use-libass-custom 0.14.0
|
2018-11-05 08:08:07 +00:00
|
|
|
./rebuild -j`nproc`
|
|
|
|
sudo ./install
|
2018-10-16 07:57:40 +01:00
|
|
|
ccache -s
|
2018-10-17 08:30:33 +01:00
|
|
|
|
2018-11-06 09:48:16 +00:00
|
|
|
if [[ "${UPLOAD}" ]]; then
|
2018-11-06 09:11:06 +00:00
|
|
|
cd mpv
|
2018-11-06 09:21:43 +00:00
|
|
|
python waf -v install --destdir=~/.cache/deps
|
|
|
|
cd ~/.cache/deps
|
|
|
|
tar caf deps.tar.xz *
|
2018-11-06 09:11:06 +00:00
|
|
|
wget https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
2018-11-06 09:21:43 +00:00
|
|
|
bash upload.sh deps.tar.xz
|
|
|
|
cd $MPVDIR
|
|
|
|
fi
|
2018-11-06 09:11:06 +00:00
|
|
|
|
2018-10-16 08:16:41 +01:00
|
|
|
cd $OLDDIR
|