images size changed, so that they fit in the window area now; welcome screen corrected.
[mdictionary] / Makefile
index fa74738..9172285 100644 (file)
--- a/Makefile
+++ b/Makefile
-#REP_LOCATION = ${HOME}/whitestork/repository/WhiteStork
-#REP_LOCATION := `pwd`/..
 ARCH = `arch`
-REP_TAG = tags
+REP_TAG = ../tags
 REP_BRANCH = branches
-REP_TRUNK = trunk
 
-MAKEFILE_FILE = ${REP_LOCATION}/${REP_TRUNK}
-
-ENGINE = engine
-DBUS = dbus
-MANAGER = manager
-GUI = gui
-
-APP_NAME = whitestork
-MAJOR_VER = 0
-MINOR_VER = 4
-RELEASE_MAJOR_VER = 0
-RELEASE_MINOR_VER = 4
-RELEASE_PATCH_VER = 0
-APP_VER := ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'`
-PACK_VER = 1
-FRM_VER = 0.1
-EXECUTABLE = ${BINARIES}/WhiteStork
-
-GUI_PACK_NAME = whitestorkgui
-MNG_PACK_NAME = whitestork
-ENG_PACK_NAME = enginexdxf
+DEB_REP_DIR = www
 
+#declaration of directory names
 BINARIES = bin
+SOURCE = src
 INCLUDE = include
 DATA = data
+PLUGINS = ${SOURCE}/plugins
+XDXF_PLUGIN = ${PLUGINS}/xdxf
+STARDICT_PLUGIN = ${PLUGINS}/stardict
+GUI = ${SOURCE}/gui
+MANAGER = ${SOURCE}/manager
+DBUS = ${SOURCE}/dbus_wrapper
+BOOKMARKS:=bdb
+BOOKMARKS_DIR = ${SOURCE}/bookmarks/${BOOKMARKS}
+DESTDIR = 
+
+ifeq (${BOOKMARKS}, sql)
+       SQLITE:=-DSQLITE=0
+endif
+
+ifeq (${BOOKMARKS}, sql3)
+       SQLITE:=-DSQLITE=3
+endif
+
 PACKAGES = packages
 
-FILES = ${REP_LOCATION}/${REP_TRUNK}/${DATA}/files_debbuild
-LOG_DIR = logs
-LOG_CLEAN = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/clean.log
-LOG_BUILD = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/build.log
-LOG_RUN = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/run.log
-LOG_DEBS = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/debs.log
-LOG_INST = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/install.log
+#probably trash
+STARDICT = stardict
+APP_NAME = mDictionary
+
+#versions
+MAJOR_VER = 1
+MINOR_VER = 0
+PATCH_VER = 0
+RELEASE_MAJOR_VER = 1
+RELEASE_MINOR_VER = 0
+RELEASE_PATCH_VER = 0
+PACK_VER = 0
+FRM_VER = 0.1
 
+# VERSION_FILE = ./${INCLUDE}/ws_version.h
+
+#package structure
+GUI_PACK_NAME = mdictionarygui
+MNG_PACK_NAME = mdictionary
+PLUGINS_PACK_NAME = mdictionaryplugins
+BOOKMARKS_PACK_NAME = mdictionarybookmarks
+META_PACK_NAME = mdictionarydictionary
+
+GUI_EXECUTABLE = ${BINARIES}/mdictionary
+GUI_SERVICEFILE = org.maemo.mdictionaryGui.service
+GUI_DIRS = ${DESTDIR}/usr/bin ${DESTDIR}/usr/share/applications/hildon ${DESTDIR}/usr/share/pixmaps ${DESTDIR}/usr/share/mis ${DESTDIR}/usr/share/dbus-1/services ${DESTDIR}/usr/share/locale  
+#${DESTDIR}/usr/share/doc/mdictionarygui
+GUI_DBUS = ${DATA}/other/${GUI_SERVICEFILE}
+GUI_ICONS = ${DATA}/icons/mdictionary_icon.png ${DATA}/icons/mdictionary.png ${DATA}/icons/ws_top.png ${DATA}/icons/ws_warning_icon.png ${DATA}/icons/qgn_indi_search_mdictionary.png ${DATA}/icons/ws_tra.png ${DATA}/icons/mdictionary_about.png
+GUI_LOCALE = ${DATA}/locale/out/
+GUI_DOC = ${DATA}/docs/${GUI_PACK_NAME}/
+GUI_OTHER = ${DATA}/other/mdictionary.desktop
+GUI_MIS = ${DATA}/mis/mdictionary-search.xml
+
+MNG_EXECUTABLE = ${BINARIES}/mdictionaryManager 
+MNG_SERVICEFILE = org.maemo.mdictionaryManager.service
+MNG_LIB = ${BINARIES}/engine_bookmarks.so
+MNG_DIRS = ${DESTDIR}/usr/bin ${DESTDIR}/usr/lib/mdictionary ${DESTDIR}/usr/share/dbus-1/services  ${DESTDIR}/usr/share/mdictionary ${DESTDIR}/usr/share/doc/${MNG_PACK_NAME}
+MNG_DBUS = ${DATA}/other/${MNG_SERVICEFILE}
+MNG_OTHER = ${DATA}/dictionaries 
+
+MNG_DICT1 = ${DATA}/dictionaries/FinnishEnglish/comn_sdict02_finnish-english.dict.dz ${DATA}/dictionaries/FinnishEnglish/comn_sdict02_finnish-english.idx ${DATA}/dictionaries/FinnishEnglish/comn_sdict02_finnish-english.ifo ${DESTDIR}/usr/share/mdictionary/dictionaries/FinnishEnglish/
+MNG_DICT2 = ${DATA}/dictionaries/EnglishFinnish/dict.xdxf ${DATA}/dictionaries/EnglishFinnish/dict.cache ${DESTDIR}/usr/share/mdictionary/dictionaries/EnglishFinnish/
+
+MNG_DICT_DIRS = ${DESTDIR}/usr/share/mdictionary/dictionaries/FinnishEnglish/ ${DESTDIR}/usr/share/mdictionary/dictionaries/EnglishFinnish/
+
+MNG_BOOKMARKS = ${DATA}/bookmarks/${BOOKMARKS}/*
+MNG_DOC = ${DATA}/docs/${MNG_PACK_NAME}/
+
+PLUGINS_LIB = ${BINARIES}/engine_*.so
+PLUGINS_DIRS = ${DESTDIR}/usr/lib/mdictionary ${DESTDIR}/usr/share/pixmaps
+#${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME} 
+PLUGINS_ICONS = ${DATA}/icons/engine_xdxf_icon.png
+PLUGINS_DOC = ${DATA}/docs/${PLUGINS_PACK_NAME}/
+
+META_DIRS = ${PACKAGES}/${META_PACK_NAME}/usr/share/doc/${META_PACK_NAME}
+META_DOC = ${DATA}/docs/${META_PACK_NAME}/
+
+MAIL_ADDRESS = mdictionary-devel@garage.maemo.org
+LOCALEDIR=/usr/share/locale
+GETTEXT_PACKAGE=mdictionary
+ALL_LINGUAS="en_GB"
+#APP_VER = ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'`
+
+ifeq (${MAKECMDGOALS}, release-package)
+       APP_VER = ${RELEASE_MAJOR_VER}.${RELEASE_MINOR_VER}.${RELEASE_PATCH_VER}
+else
+       APP_VER = ${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}-build`svn log -r HEAD -q | grep -v -e -- | awk '{print $$1}' | tr -d r`
+endif
+
+FILES = ${DATA}/files_debbuild
+LOG_DIR = logs
+LOG_CLEAN = ${LOG_DIR}/clean.log
+LOG_BUILD = ${LOG_DIR}/build.log
+LOG_RUN = ${LOG_DIR}/run.log
+LOG_DEBS = ${LOG_DIR}/debs.log
+LOG_INST = ${LOG_DIR}/install.log
 
-first: build-test
+first: build
        @echo -e -n ""
 
-# build new version (x+1).0.0
-version: version-pre
-
-# build new release with version x,(y+1).0
-release: release-pre
-
-# build new pre-release with version x.y.(z=REPOSITORY REVISION)
-pre-release: pre-release-pre
-
-#create new tagget version from actual trunk
-tagged-version: clean debs
-               @mkdir  ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER}
-               @cp -r  ${REP_LOCATION}/${REP_TRUNK}/*        ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER}
-               @echo -e -n ".svn\n*~\n"    >    ${REP_LOCATION}/${REP_TRUNK}/NOT_FOR_SVN
-               @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname ".svn" -exec rm -f -r {} \; >/dev/null 2>/dev/null
-               @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname "*~" -exec rm -f -r {} \; >/dev/null 2>/dev/null
-               @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -maxdepth 1 -iname "dict.*" -exec rm -f -r {} \; >/dev/null 2>/dev/null
-               @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname "*.deb" -exec mv {} ${REP_LOCATION}/${REP_TAG} \; >/dev/null 2>/dev/null
-               @cd ${REP_LOCATION}/${REP_TAG} && svn add ${APP_NAME}-${APP_VER}
-               @cd ${REP_LOCATION}/${REP_TAG} && svn ci -m "BUILD FRAMEWORK: Added new tagged version of WhiteStork: ${APP_NAME}-${APP_VER}\n"
-
-send-last:
-               @cd ${REP_LOCATION}/${REP_TRUNK} && tar -czf ${APP_NAME}-${APP_VER}.tar.gz   *_${APP_VER}-${PACK_VER}_${ARCH}.deb
+tag-version: clean
+               @install -d ${REP_TAG}/${APP_NAME}-${APP_VER}
+               @tar -czf ${REP_TAG}/${APP_NAME}-${APP_VER}/${APP_NAME}-${APP_VER}.tar.gz ../trunk/* --exclude .svn
+               @svn add ${REP_TAG}/${APP_NAME}-${APP_VER} 
+               @svn ci ${REP_TAG}/${APP_NAME}-${APP_VER} -m "Tagged new version: ${APP_NAME}-${APP_VER}"
+
+send-last:     debs
+               @tar -czf ${APP_NAME}-${APP_VER}.tar.gz *_${APP_VER}-${PACK_VER}_${ARCH}.deb
                @echo -e -n "#!/bin/bash\n\
-                       mutt -x -a ~/debs.log -a ~/build.log -a ~/${APP_NAME}-${APP_VER}.tar.gz -s \"[WhiteStork]: daily build - version ${APP_NAME}-${APP_VER}\" mdictionary-devel@garage.maemo.org <~/stranger.content\n\
-                       rm -f ~/${APP_NAME}-${APP_VER}.tar.gz\n" > stranger.script
+                       mutt -x -a ~/debs.log -a ~/build.log -a ~/${APP_NAME}-${APP_VER}.tar.gz -s \"[mdictionary]: daily build - version ${APP_NAME}-${APP_VER}\" ${MAIL_ADDRESS} <~/mail.content\n\
+                       rm -f ~/${APP_NAME}-${APP_VER}.tar.gz\n" > mail.script
+
+               @chmod +x mail.script
+
                @echo -e -n "\
                        This message was generated automatically , please do not reply.\n\
-                       Attachment: ${APP_NAME}-${APP_VER}.tar.gz - tarball with the newest whitestorks' packages.\n\
+                       Attachment: ${APP_NAME}-${APP_VER}.tar.gz - tarball with the newest mdictionary's packages.\n\
                        Attachment: build.log - logs from building binaries.\n\
                        Attachment: debs.log - logs from making *.deb packages.\n\n\
-                       Automatic Building Framework ver: ${FRM_VER}\nCopyright 2006 ComArch S.A.\n" > stranger.content
-               @scp ${REP_LOCATION}/${REP_TRUNK}/${APP_NAME}-${APP_VER}.tar.gz stranger@stud.ics.p.lodz.pl:~/
-               @scp ${LOG_BUILD} stranger@stud.ics.p.lodz.pl:~/
-               @scp ${LOG_DEBS} stranger@stud.ics.p.lodz.pl:~/
-               @scp ${MAKEFILE_FILE}/stranger.script stranger@stud.ics.p.lodz.pl:~/
-               @scp ${MAKEFILE_FILE}/stranger.content stranger@stud.ics.p.lodz.pl:~/
-               @rm -f ${MAKEFILE_FILE}/stranger.script
-               @rm -f ${MAKEFILE_FILE}/stranger.content
-               @ssh stranger@stud.ics.p.lodz.pl  ./mailscript
-
-version-post: tagged-version send-last
-               @echo -e -n "New version ${APP_VER} created and sent.\n"
-release-post: tagged-version send-last
-               @echo -e -n "New release ${APP_VER} created.\n"
-pre-release-post: tagged-version send-last
-               @echo -e -n "New pre-release ${APP_VER} created and sent.\n"
-
-version-pre:
-               @-cd  ${REP_LOCATION}/${REP_TRUNK} && svn update
-               @${REP_LOCATION}/${REP_TRUNK}/${DATA}/version.sh "${MAKEFILE_FILE}"
-               @echo -e -n "VERSION: Jeden zamykamy\n" 
-
-release-pre:
-               @-cd  ${REP_LOCATION}/${REP_TRUNK} && svn update
-               @${REP_LOCATION}/${REP_TRUNK}/${DATA}/release.sh "${MAKEFILE_FILE}"
-               @echo -e -n "RELEASE: Jeden zamykamy\n"
-
-pre-release-pre:
-               @-cd  ${REP_LOCATION}/${REP_TRUNK} && svn update
-               @${REP_LOCATION}/${REP_TRUNK}/${DATA}/pre-release.sh "${MAKEFILE_FILE}"
-               @echo -e -n "PRE_RELEASE: Jeden zamykamy\n"             
-
-build: pre-build ${BINARIES}/engine_xdxf.so ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager
-               @echo -e -n "\nBuilding WhiteStork is finished.\n"
+                       Automatic Building Framework ver: ${FRM_VER}\nCopyright 2006 ComArch S.A.\n" > mail.content
+               @scp ${APP_NAME}-${APP_VER}.tar.gz krzsas@localhost:~/
+               @scp ${LOG_BUILD} krzsas@localhost:~/
+               @scp ${LOG_DEBS} krzsas@localhost:~/
+               @scp mail.script krzsas@localhost:~/
+               @scp mail.content krzsas@localhost:~/
+               @rm -f mail.script
+               @rm -f mail.content
+               @ssh krzsas@localhost  ./mail.script
+
+localization:
+               @echo -e -n "Generating locale...\n"
+               @echo -e -n "Generating locale...\n" > ${LOG_BUILD}
+               
+               @./generate_locale ${DATA}/locale/ ${GUI_LOCALE}
+               @echo -e -n "Locale generation successfully completed...\n"
+               @echo -e -n "Locale generation successfully completed...\n" > ${LOG_BUILD}
+
+build: pre-build  ${BINARIES}/ws_dbus.o ${GUI_EXECUTABLE} ${MNG_EXECUTABLE} ${BINARIES}/engine_bookmarks.so plugins
+               @echo -e -n "\nBuilding mdictionary is finished.\n"
+
 pre-build:
-               @echo -e -n "Building WhiteStork... \n"
-               @echo -e -n "Location: ${REP_LOCATION}\n\nplease wait a while....\n"
+               @echo -e -n "Building mdictionary... \n"
                @echo -e -n "" > ${LOG_BUILD}
 
-${BINARIES}/WhiteStorkManager:
+plugins: ${BINARIES}/engine_xdxf.so ${BINARIES}/engine_stardict.so
+               
+
+${MNG_EXECUTABLE}: 
+# update-version
+               @echo -e -n "**--> Compiling Manager...\n"
                @echo -e -n "**--> Compiling Manager...\n" >> ${LOG_BUILD}
-               @cd ${MANAGER} && make >> ${LOG_BUILD}
+               @make SQLITE=${SQLITE} -C ${MANAGER} >> ${LOG_BUILD}
 
 ${BINARIES}/ws_dbus.o:
+               @echo -e -n "**--> Compiling D-BUS Wrapper... \n"
                @echo -e -n "**--> Compiling D-BUS Wrapper... \n" >> ${LOG_BUILD}
-               @cd ${DBUS} && make >> ${LOG_BUILD}
+#              @cd ${DBUS} && make >> ../../${LOG_BUILD}
+               @make -C ${DBUS} >> ${LOG_BUILD}
 
-${BINARIES}/WhiteStork:
+${GUI_EXECUTABLE}: 
+#update-version
+               @echo -e -n "**--> Compiling User Interface...\n"
                @echo -e -n "**--> Compiling User Interface...\n" >> ${LOG_BUILD}
-               @cd ${GUI} && make >> ${LOG_BUILD}
-
-${BINARIES}/engine_xdxf.so:
-               @echo -e -n "**--> Compiling Engine...\n" >> ${LOG_BUILD}
-               @cd ${ENGINE} && make >> ${LOG_BUILD}
-
-
-clean:
+#              @cd ${GUI} && make APP_VER=${APP_VER} >> ../../${LOG_BUILD}
+               @make APP_VER=${APP_VER} -C ${GUI} >> ${LOG_BUILD}
+
+${BINARIES}/engine_xdxf.so: 
+# update-version
+               @echo -e -n "**--> Compiling XDXF Engine...\n"
+               @echo -e -n "**--> Compiling XDXF Engine...\n" >> ${LOG_BUILD}
+#              @cd ${XDXF_PLUGIN} && make >> ../../../${LOG_BUILD}
+               @make -C ${XDXF_PLUGIN} >> ${LOG_BUILD}
+
+${BINARIES}/engine_stardict.so:  
+# update-version
+               @echo -e -n "**--> Compiling StarDict Engine...\n"
+               @echo -e -n "**--> Compiling StarDict Engine...\n" >> ${LOG_BUILD}
+#              @cd ${STARDICT_PLUGIN} && make >> ../../../${LOG_BUILD}
+               @make -C ${STARDICT_PLUGIN} >> ${LOG_BUILD}
+
+${BINARIES}/engine_bookmarks.so: 
+# update-version
+               @echo -e -n "**--> Compiling Bookmarks...\n"
+               @echo -e -n "**--> Compiling Bookmarks...\n" >> ${LOG_BUILD}
+               @make -C ${BOOKMARKS_DIR} >> ${LOG_BUILD}
+               
+clean-logs:     
+               @echo -e -n "Cleaning all logs\n"
+               @rm -f ${LOG_DIR}/*.log
+
+clean: clean-logs
+               @-echo -e -n "Cleaning project directories\n"
                @echo -e -n "" > ${LOG_CLEAN}
-               @-rm -f ./${BINARIES}/* >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
-               @-rm -f ${REP_LOCATION}/${REP_TRUNK}/*~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
-               @-rm -f ${REP_LOCATION}/${REP_TRUNK}/*.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
-               @-cd ./${GUI} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
-               @-cd ./${DBUS} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
-               @-cd ./${ENGINE} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
-               @-cd ./${MANAGER} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
-               @-echo -e -n "Project directories are cleaned.\n"
-
-run:
-               @run-standalone.sh WhiteStork
-
-build-test: clean build
-               @echo -e -n "Copying needed files to specyfic directories...\n"
-               @echo -e -n > ${LOG_RUN}
-               @-fakeroot mkdir /usr/share/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot rm -f /usr/share/WhiteStork/*  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot mkdir  /usr/share/WhiteStork/engines >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot mkdir  /usr/share/WhiteStork/dictionaries >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot mkdir  /usr/share/WhiteStork/dictionaries/local >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot mkdir /usr/lib/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot rm -f /usr/lib/WhiteStork/*  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot mkdir /usr/include/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot rm -f /usr/include/WhiteStork/*  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStork ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStorkManager /usr/bin/  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/engine_xdxf.so /usr/lib/WhiteStork  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${INCLUDE}/dictionary_engine.h /usr/include/WhiteStork
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.png /usr/share/pixmaps/WhiteStork  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/icon.png /usr/share/pixmaps/WhiteStork  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/dict.xdxf /usr/share/WhiteStork/dictionaries/local  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/dict.cache /usr/share/WhiteStork/dictionaries/local >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkManager.service /usr/share/dbus-1/services  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.desktop /usr/share/applications/hildon  >> ${LOG_RUN} 2>> ${LOG_RUN}
-               @gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/local/path "/usr/share/WhiteStork/dictionaries/local"
-               @gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/local/name "Local dictionary"
-               @gconftool-2 --type bool --set /apps/WhiteStork/Dictionaries/local/active true
-
-run-deb:
-               @run-standalone.sh WhiteStork
-
-debs: pre-debs mng-deb eng-deb gui-deb
-               @echo -e -n "Building debian packages finished.\n"
-
-mng-deb: mng-pack-dirs ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStorkManager
-               @echo -e -n "**-->Makeing manager package...\n"
-               @echo -e -n "**-->Makeing manager package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStorkManager ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin/ >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkManager.service  ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.xdxf ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements/dict.xdxf   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.cache ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements/dict.cache   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict2.xdxf ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en/dict.xdxf   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @find ${FILES} -type f -maxdepth 1 -name "mngc_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \;
-
-               @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup
-
-               mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control
-
-
-               @find ${FILES} -type f -maxdepth 1 -name "mngC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork" \;
-               @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork/changelog"
-               @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork/changelog.Debian"
-               @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums
-               @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums
-               @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \;
-               @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-
-gui-deb: gui-pack-dirs ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork
-               @echo -e -n "**-->Making whitestork GUI package...\n"
-               @echo -e -n "**-->Making whitestork GUI package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStork ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin/ >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.desktop ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon/whitestorkgui.desktop   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @fakeroot cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.desktop /usr/share/applications/hildon/whitestorkgui.desktop
-               @ln -s /usr/share/applications/hildon/whitestorkgui.desktop ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications/0112_whitestorkgui.desktop
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/icon.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/whitestork_icon.png   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkGui.service  ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services   >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @find ${FILES} -type f -maxdepth 1 -name "guic_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \;
-               
-               @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup
-
-               mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control
-
-               @find ${FILES} -type f -maxdepth 1 -name "guiC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui" \;
-#              @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}"/debian/usr/share/doc/whitestorkgui.1
-               @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui/changelog"
-               @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui/changelog.Debian"
-               @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums
-               @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums
-               @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \;
-               @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb   >> ${LOG_DEBS} 2>> ${LOG_DEBS}                
-
-eng-deb: eng-pack-dirs ${BINARIES}/engine_xdxf.so
-               @echo -e -n "**-->Making engine package...\n"
-               @echo -e -n "**-->Making engine package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/engine_xdxf.so ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork/ >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${INCLUDE}/dictionary_engine.h ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork  >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/engine_xdxf_icon.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @find ${FILES} -type f -maxdepth 1 -name "engc_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \;
-               
-               @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup
-
-               mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control
-
-               @find ${FILES} -type f -maxdepth 1 -name "engC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf" \;
-               @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf/changelog"
-               @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf/changelog.Debian"
-               @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums
-               @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums
-               @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \;
-               @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}  &&  fakeroot dpkg-deb --build debian  >> ${LOG_DEBS}  2>> ${LOG_DEBS}
-               @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${ENG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_DEBS} 2>> ${LOG_DEBS}         
-
-debs-i: clean-inst-log mng-deb-i gui-deb-i eng-deb-i
-               @echo -e -n "Every packages has been reinstalled.\n"
-
-clean-inst-log:
+               @-rm -f ${BINARIES}/* >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @-rm -f *~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @-rm -f *.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @-rm -rf ${PACKAGES}/*
+               @-make -C ${GUI} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @-make -C ${DBUS} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @-make -C ${XDXF_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @-make -C ${STARDICT_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @-cd ${MANAGER} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
+               @-make -C ${MANAGER} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
+               @find src/bookmarks/ -mindepth 1 -maxdepth 1 -type d -not -name .svn -exec make -C {} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} \;
+               @-rm -rf ${GUI_LOCALE}*
+               
+#              @-cd ${GUI} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
+#              @-cd ${DBUS} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
+#              @-cd ${XDXF_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
+#              @-cd ${STARDICT_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
+#              @-cd ${BOOKMARKS_DIR} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
+
+run: clean install entries run-dict clean-temp
+
+
+run-dict:
+               @run-standalone.sh mdictionaryManager
+
+clean-temp:
+               @-fakeroot rm -rf /usr/share/mdictionary
+               @-fakeroot rm -rf /usr/lib/mdictionary
+               @-fakeroot rm -rf /usr/include/mdictionary
+               @-fakeroot rm -f /etc/others-menu/extra_applications/0112_mdictionarygui.desktop
+               @-fakeroot rm -f /usr/share/applications/hildon/mdictionarygui.desktop 
+               @-fakeroot rm -f /usr/share/pixmaps/mdictionary.png 
+               @-fakeroot rm -f /usr/share/pixmaps/mdictionary_icon.png
+               @-fakeroot rm -f /usr/bin/mdictionary
+               @-fakeroot rm -f /usr/bin/mdictionaryManager
+               @-fakeroot rm -f /usr/share/applications/hildon/mdictionarygui.desktop 
+               @-fakeroot rm -f /usr/lib/mdictionary/engine_xdxf.so
+               @-fakeroot rm -f /usr/lib/mdictionary/engine_stardict.so
+
+#              gconftool-2 --recursive-unset /apps/maemo/mdictionary
+
+install-manager: localization ${BINARIES}/ws_dbus.o  ${BINARIES}/engine_bookmarks.so ${MNG_EXECUTABLE}
+               @install -d ${MNG_DIRS}
+               @cp ${MNG_EXECUTABLE} ${DESTDIR}/usr/bin
+               @cp ${MNG_LIB} ${DESTDIR}/usr/lib/mdictionary
+               @cp ${MNG_DBUS} ${DESTDIR}/usr/share/dbus-1/services
+               @find  ${MNG_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${MNG_PACK_NAME} \;
+               
+#              @install -d ${MNG_DICT_DIRS}
+#              @cp ${MNG_DICT1}
+#              @cp ${MNG_DICT2}
+               
+               @install -d ${DESTDIR}/usr/share/mdictionary/dictionaries/bookmarks
+               @cp -rf ${MNG_BOOKMARKS} ${DESTDIR}/usr/share/mdictionary/dictionaries/bookmarks
+               
+install-gui:   ${BINARIES}/ws_dbus.o ${GUI_EXECUTABLE} 
+               @install -d ${GUI_DIRS}
+               @cp ${GUI_EXECUTABLE} ${DESTDIR}/usr/bin
+               @cp ${GUI_ICONS} ${DESTDIR}/usr/share/pixmaps
+               @cp ${GUI_DBUS} ${DESTDIR}/usr/share/dbus-1/services
+               @cp ${GUI_OTHER} ${DESTDIR}/usr/share/applications/hildon
+               @cp ${GUI_MIS} ${DESTDIR}/usr/share/mis
+               @cp -a ${GUI_LOCALE}* ${DESTDIR}/usr/share/locale/              
+#              @find  ${GUI_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${GUI_PACK_NAME} \;
+
+install-plugins: plugins
+               @install -d ${PLUGINS_DIRS}
+               @cp ${PLUGINS_LIB} ${DESTDIR}/usr/lib/mdictionary
+               @cp ${PLUGINS_ICONS} ${DESTDIR}/usr/share/pixmaps
+               @install -d ${MNG_DICT_DIRS}
+               @cp ${MNG_DICT1}
+               @cp ${MNG_DICT2}
+#              @find  ${PLUGINS_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME} \;
+
+install-mdictionary:   install-manager install-gui install-plugins
+
+install:       install-manager install-gui install-plugins
+               @echo -e "\n\nIf you are installing mdictionary, please run 'make entries', before running the application ( not as root )\n\n"
+
+entries:       
+               gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/name "Polish - English Sample Dictionary"
+               gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/path "/usr/share/mdictionary/dictionaries/StarDictSampleDict"
+               gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/active true
+               gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/StarDictSampleDict/optimized false
+               gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/name "English - Polish Sample Dictionary"
+               gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/path "/usr/share/mdictionary/dictionaries/XDXFSampleDict"
+               gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/active true
+               gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/XDXFSampleDict/optimized false
+               
+               gconftool-2 --type string --set /apps/maemo/mdictionary/engines/bookmarks/path "/usr/lib/mdictionary/engine_bookmarks.so"
+               gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/bookmarks/name "Bookmarks"
+               gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/bookmarks/path "/usr/share/mdictionary/dictionaries/bookmarks"
+               gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/bookmarks/active false
+               gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/bookmarks/optimized true
+               chmod -R 0777 /usr/share/mdictionary/dictionaries
+               
+               gconftool-2 --type string --set /apps/maemo/mdictionary/engines/xdxf/path "/usr/lib/mdictionary/engine_xdxf.so"
+               gconftool-2 --type string --set /apps/maemo/mdictionary/engines/stardict/path "/usr/lib/mdictionary/engine_stardict.so"
+               
+#              maemo-select-menu-location mdictionary.desktop
+
+
+install_deb: clean-inst-log uninstall eng-deb-i mng-deb-i gui-deb-i
+               @echo -e -n "All packages have been installed/reinstalled.\n"
+
+clean-inst-log: 
                @echo -n "" > ${LOG_INST}
 
-debs-ir: debs-i
-               @echo -e -n "Restarting af-sb-init.sh <af-sb-init.sh restart>...\n"
-               @af-sb-init.sh restart
-               @echo -e -n "Now You can test Your new WhiteStork :D .. enjoy :-)\n"
-
-mng-deb-i:
-               @echo -e -n "Removing old MANAGER...\n"
-               @-fakeroot dpkg -r whitestork  >/dev/null 2>/dev/null           
-               @echo -e -n "Installing new package MANAGER...\n"
-               @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_INST} 2>> ${LOG_INST}
-
-gui-deb-i:
-               @echo -e -n "Removing old GUI...\n"
-               @-fakeroot dpkg -r whitestorkgui  >/dev/null 2>/dev/null                
-               @echo -e -n "Installing new package GUI...\n"
-               @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_INST} 2>> ${LOG_INST}
-
-eng-deb-i:
-               @echo -e -n "Removing old ENGINE...\n"
-               @-fakeroot dpkg -r enginexdxf  >/dev/null 2>/dev/null           
-               @echo -e -n "Installing new package ENGINE...\n"
-               @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${ENG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_INST} 2>> ${LOG_INST}
-
-pre-debs: clean
-               @echo -e -n "Making of *.deb packages...\nPlease wait...\n"
-               @echo -e -n "" > ${LOG_DEBS}
-
-eng-pack-dirs:
-               @echo -e -n "Creating and cleaning required directories for ENGINE..."   >/dev/null 2>/dev/null
-               @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/*   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork   >/dev/null 2>/dev/null  
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps   >/dev/null 2>/dev/null
-               @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \;
-
-mng-pack-dirs:
-               @echo -e -n "Creating and cleaning required directories for MANAGER..."   >/dev/null 2>/dev/null
-               @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/*   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/engines   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork   >/dev/null 2>/dev/null
-               @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \;
-
-gui-pack-dirs:
-               @echo -e -n "Creating and cleaning required directories for GUI..."   >/dev/null 2>/dev/null
-               @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/*   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/WhiteStork   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services   >/dev/null 2>/dev/null
-               @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \;
-
-whole-pack-dirs:
-               @echo -e -n "Creating and cleaning required directories WHOLE SYSTEM..."
-               @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/*
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/engines
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/WhiteStork
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon    
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui   >/dev/null 2>/dev/null
-               @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf   >/dev/null 2>/dev/null
-               @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \;
-
 uninstall:
-               @-fakeroot dpkg -r enginexdxf
-               @-fakeroot dpkg -r whitestorkgui
-               @-fakeroot dpkg -r whitestork
-               @-fakeroot dpkg --purge whitestork
-               @-fakeroot dpkg --purge whitestorkgui
-               @-fakeroot dpkg --purge enginexdxf
-               @-gconftool-2 --recursive-unset /apps/WhiteStork
-               @-gconftool-2 --recursive-unset /apps/maemo/WhiteStork
-               @-rm -rf  /usr/share/WhiteStork
-               @-rm -f  /usr/share/pixmaps/whitestork.png
-               @-rm -f  /usr/share/pixmaps/engine_xdxf_icon.png
-               @-rm -f  /usr/share/pixmaps/whitestork_icon.png
+               @-fakeroot dpkg --purge mdictionary
+#              @-fakeroot dpkg --purge mdictionarydictionary
 
 display: access
                @fakeroot su ${USER} -c 'af-sb-init.sh start'   
@@ -394,6 +327,21 @@ display-r: access
 access:
                @fakeroot chmod 0777 /var/run
 
-release-package: 
-               @make -f release_makefile clean
-               @make -f release_makefile debs && echo "Release package generation successfully completed"
+release-package: clean debs meta-package
+               @echo "Release package generation successfully completed"
+
+snapshot: tag-version send-last
+
+repo:  release-package meta-package
+
+       @rm -rf ${DEB_REP_DIR}
+       @./generate_repo ${DEB_REP_DIR}
+       
+package: clean
+       dpkg-buildpackage -rfakeroot
+
+.PHONY: docs
+docs:
+       doxygen Doxyfile
+       # doxygen always put wrong meta charset tag - we have repair it manualy
+       sed -i -e "s/charset=iso-8859-1/charset=utf-8/g" doc/html/*html