# Get the tarball
cd
test -f installed/libde265-1.0.15.tar.gz &&
mv -f installed/libde265-1.0.15.tar.gz
test ! -f libde265-1.0.15.tar.gz &&
wget https://github.com/strukturag/libde265/releases/download/v1.0.15/\
libde265-1.0.15.tar.gz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libde265-*" -exec rm -r {} \;
tar xzvf ~/libde265-1.0.15.tar.gz
cd libde265-1.0.15
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
./configure --libdir=/usr/local/lib64 --disable-dec265 --disable-sherlock265
# Configure the build for anything else
./configure --disable-dec265 --disable-sherlock265
# Build it
make
# Check the build
make check
# Become root to install it
su
# Install it
make install
ldconfig
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become your non-root user again
exit
# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/libde265-*.tar.*
mv libde265-1.0.15.tar.gz installed/
# If you ever want to uninstall libde265, this should do it:
cd
su
test -d src/libde265-* && ( cd src/libde265-* ; make uninstall )
( cd /usr/local/bin
rm -f acceleration_speed bjoentegaard block-rate-estim gen-enc-table \
rd-curves tests yuv-distortion )
test -d /usr/local/include/libde265 && rm -r /usr/local/include/libde265
test -d /usr/local/lib &&
( cd /usr/local/lib
rm -f pkgconfig/libde265.pc libde265.* )
test -d /usr/local/lib64 &&
( cd /usr/local/lib64
rm -f pkgconfig/libde265.pc libde265.* )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libde265-*" -exec rm -r {} \;
rm -f ~/installed/libde265-*.tar.*