#!/usr/bin/perl

require "common.pl";

install("http://www.fontconfig.org/release/fontconfig-2.8.0.tar.gz");
install("http://mirrors.fe.up.pt/pub/nongnu/freetype/freetype-2.3.12.tar.gz");
install("http://poppler.freedesktop.org/poppler-0.12.4.tar.gz");

my $foo = <<EOSH;
wget http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz;
tar zxvf antiword-0.37.tar.gz;
cd antiword-0.37;
perl -i -pe 's!^LOCAL_INSTALL_DIR = .*!LOCAL_INSTALL_DIR = /opt/lib/amalandro/bin/!' Makefile;
make -j2;
make install;
cd ..;
rm -fr antiword-0.37.tar.gz antiword-0.37;
wget wget http://sourceforge.net/projects/docx2txt/files/docx2txt/v1.0/docx2txt-1.0.tgz/download;
tar zxvf docx2txt-1.0.tgz;
cd docx2txt-1.0;
make INSTALLDIR=/opt/lib/amalandro/bin;
cd ..;
rm -fr docx2txt-1.0 docx2txt-1.0.tgz;
wget --no-check-certificate https://natura.di.uminho.pt/svn/main/misc/scripts/jop;
chmod +x jop;
mv jop /opt/lib/amalandro/bin;
EOSH

`$foo`;
