# Get the source
cd
test -f installed/libgpg-error-1.49.tar.bz2 &&
mv installed/libgpg-error-1.49.tar.bz2 .
test ! -f libgpg-error-1.49.tar.bz2 &&
wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.49.tar.bz2
# Verify tarball w/ sha256sum:
# (This came from my gpg-verified tarball)
echo "8b79d54639dbf4abc08b5406fb2f37e669a2dec091dd024fb87dd367131c63\
a9 libgpg-error-1.49.tar.bz2" | sha256sum -c
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libgpg-error-*" -exec rm -r {} \;
tar xjvf ~/libgpg-error-1.49.tar.bz2
cd libgpg-error-1.49
test $UID = 0 && chown -R root:root .
# Read ./README
# If this is an upgrade read ./NEWS or the full ./ChangeLog
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --disable-nls --prefix=/usr --infodir=/usr/info \
--libdir=/usr/lib64 --mandir=/usr/man
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --disable-nls --prefix=/usr --infodir=/usr/info \
--mandir=/usr/man
# Build it
make
# Become root to install it
su
# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg libgpg-error
# If you have an old version installed, you may or may not want to
# clean out old files such as /usr/lib*/libgpg-error.*
# Things like dirmngr, gpg-agent and scdaemon may be running and have the
# old version of libgpg-error.so.* opened, so the safer thing would be to
# check with lsof first before removing, and it probably won't hurt
# anything to just leave old ones.
# 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
# Saved the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/libgpg-error-*.tar.*
mv libgpg-error-1.49.tar.bz2 installed/
# If you ever want to uninstall libgpg-error, this should do it:
cd
su
test -d src/libgpg-error-* && ( cd src/libgpg-error-* ; make uninstall )
for pfx /usr /usr/local;
do
( cd ${pfx}/bin ; rm -f gpg-error gpg-error-config gpgrt-config yat2m )
( cd ${pfx}/include ; rm -f gpg-error.m4 gpgrt.m4 )
( cd ${pfx}/info ; rm -f gpgrt.info )
( cd ${pfx}/lib ; rm -f libgpg-error.* pkgconfig/gpg-error.pc )
test -d ${pfx}/lib64 &&
( cd ${pfx}/lib64 ; rm -f libgpg-error.* pkgconfig/gpg-error.pc )
( cd ${pfx}/man/man1 ; rm -f gpgrt-config.1 )
( cd ${pfx}/share/aclocal ; rm -f gpg-error.m4 gpgrt.m4 )
test -d ${pfx}/share/common-lisp/source/gpg-error &&
rm -r ${pfx}/share/common-lisp/source/gpg-error
test -d ${pfx}/share/libgpg-error &&
rm -r ${pfx}/share/libgpg-error
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libgpg-error-*" -exec rm -r {} \;
rm -f ~/installed/libgpg-error-*.tar.*