# NOTE: wget and curl may both be using libpsl, so be aware that they
# may break if you remove the old version, so you may want to download
# the new one before you begin. You can always use lynx instead too...
# Previous updates of this HOWTO used the default prefix (/usr/local)
# Below we now match the new Slackware 15.0 package prefix of /usr
# If you have an old version installed, run 'make uninstall' as root
# from the source directory to move it, then ldconfig
# Get it
cd
test -f installed/libpsl-0.21.2.tar.lz &&
mv -f installed/libpsl-0.21.2.tar.lz .
wget -nc https://github.com/rockdaboot/libpsl/releases/download/\
libpsl-0.21.2/libpsl-0.21.2.tar.lz
# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libpsl-*" -exec rm -r {} \;
tar xv --lzip -f ~/libpsl-0.21.2.tar.lz
cd libpsl-0.21.2
test $UID = 0 && chown -R root:root .
# If you are upgrading, read ./NEWS
# Read HTML docs under the source tree like so
lynx docs/libpsl/html/index.html
# I only read/write English (well), so I use --disable-nls
# Leave that off if that is not the case for you
# To enable gtk-doc to build docs, use --enable-gtk-doc
# To enable Valgrind tests for 'make check', use --enable-valgrind-tests
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --libdir=/usr/lib64 --mandir=/usr/man --disable-nls
# Configure the build for everything else
test $(uname -m) != 'x86_64' &&
./configure --mandir=/usr/man --disable-nls
# Build it
make
# Test 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 yourself again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/libpsl-*.tar.*
mv libpsl-0.21.2.tar.lz installed/
# If you ever want to uninstall libpsl, this should do it:
cd
su
test -d src/libpsl-* && ( cd src/libpsl-* ; make uninstall )
for pfx in /usr /usr/local;
do
cd ${pfx}
rm -f bin/psl include/libpsl.h lib/libpsl.* lib/pkgconfig/libpsl.pc
test -d lib64 && rm -f lib64/libpsl.* lib64/pkgconfig/libpsl.pc
( cd man/man1
rm -f psl.1 psl-make-dafsa.1 )
( cd man/man3
rm -f libpsl.3 )
test -d share/gtk-doc/html &&
( cd share/gtk-doc/html
test -d libpsl && rm -r libpsl
rm -f libpsl-* )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libpsl-*" -exec rm -r {} \;
rm -f ~/installed/libpsl-*.tar.*