Apertium on SliTaz

From Apertium
Jump to navigation Jump to search

Guide prepared by Google Code-In 2014 student Nikita Tsarev.

Prepare for compilation

If you are booting from Live CD, select default option. If you have already installed SliTaz, everything should work fine. Tested with SliTaz 4.0

Change user to root: su

Install Bash

tazpkg get-install bash

Make sure, to point /bin/sh to /bin/bash (answer yes on prompt) Now, run bash:

bash

Install dependencies, needed to build Apertium

Note, that we log all the installed packages to file

for p in make gcc linux-api-headers pcre-dev libxml2-dev libxslt-dev subversion pkg-config automake flex libtool; do tazpkg get-install $p >> ~/pkglog; done

Building

Clone repositories

git clone https://github.com/apertium/lttoolbox.git
git clone https://github.com/apertium/apertium.git
git clone https://github.com/apertium/apertium-lex-tools.git
git clone https://github.com/apertium/apertium-LANGUAGE_PAIR.git

Where LANGUAGE_PAIR is language pair (e.g. en-eo)

Set up enviroment

LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}

export LD_LIBRARY_PATH

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}

export PKG_CONFIG_PATH

Compiling

cd to each directory in order: lttoolbox, apertium, apertium-lex-tools, apertium-LANGUAGE_PAIR

Then in each directory run:

./autogen.sh

make

make install

ldconfig

Installing Unicode fonts

cd

wget http://sunsite.unc.edu/pub/Linux/system/keyboards/console-data-1999.08.29.tar.gz

tar -xvf console-data-1999.08.29.tar.gz

tazpkg get-install kbd

cd console-data-1999.08.29

./configure

make

make install

setfont LatArCyrHeb-16

Removing unneeded dependencies

cat ~/pkglog | grep installed | grep -Eo '^[^ ]+' | while read p; do yes | tazpkg remove $p; done

Now, exit root shell: exit