# If you want to build Python extensions, add --with-python to the configure
# line below.
# Get the source tarball
cd
test -f installed/lcms-1.19.tar.gz && mv installed/lcms-1.19.tar.gz .
test ! -f lcms-1.19.tar.gz &&
wget https://downloads.sf.net/lcms/lcms-1.19.tar.gz
# Verify tarball w/ sha256sum:
# (this came from mine, so only proves yours=mine)
echo "80ae32cb9f568af4dc7ee4d3c05a4c31fc513fc3e31730fed0ce7378237273\
a9 lcms-1.19.tar.gz" | sha256sum -c
# Extract it
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "lcms-1.*" -exec rm -r {} \;
tar xzvf ~/lcms-1.19.tar.gz
cd lcms-1.19
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --mandir=/usr/man
# Build it
make
# Check the build
make check
# Become root to install it
su
# Remove Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg lcms
# Remove old library files if you're sure they're not in use
rm -f /usr/lib/liblcms.1.*
# 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 tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/lcms-1.*.tar.*
mv lcms-1.19.tar.gz installed/
# If you want to build Python extensions, add --with-python to the configure
# line below.
# Get the tarball
cd
test -f installed/lcms2-2.15.tar.gz && mv installed/lcms2-2.15.tar.gz .
test ! -f lcms2-2.15.tar.gz &&
wget https://downloads.sf.net/lcms/lcms2-2.15.tar.gz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "lcms2-*" -exec rm -r {} \;
tar xzvf ~/lcms2-2.15.tar.gz
cd lcms2-2.15
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --mandir=/usr/man
# Build it
make
# Check the build
make check
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg lcms2
# Remove old library files if you're sure they're not in use
rm -f /usr/lib*/liblcms2.*
# 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 tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/lcms2-.*.tar.*
mv lcms2-2.15.tar.gz installed/