Last active
January 16, 2019 00:11
-
-
Save rasa/471e1688a68c99efe8f3503c24246e4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e -x | |
sudo apt-get update | |
sudo apt-get -y install libgnutls28-dev bzip2 make gettext texinfo gnutls-bin build-essential g++ | |
mkdir -p gnupg22 | |
pushd gnupg22 | |
wget -c https://ftp.gnu.org/gnu/ncurses/ncurses-6.1.tar.gz{,.sig} | |
wget -c https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.12.tar.bz2{,.sig} | |
wget -c https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.2.tar.bz2{,.sig} | |
wget -c https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.4.tar.gz{,.sig} | |
wget -c https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.33.tar.gz{,.sig} | |
wget -c https://gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz2{,.sig} | |
wget -c https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2{,.sig} | |
wget -c https://gnupg.org/ftp/gcrypt/pinentry/pinentry-1.1.0.tar.bz2{,.sig} | |
gpg --list-keys | |
gpg --recv-keys 0x4F25E3B6 0xE0856959 0x33BD3F06 0x7EFD60D9 0xF7E48EDB | |
for i in *.sig; do | |
gpg --verify "$i" | |
done | |
for i in *.gz; do | |
tar -xzf "$i" | |
done | |
for i in *.bz2; do | |
tar -xjf "$i" | |
done | |
dirs="libgpg-error libgcrypt libassuan libksba npth ncurses pinentry gnupg" | |
for i in $dirs; do | |
CONFIGURE_OPTS= | |
if [[ "$i" =~ ^pinentry ]]; then | |
CONFIGURE_OPTS="${CONFIGURE_OPTS} --enable-pinentry-curses --disable-pinentry-qt4" | |
fi | |
pushd $i*/ | |
./configure $CONFIGURE_OPTS | |
make | |
sudo make install | |
popd | |
done | |
sudo tee -a /etc/ld.so.conf.d/gpg2.conf <<<"/usr/local/lib" | |
sudo ldconfig -v | |
echo "Complete!!!" | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment