Apertium on SliTaz

From Apertium
Jump to: navigation, search

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

Contents

[edit] 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

[edit] Install Bash

tazpkg get-install bash

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

bash

[edit] 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

[edit] Building

[edit] Clone repositories

svn checkout https://svn.code.sf.net/p/apertium/svn/trunk/lttoolbox

svn checkout https://svn.code.sf.net/p/apertium/svn/trunk/apertium

svn checkout https://svn.code.sf.net/p/apertium/svn/trunk/apertium-lex-tools

svn checkout https://svn.code.sf.net/p/apertium/svn/trunk/apertium-LANGUAGE_PAIR

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

[edit] 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

[edit] 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

[edit] 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

[edit] Removing unneeded dependencies

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

Now, exit root shell: exit

Personal tools