#!/bin/bash set -e #set -o pipefail export V=1 VERBOSE=1 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig # Debian/Ubuntu specific packages and environment apt-get -qy update apt-get -qfy install build-essential htop git libicu-dev libxml2-dev libxml2-utils autoconf automake flex gawk libtool libxslt-dev libpcre3-dev pkg-config python3 swig zlib1g-dev libzip-dev unzip zip zipcmp xsltproc make cmake perl libboost-dev libreadline-dev bison libarchive-dev libxxhash-dev libsqlite3-dev python3-dev python3-setuptools python3-lxml libtinfo-dev subversion libpugixml-dev bc export LANG=C.UTF-8 LC_ALL=C.UTF-8 echo '/usr/local/lib' > /etc/ld.so.conf.d/usr-local.conf ldconfig rm -rf /tmp/apertium-all-dev mkdir -pv /tmp/apertium-all-dev pushd /tmp/apertium-all-dev git clone --depth 1 https://github.com/TinoDidriksen/cg3 pushd cg3 cmake -DENABLE_PYTHON_BINDINGS=ON . make -j8 ./test/runall.pl make install ldconfig popd git clone --depth 1 https://github.com/TinoDidriksen/transfuse pushd transfuse cmake . make -j8 make test make install ldconfig popd git clone --depth 1 https://github.com/hfst/hfst pushd hfst autoreconf -fvi ./configure --disable-static --enable-all-tools --with-readline --with-unicode-handler=icu --enable-python-bindings make -j8 # make check make install ldconfig popd git clone --depth 1 https://github.com/hfst/hfst-ospell pushd hfst-ospell autoreconf -fvi ./configure --disable-static --enable-zhfst --without-libxmlpp --without-tinyxml2 make -j8 make check make install ldconfig popd git clone --depth 1 https://github.com/mhulden/foma pushd foma/foma make -j8 make install ldconfig popd for PKG in lttoolbox apertium apertium-lex-tools apertium-anaphora apertium-separable apertium-recursive lexd do git clone --depth 1 https://github.com/apertium/$PKG pushd $PKG autoreconf -fvi ./configure --disable-static --enable-python-bindings make -j8 make test make install ldconfig popd done git clone --depth 1 https://github.com/apertium/apertium-get pushd apertium-get cmake . make -j8 make install popd git clone --depth 1 https://github.com/apertium/apertium-init pushd apertium-init make install popd git clone --depth 1 https://github.com/divvun/libdivvun pushd libdivvun autoreconf -fvi ./configure --enable-checker --enable-cgspell --enable-python-bindings make -j8 make check make install ldconfig popd svn co https://gtsvn.uit.no/langtech/trunk/tools/CorpusTools pushd CorpusTools python3 setup.py install --prefix=/usr/local --install-scripts=/usr/local/bin --root=/ popd echo "" echo "" echo "Remember to add to your ~/.profile or global environment:" echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" echo "export ACLOCAL_PATH=/usr/local/share/aclocal" echo "" echo "Also remember you MUST use a UTF-8 locale (envvar LANG and LC_ALL) for all Apertium work."