Hi there, this are some tweaks i’ve made in order to get SMPlayer working on Clear Linux which i want to share in the hope to help others.
First we need a working FFmpeg version with gnutls support and some tweaks to watch for example Netflix on Firefox :
ffmpeg.sh
#!/bin/bash
sudo swupd bundle-add c-basic devpkg-libva devpkg-gnutls
mkdir ~/build && cd ~/build
curl -LO https://ffmpeg.org/releases/ffmpeg-4.2.3.tar.bz2
tar jxf ffmpeg-4.2.3.tar.bz2
cd ffmpeg-4.2.3
./configure \
--prefix=/usr/local \
--disable-debug \
--disable-static \
--disable-stripping \
--enable-gmp \
--enable-gnutls \
--enable-gpl \
--enable-libdrm \
--enable-libxcb \
--enable-shared \
--enable-version3
make -j$(nproc)
sudo make install
sudo sh -c 'echo /usr/local/lib >>/etc/ld.so.conf'
sudo ldconfig
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ${HOME}/.config/firefox.conf
Now we need need to compile SMPlayer from the source:
smplayer.sh
#!/bin/bash
pkgname=smplayer
pkgver=20.4.2
url="https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
mkdir ~/build && cd ~/build
if curl -LO "$url"
then
sudo swupd bundle-add devpkg-avahi qt5-dev c-basic devpkg-libva mpv
tar jxf ${pkgname}-${pkgver}.tar.bz2
cd ${pkgname}-${pkgver}
sed '/gzip -9/d' -i Makefile
export CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}"
make -j$(nproc) PREFIX=/usr \
DOC_PATH="\\\"/usr/share/doc/smplayer\\\"" \
QMAKE_OPTS=DEFINES+=NO_DEBUG_ON_CONSOLE \
CFLAGS_EXTRA="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
sudo make DOC_PATH=/usr/share/doc/smplayer \
DESTDIR="${pkgdir}" PREFIX=/usr -j1 install
cd && rm -rf build
else
echo -e "\e[41m SMPlayer Download Failed \e[0m"
cd && rm -rf build
fi
Please note that this scripts are focusing on the latest current version of FFmpeg and SMPlayer, which each needs to be updated when new versions arrive.
Thanks a lot for this refreshing Linux Desktop experience and keep up the great work!