# Get the tarball
cd
test -f installed/yaml-0.2.5.tar.gz &&
mv -f installed/yaml-0.2.5.tar.gz .
test ! -f yaml-0.2.5.tar.gz &&
wget http://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "yaml-*" -exec rm -r {} \;
tar xzvf ~/yaml-0.2.5.tar.gz
cd yaml-0.2.5
test $UID = 0 && chown -R root:root .
# Read ./ReadMe.md
# Configure the build for 64-bit
./configure --prefix=/usr --docdir=/usr/doc/libyaml-0.2.5 \
--libdir=/usr/lib64 --mandir=/usr/man
# Configure the build for anything else
./configure --prefix=/usr --docdir=/usr/doc/libyaml-0.2.5 \
--mandir=/usr/man
# Test the build
make test
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg libyaml
# Install it
make install
ldconfig
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/libyaml-*.tar.*
mv yaml-0.2.5.tar.gz installed/
# If you ever want to uninstall LibYAML, this should do it:
cd
su
test -d src/yaml-* && ( cd src/yaml-* ; make uninstall )
rm -f /usr/include/yaml.h
( cd /usr/lib
rm -f libyaml.* pkgconfig/yaml-0.1.pc )
( cd /usr/lib64
rm -f libyaml.* pkgconfig/yaml-0.1.pc )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "yaml-*" -exec rm -r {} \;
rm -f ~/installed/yaml-*.tar.*