Apertium on SliTaz

From Apertium
Jump to navigation Jump to search

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

Prepare for compilation[edit]

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

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

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

Clone repositories[edit]

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

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

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

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

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

Now, exit root shell: exit