How to install from svn

CHECKOUT KDE3 VERSION

First, check the dependencies page !

digikamkde3

You can download an local Subversion copy of ’kipi’, and ’digikam’ from KDE SVN like this :

To Checkout the latest extragear libs svn source for KDE3 (includes libkipi, kipi-plugins, libkdcraw and libkexiv2) :


# svn co svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/libs

To Checkout the latest digiKam SVN source for KDE3:


# cd ..
# svn co -N svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/graphics/
# cd graphics
# svn up digikam
# svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin

Install digiKam for KDE3 in your system (/usr)

To Compile the source code under linux you have to give these commands in the libs folder and after that in the graphics folder :


# export UNSERMAKE=no
# make -f Makefile.cvs
# ./configure
# make
# make install (optional)

To Update the SVN copy later simply give this command from the directory above the digikam folder :


# svn up digikam

Also, you can go to the WEBSVN pages here : Lib KIPI and digiKam.


Here is an example script you can use to checkout, compile and install the latest digiKam version from SVN on your linux system :

#!/bin/sh -xve

echo Get, compile and install required libs
svn co svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/libs
cd libs
export UNSERMAKE=no
make -f Makefile.cvs
./configure --prefix=/usr
make
make install
cd ..

echo Get, compile and install digikam
svn co -N svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/graphics/
cd graphics
svn up digikam
svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
make -f Makefile.cvs
./configure --prefix=/usr
make
make install

Create a directory where you want, save these lines in a file in this directory, and make it executable. Then log on as root and execute this script.

Be carefull : this script will replace your Digikam version with the latest Digikam CVS version.

Note : --prefix=/usr is only needed if you have a Mandrake or Redhat system.

Install digiKam for KDE3 in your Home Directory

You can compile and install digikam in your homedir (or in any other place), so that you can keep your default stable version and try the latest svn version. This script below is inspired from Arnd Baecker script.

Create a directory and go inside. Eg :


mkdir -p ~/softs/digikam-svn
cd ~/softs/digikam-svn

Get the 2 scripts below to download, compile and install digikam and its libraries, plus the 3rd one to run digikam.


For the latest trunk version of exiv2 (don't forget to replace DIGIKAMDEST value)
(download compile_exiv2.sh script)

#!/bin/sh -xve

# compile_exiv2.sh script

export DIGIKAMDEST=/home/fabien/myopt
export KDEDIRS=$DIGIKAMDEST:/usr
export LD_LIBRARY_PATH=$DIGIKAMDEST/lib:$LD_LIBRARY_PATH
export LDPATH=$DIGIKAMDEST/lib:$LDPATH
export PATH=$DIGIKAMDEST/bin:$PATH


echo "Get, compile and install exiv2"
svn co svn://dev.robotbattle.com/exiv2/trunk exiv2-svn

cd exiv2-svn
make config

./configure --prefix=$DIGIKAMDEST
make -j 4
echo "OK to make install ?? press any key"
read
make install
cd ..

For the latest trunk version of digikam (don't forget to replace DIGIKAMDEST value):
(download compile_digikam.sh script)
#!/bin/sh -xve

# compile_digikam.sh script

export DIGIKAMDEST=/home/fabien/myopt
export KDEDIRS=$DIGIKAMDEST:/usr
export LD_LIBRARY_PATH=$DIGIKAMDEST/lib:$LD_LIBRARY_PATH
export LDPATH=$DIGIKAMDEST/lib:$LDPATH
export PATH=$DIGIKAMDEST/bin:$PATH
export UNSERMAKE=no
export PKG_CONFIG_PATH=$DIGIKAMDEST/lib/pkgconfig

echo "Get, compile and install required libs and kipiplugins"
svn co svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/libs
cd libs

# get language files :
# svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kde3/fr/messages/extragear-libs ./fr

for DIGIKAMLANG in fr de it
do
    svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kde3/$DIGIKAMLANG/messages/extragear-libs $DIGIKAMLANG
    echo -e "KDE_LANG= $DIGIKAMLANG\nPOFILES = AUTO" > $DIGIKAMLANG/Makefile.am 
done


make -f Makefile.cvs
./configure --prefix=$DIGIKAMDEST --with-extra-includes=$DIGIKAMDEST/include --with-extra-libs=$DIGIKAMDEST/lib
make -j 4
echo "OK to make install ?? press any key"
read
make install
cd ..


echo
echo
echo "Get, compile and install digikam"
svn co -N svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/graphics/
cd graphics

# get language files :
# svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kde3/fr/messages/extragear-graphics ./fr

for DIGIKAMLANG in fr de it
do
    svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kde3/$DIGIKAMLANG/messages/extragear-graphics $DIGIKAMLANG
    echo -e "KDE_LANG= $DIGIKAMLANG\nPOFILES = AUTO" > $DIGIKAMLANG/Makefile.am
done

svn up digikam
svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin

make -f Makefile.cvs
./configure -prefix=$DIGIKAMDEST --with-extra-includes=$DIGIKAMDEST/include --with-extra-libs=$DIGIKAMDEST/lib
make -j 4
echo "OK to make install ?? press any key"
read
make install
These 2 scripts will install exiv2, digikam (with imageplugins and kipiplugins) in DIGIKAMDEST directory (eg: /home/fabien/myopt/).

To run digikam, use this script (don't forget to replace DIGIKAMDEST value):
(download start_digikam.sh script)

#!/bin/bash

# start_digikam.sh

export DIGIKAMDEST=/home/fabien/myopt
export KDEDIRS=$DIGIKAMDEST:/usr
export LD_LIBRARY_PATH=$DIGIKAMDEST/lib:$LD_LIBRARY_PATH
export LDPATH=$DIGIKAMDEST/lib:$LDPATH
export PATH=$DIGIKAMDEST/bin:$PATH

hash -r
digikam

You can run digikam with a different language using the $LANG environment variable. Eg :
export LANG=fr.UTF-8 ; ~/softs/digikam-svn/start_digikam.sh

Important:if you run another KDE application (eg KDE Desktop, any k*** tool) before defining the KDEDIRS environment variable, digikam won't work or not correctly.
The best is to add KDEDIRS in ~/.profile Eg :
export KDEDIRS=/home/fabien/opt:/usr
The ~/.profile is read by KDE desktop when you login. So you need to restart KDE session to activate this modification.

Instead, you could also try to run kdeinit after defining the environment variables. Eg :
export DIGIKAMDEST=/home/fabien/myopt
export KDEDIRS=$DIGIKAMDEST:/usr
export LD_LIBRARY_PATH=$DIGIKAMDEST/lib:$LD_LIBRARY_PATH
export LDPATH=$DIGIKAMDEST/lib:$LDPATH
export PATH=$DIGIKAMDEST/bin:$PATH
kdeinit

And here are the instructions to download and install digiKam KDE4 version.