# Get it
cd
test -f installed/libspectre-0.2.8.tar.gz &&
mv installed/libspectre-0.2.8.tar.gz .
test ! -f libspectre-0.2.8.tar.gz &&
wget http://libspectre.freedesktop.org/releases/libspectre-0.2.8.tar.gz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libspectre-*" -exec rm -r {} \;
tar xzvf ~/libspectre-0.2.8.tar.gz
cd libspectre-0.2.8
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' && ./configure --prefix=/usr --libdir=/usr/lib64
# Configure the build for anything else
test $(uname -m) != 'x86_64' && ./configure --prefix=/usr
# Build it
make
# Test the build
make check
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg libspectre
# Remove old shared library files
rm -f /usr/lib*/libspectre.*
# Install it
make install
ldconfig
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/cairo-*.tar.*
mv libspectre-0.2.8.tar.gz installed/
# If you ever want to uninstall libspectre, this should do it:
cd
su
test -d src/libspectre-* && ( cd src/libspectre-* ; make uninstall )
for pfx in /usr /usr/local; do
rm -f ${pfx}/include/libspectre ${pfx}/lib*/libspectre.* \
${pfx}/lib*/pkgconfig/libspectre.pc
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libspectre-*" -exec rm -r {} \;
rm -f ~/installed/libspectre-*.tar.*