Linux HOWTOs

About | Home | Search


HOWTO: gpgme
Description: Library that provides an API for GnuPG
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


# GnuPG Made Easy (GPGME)
# ===============
# In case of incompatible API changes, I include two versions here, the
# latest from the 1.0.x branch and the latest from the 1.1.x branch.

# For uninstallation (or pre-upgrade cleanup) instructions, skip down to the
# bottom.

# Prerequisites (for either version):
# gawk
# sed
# grep
# libgpg-error >= 0.5
# GnuPG >= 1.2.2
# GpgSM >= 1.9.6 (for CMS support; I think this comes with GnuPG 1.9.x (experimental),
#  I've never tried it)


# GPGME 1.0.3
# ===========
cd
test -f installed/gpgme-1.0.3.tar.gz && mv installed/gpgme-1.0.3.tar.gz .
test ! -f gpgme-1.0.3.tar.gz &&
 wget ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.0.3.tar.gz

# Verify tarball w/ md5sum:
# (this came from my sha1sum and gpg-verified tarball)
echo "4d33cbdf844fcee1c724e4cf2a32dd11  gpgme-1.0.3.tar.gz" | md5sum -c

# Verify tarball w/ sha1sum:
echo "632436ff5c66405d9704983411aa031f29006dce  gpgme-1.0.3.tar.gz" | \
 sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 87978569 > /dev/null 2>&1 || gpg --recv-keys 87978569 ) &&
 wget -nc ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.0.3.tar.gz.sig &&
  gpg --verify gpgme-1.0.3.tar.gz.sig && rm gpgme-1.0.3.tar.gz.sig

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

# Become root to install it
su

( cd /usr/local/lib ; rm -f libgpgme.* libgpgme-pthread.* )
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/gpgme-*.tar.*
mv gpgme-1.0.3.tar.gz installed/


# GPGME 1.1.2
# ===========
cd
test -f installed/gpgme-1.1.2.tar.gz && mv installed/gpgme-1.1.2.tar.gz .
test ! -f gpgme-1.1.2.tar.gz &&
 wget ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.1.2.tar.gz

# Verify tarball w/ md5sum:
# (this came from my gpg-verified tarball)
echo "c712ca39c3553573f15cd01e6edb8b68  gpgme-1.1.2.tar.gz" | md5sum -c

# Verify tarball w/ sha1sum:
# (this also came from my gpg-verified tarball)
echo "336d94e3bf2facedd06c52bd016bce647667c347  gpgme-1.1.2.tar.gz" | \
 sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 87978569 > /dev/null 2>&1 || gpg --recv-keys 87978569 ) &&
 wget -nc ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.1.2.tar.gz.sig &&
  gpg --verify gpgme-1.1.2.tar.gz.sig && rm gpgme-1.1.2.tar.gz.sig

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

# Become root to install it
su

( cd /usr/local/lib ; rm -f libgpgme.* libgpgme-pthread.* )
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/gpgme-*.tar.*
mv gpgme-1.1.2.tar.gz installed/


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

Back to the list


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