Skip to content

Instantly share code, notes, and snippets.

@cyphunk
Last active October 15, 2015 12:07
Show Gist options
  • Save cyphunk/59bd7570b3de49d4188f to your computer and use it in GitHub Desktop.
Save cyphunk/59bd7570b3de49d4188f to your computer and use it in GitHub Desktop.
download and build latest pidgin, pidgin-otr.
#!/usr/bin/env bash
#otr: curl https://otr.cypherpunks.ca/gpgkey.asc | gpg --import
#pidgin: gpg --keyserver pgp.mit.edu --recv-key 0xA40AB77B
INSTALLPREFIX=/usr/local
SH_SOURCE=${BASH_SOURCE:-$_}
if readlink "$SH_SOURCE" >/dev/null 2>&1; then
cd "$(dirname $(readlink $SH_SOURCE))"
else
cd "$(dirname $SH_SOURCE)"
fi
echo -e "\n\n# DOWNLOADING OTR\n"
wget -r --no-verbose --no-parent --no-clobber --no-host-directories --cut-dirs=100 \
-A tar.gz,tar.gz.asc \
https://otr.cypherpunks.ca/ \
|| exit
LIBOTR=$(ls -t libotr-* | grep -v .asc | head -1)
LIBOTRPIDGIN=$(ls -t pidgin-otr-* | grep -v .asc | head -1)
gpg --verify ${LIBOTR}.asc $LIBOTR || exit
gpg --verify ${LIBOTRPIDGIN}.asc $LIBOTRPIDGIN || exit
test -d ${LIBOTR%.tar.*} || tar xf $LIBOTR || exit
test -d ${LIBOTRPIDGIN%.tar.*} || tar xf $LIBOTRPIDGIN || exit
echo -e "\n\n# DOWNLOADING PIDGIN\n"
wget --no-verbose --no-clobber --content-disposition \
https://sourceforge.net/projects/pidgin/files/latest/download?source=files \
|| exit
PIDGIN=$(ls -t pidgin-[0-9]* | grep -v .asc | head -1)
VERSION=${PIDGIN#pidgin-}
VERSION=${VERSION%.tar.*}
#http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.11/pidgin-2.10.11.tar.bz2.asc/download
wget --no-verbose --no-clobber --content-disposition \
https://sourceforge.net/projects/pidgin/files/Pidgin/$VERSION/${PIDGIN}.asc/download \
|| exit
gpg --verify ${PIDGIN}.asc $PIDGIN || exit
test -d ${PIDGIN%.tar.*} || tar xf $PIDGIN || exit
echo -e "\n\n# Build $LIBOTR\n"
cd ${LIBOTR%.tar.*} || exit
./configure --prefix=$INSTALLPREFIX || exit
make || exit
echo -e "\n\n# Build $LIBOTRPIDGIN\n"
cd ../${LIBOTRPIDGIN%.tar.*} || exit
./configure --prefix=$INSTALLPREFIX || exit
make || exit
echo -e "\n\n# Build $PIDGIN\n"
cd ../${PIDGIN%.tar.*} || exit
# need gtkspell2
./configure --prefix=$INSTALLPREFIX \
--disable-screensaver --disable-gstreamer --disable-vv --disable-idn \
--disable-meanwhile --disable-avahi --disable-dbus --disable-perl \
--disable-tcl --disable-gestures --disable-startup-notification \
|| exit
make || exit
cat <<EOM
Compiled. To install:
cd `pwd`/${LIBOTR%.tar.*} && sudo make install \\
&& cd ../${LIBOTRPIDGIN%.tar.*} && sudo make install \\
&& cd ../${PIDGIN%.tar.*} && sudo make install
EOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment