# LibtASN1 4.19.0 (Tiny ASN.1)
# ===============
# Prerequisites:
# bison
# pkg-config
# gtk-doc (optional; part of Slackware's linuxdoc-tools package)
# valgrind (optional; for testing)
# If you ever want to uninstall LibtASN1, or cleanup files from an old
# version before installing a new one, skip down to the bottom for
# instructions.
# If you upgrade LibtASN1, you should check apps/libs that link to GnuTLS
# to make sure they're still OK. If they link with GnuTLS, they probably
# also link with LibtASN1. You may need to rebuild and reinstall them.
# Get it
cd
test -f installed/libtasn1-4.19.0.tar.gz &&
mv installed/libtasn1-4.19.0.tar.gz .
test ! -f libtasn1-4.19.0.tar.gz &&
wget http://ftpmirror.gnu.org/libtasn1/libtasn1-4.19.0.tar.gz
# Verify tarball w/ sha1sum:
# (from the developer's release announcement)
# (you can also check it with "openssl sha1 libtasn1-4.19.0.tar.gz")
echo "9c4b6616de65513a0a4d27e0b7f25184391ca8fd libtasn1-4.19.0.tar.gz" | \
sha1sum -c
# Verify tarball w/ sha256sum:
#
# It was provided in the announcement as base64 encoded binary instead of
# hex so some extra steps are required to get the same output:
#
# FhPwrBz0hNbsDOO4wG1WJjzHJC8cI7MNgtI940WmP3o=
# ->
# sha256sum libtasn1-4.19.0.tar.gz | xxd -r -p | base64
# -or-
# openssl sha256 -binary libtasn1-4.19.0.tar.gz | openssl base64
# ->
echo "1613f0ac1cf484d6ec0ce3b8c06d56263cc7242f1c23b30d82d23de345a63f\
7a libtasn1-4.19.0.tar.gz" | sha256sum -c
# Extract the tarball
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "libtasn1-*" -exec rm -r {} \;
tar xzvf ~/libtasn1-4.19.0.tar.gz
cd libtasn1-4.19.0
test $UID = 0 && chown -R root:root .
# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --libdir=/usr/lib64 \
--mandir=/usr/man
# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --mandir=/usr/man
# Build it
make
# Become root to install it
su
# Install it
make install
ldconfig
# If you installed it over an older version, check here for older files
# that are no longer necessary. Generally if files do not show today's
# date, and you did not customize them yourself, they are no longer needed.
# Check anything running now with ldd to see if it is linked with libtasn1.
# /usr/bin/asn1*
# /usr/lib/libtasn1.*
# /usr/lib64/libtasn1.*
# /usr/man/man1/asn1*.1
# /usr/man/man3/asn1_*.3
# /usr/man/man3/libtasn1_*.3
# Make sure your non-root account 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/libtasn1-*.tar.*
mv libtasn1-4.19.0.tar.gz installed/
# If you ever want to uninstall LibtASN1, this should do it:
cd
su
test -d src/libtasn1-* && ( cd src/libtasn1-* ; make uninstall )
( cd /usr/bin ; rm -f asn1Coding asn1Decoding asn1Parser )
( cd /usr/lib ; rm -f libtasn1.a libtasn1.la libtasn1.so libtasn1.so.* )
test -d /usr/lib64 &&
( cd /usr/lib64 ; rm -f libtasn1.a libtasn1.la libtasn1.so libtasn1.so.* )
( cd /usr/man/man1 ; rm -f asn1Coding.1 asn1Decoding.1 asn1Parser.1 )
( cd /usr/man/man3 ; rm -f asn1_*.3 libtasn1_*.3 )
rm -f /usr/include/libtasn1.h /usr/info/libtasn1.info \
/usr/lib/pkgconfig/libtasn1.pc /usr/lib64/pkgconfig/libtasn1.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libtasn1-*" -exec rm -r {} \;
rm -f ~/installed/libtasn1-*.tar.*