Linux HOWTOs

About | Home | Search


HOWTO: libksba
Description: Library for working with X.509 certificates
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# libksba 1.0.1
# ===============
# Prerequisites:
# bison
# GPG Error >= 1.2

cd
test -f installed/libksba-1.0.1.tar.bz2 &&
 mv installed/libksba-1.0.1.tar.bz2 .
test ! -f libksba-1.0.1.tar.bz2 &&
 wget ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.0.1.tar.bz2

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "43646aa414f28e4962f8db138efbf249  libksba-1.0.1.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "d4d9a0f0295ba3192a6680b5544bbbbc4fd6c0b9  libksba-1.0.1.tar.bz2" | \
 sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 1CE0C630 > /dev/null 2>&1 || gpg --recv-keys 1CE0C630 ) &&
 wget -nc ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.0.1.tar.bz2.sig &&
  gpg --verify libksba-1.0.1.tar.bz2.sig && rm libksba-1.0.1.tar.bz2.sig

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libksba-*" -exec rm -r {} \;
tar xjvf ~/libksba-1.0.1.tar.bz2
cd libksba-1.0.1
test $UID = 0 && chown -R root:root .
./configure
make

# Become root to install it
su

rm -f /usr/local/lib/libksba.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/libksba-*.tar.*
mv libksba-1.0.1.tar.bz2 installed/


# If you ever need to uninstall libksba, this should do it:
test -d ~/src/libksba-* && ( cd ~/src/libksba-* ; make uninstall )
su
( cd /usr/local/lib ; rm -f libksba.* )
rm -f /usr/local/bin/ksba-config /usr/local/include/ksba.h \
 /usr/local/share/aclocal/ksba.m4 /usr/local/share/info/ksba.info
exit
find ~/src -maxdepth 1 -type d -name "libksba-*" -exec rm -r {} \;
rm -f ~/installed/libksba-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>