images size changed, so that they fit in the window area now; welcome screen corrected.
[mdictionary] / Makefile
index c79f4db..9172285 100644 (file)
--- a/Makefile
+++ b/Makefile
-CC = gcc
-DEBUG = -Wall -g
-LIBS = `pkg-config --libs glib-2.0 gmodule-2.0 libosso` -lpthread
-FLAGS = `pkg-config --cflags glib-2.0 gmodule-2.0 libosso`
+ARCH = `arch`
+REP_TAG = ../tags
+REP_BRANCH = branches
+
+DEB_REP_DIR = www
+
+#declaration of directory names
+BINARIES = bin
 SOURCE = src
-BINARY = ./bin
-INCLUDE = ./include
-APP = whitestork
-APP_VER = 0.1.1-r104
-EXECUTABLE = ${BINARY}/WhiteStork
-
-CONTENT = \
-"Source: whitestork\nSection: user/tools Tools\nPriority: optional\nMaintainer: ComArch S.A. <contact@comarch.com>\nBuild-Depends: debhelper (>= 4.0.0)\nStandards-Version: 3.6.0\n\
-\nPackage: whitestork \nArchitecture: any \nDepends: \$${shlibs:Depends}, \$${misc:Depends} \nDescription: multilangual dictionary programm for XDXF dictionaries\n\
- This dictionary is based on XDXF-based format doctionaries.\n \
- You can download any dictionary on http://xdxf.sourceforge.net and use it \n \
- with this program to have better and faster search engine with graphics user \n \
- interface. Program is written and devoleped to run on maemo platform \n \
- (Nokia 770 device - see: http://www.nokia.com/770). \n \
- Copyright 2006, ComArch S.A."
-
-ICON = "\n\nXB-Maemo-Icon-26:\n\
-iVBORw0KGgoAAAANSUhEUgAAABoAAAAZCAAAAAAKtWG8AAAACXBIWXMAAAAnAAAAJwEqCZFP\n\
-AAAAB3RJTUUH1QkMEgEBuF+MPAAAACF0RVh0Q29tbWVudABKUEVHOmdudS1oZWFkLmpwZyAy\n\
-NzZ4MjYxjzmxCgAAAi9JREFUKM9dkd9LU2Ecxp/37HU/nFub02Zty9K0lc5FYWJBUCBeRD+o\n\
-y6j/IoIuoj8hgi6DgqAroSAk+gWSIuZVTU1nuDM3tzl1O3PNc3a29/12cSyoy+/zfD+fm4cR\n\
-QJWdPXgiCgMAECNVF72t4ICZmEmxmn9ooN8FAEV1gnmr/VeCHDKd9USHlIAecAIAfPJmM5l5\n\
-br/NkdS16KAHtFdccndTLuAcBaKmVslxMkoIeUAFdT4hr00IfvUGR8fxjU2dw1VK3AG0z4/V\n\
-qjI59j05R7cUHHLYHVyW01GC+fFhPayFR/p6JlefHLyI5fnrLVzhzfxi+MW7B+N29Wx2mr9f\n\
-y73O19+E3G1MzmZeenxLr7rW3sYHybbz6XLft6ep0PDwOdujtt3Dxer9ASbj+pTdF04mzwRT\n\
-sfOdo5zDf5L7XBcA+BfVES/8P0zn+NbRkA0govzSHBElhDR0SXJ6VYpsk4gYAagXurH9q8sJ\n\
-kXKFChm30XTEAQ4AxUhjVcQkseV68Eu8UzutAAAjwFgo1S+VI6i0VtX0GHnyXre1AVFj29gS\n\
-X4nkuiYqZTH1QRIRkQKABxyK0l4mFt5gXl+hEbOG4wAAGDi2IjpYx2xEW8mdsjIQERGtCVrf\n\
-kCTMjCnTlo8U6yFUQLi+1RA/n92dYZYPjCy2xPy1vcIJRdUHbPu+fYq110w3p6JN7hL+rcC6\n\
-WhiOqMmFXuP/Ci0KuMuZLd2b/5OwvzwAamrlWs+B/es340gXFARK7DMAAAAASUVORK5CYII=\n"
-
-LINKS = "/usr/share/applications/hildon/whitestork.desktop etc/others-menu/extra-applications/0112_whitestork.desktop"
-
-GCONF_DIR="\
-echo -e -n \"<---------->\" \n\
-gconftool-2 --type bool --set /apps/WhiteStork/Dictionaries/dict/active true \n\
-gconftool-2 --type bool --set /apps/WhiteStork/Dictionaries/other/active true \n\
-gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/dict/path \"/usr/share/WhiteStork/dict\" \n\
-gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/other/path \"/usr/share/WhiteStork/other\" \n"
-
-all: ${BINARY}/engine_xdxf.so ${BINARY}/ws_dbus.o ${BINARY}/WhiteStork ${BINARY}/WhiteStorkManager
-               @echo -e "\n.::======================= Success!! ===================::.\n\n"
-       
-${BINARY}/WhiteStorkManager:
-               @echo -e "\n.::================ Compiling Manager ... ==============::."
-               @cd manager && make
-#              @${CC} -c ${SOURCE}/ws_manager.c ${FLAGS} ${DEBUG} -o ${BINARY}/ws_manager.o
-               @echo -e "\n.::============ Manager Compilation Finished. ==========::.\n\n"
-${BINARY}/ws_dbus.o:
-               @echo -e "\n.::================= Compiling D-BUS ... ===============::."
-               @cd dbus && make
-               @echo -e "\n.::============= D-BUS Compilation Finished. ===========::.\n\n"
-${BINARY}/WhiteStork:
-               @echo -e "\n.::==================  Compiling GUI ...  ==============::."
-               @cd gui && make
-               @echo -e "\n.::=============== GUI Compilation Finished. ============::.\n\n"a
-${BINARY}/engine_xdxf.so:
-               @echo -e "\n.::================= Compiling Engine ... ==============::."
-               @cd engine && make
-               @echo -e "\n.::============ Engine Compilation Finished. ==========::.\n\n"
-clean:
-               @echo -e "\n.::==================== cleaning ... ==================::."
-               @-rm ${BINARY}/*
-               @cd gui && make clean
-               @cd dbus && make clean
-               @cd engine && make clean
-               @cd manager && make clean
-               @echo -e "\n.::================= cleaning finished ================::.\n\n"
-run:
-               run-standalone.sh ./${EXECUTABLE}
-
-deb:
-
-               @echo -e -n "..:: Makeing debianized source....\n"
-               @echo -e -n "..:: --> Makeing new directory with source...  ../${APP}-${APP_VER}\n"
-               @-rm -f -r -d ../${APP}-${APP_VER}
-               @-rm -f ../*.tar.gz
-               @-rm -f ../*.deb
-               @mkdir ../${APP}-${APP_VER}
-               @cp -r * ../${APP}-${APP_VER}
-               @echo -e -n "..:: --> Debianizing new source directory ../${APP}-${APP_VER}\n"
-               @cd .. && tar -czf ${APP}-${APP_VER}.tar.gz ./${APP}-${APP_VER}
-               @cd ../${APP}-${APP_VER} && echo -e "\n\n" > NO_INTERACTIVE_DH_MAKE
-               @cd ../${APP}-${APP_VER} && dh_make -c gpl -f ../${APP}-${APP_VER}.tar.gz -e contact@comarch.com -s < NO_INTERACTIVE_DH_MAKE
-               @cd ../${APP}-${APP_VER} && rm -f NO_INTERACTIVE_DH_MAKE
-               @echo -e -n "..:: --> Set new content for basic debian package files...\n"
-               @echo -e -n "..:: ----> Setting files 'content' to:\n"
-               @echo -e -n ${CONTENT}
-               @echo -e -n ${CONTENT} > ../${APP}-${APP_VER}/debian/control
-#              @echo -e -n ${ICON} >> ../${APP}-${APP_VER}/debian/control
-               @cp -f ./data/postinst.ex  ../${APP}-${APP_VER}/debian
-               @echo -e -n "${LINKS}" > ../${APP}-${APP_VER}/debian/${APP}.links
-#              @cat ../${APP}-${APP_VER}/debian/postinst.ex | awk "/^set -e\$/ {print \"gconftool-2 --type string              --set /apps/WhiteStork/Dictionaries/dict/path \"/usr/share/WhiteStork/dict\"\n"}; {print \$0}"
-               @echo -e -n "..:: --> Makeing debian package...\n"
-               @-cd ../${APP}-${APP_VER} && dpkg-buildpackage -tc -rfakeroot
-
-debi:
-               @echo -e -n "Makeing GConf keys:\n"
-               @echo -e -n ${GCONF_DIR} > GCONF_SCRIPT
-               @/bin/bash < GCONF_SCRIPT
-               @-rm -f GCONF_SCRIPT
-               @cd .. && fakeroot dpkg -r whitestork
-               @cd .. && fakeroot dpkg -i ${APP}_${APP_VER}-1_armel.deb
-               @af-sb-init.sh restart
-
-#<<<<<<< .mine
-debi386:
-               @cd .. && fakeroot dpkg -r whitestork
-               @cd .. && fakeroot dpkg -i ${APP}_${APP_VER}-1_i386.deb
-               @af-sb-init.sh restart
-
-#=======
-deb386:
-               @echo -e -n "Makeing GConf keys:\n"
-               @echo -e -n ${GCONF_DIR} > GCONF_SCRIPT
-               @/bin/bash < GCONF_SCRIPT
-               @-rm -f GCONF_SCRIPT
-               @cd .. && fakeroot dpkg -r whitestork
-               @cd .. && fakeroot dpkg -i ${APP}_${APP_VER}-1_i386.deb
-               @af-sb-init.sh restart
-
-#<<<<<<< .mine
-#>>>>>>> .r133
-#=======
-
-#>>>>>>> .r134
-debr: deb debi
-
-deb386: deb debi386
-
-debc:
-               @cd .. && fakeroot dpkg -r whitestork
-               @cp ../${APP}_${APP_VER}-1_armel.deb /home/${USER}/MyDocs/.documents
-
-
-deldeb:
-               @echo -e -n "Deleteing package...\n"            
-               @-rm -f -r -d ../${APP}-${APP_VER}
-#              @-rm -f ../${APP}*.tar.gz
-#              @-rm -f ../${APP}*.deb
-               @-rm -f ../${APP}*.dsc
-               @-rm -f ../${APP}*.diff.gz
+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
+
+#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
+       @echo -e -n ""
+
+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 \"[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 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" > 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 mdictionary... \n"
+               @echo -e -n "" > ${LOG_BUILD}
+
+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}
+               @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}
+               @make -C ${DBUS} >> ${LOG_BUILD}
+
+${GUI_EXECUTABLE}: 
+#update-version
+               @echo -e -n "**--> Compiling User Interface...\n"
+               @echo -e -n "**--> Compiling User Interface...\n" >> ${LOG_BUILD}
+#              @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 *~ >> ${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
                
-install:
-               @echo -e -n "installing Maemo Whitestork Dictionary...\n"
-               @make
-               install -d ${DESTDIR}/usr/share
-               install -d ${DESTDIR}/usr/share/WhiteStork
-               install -d ${DESTDIR}/usr/share/WhiteStork/engines
-               install -d ${DESTDIR}/usr/share/WhiteStork/dict
-               install -d ${DESTDIR}/usr/share/WhiteStork/other
-               install -d ${DESTDIR}/usr/lib/WhiteStork
-               install -d ${DESTDIR}/usr/include/WhiteStork
-               install -d ${DESTDIR}/usr/share/dbus-1
-               install -d ${DESTDIR}/usr/share/dbus-1/services
-               install -d ${DESTDIR}/usr/share/pixmaps
-               install -d ${DESTDIR}/usr/share/applications/hildon
-               install ${EXECUTABLE}  ${DESTDIR}/usr/bin
-               install ${BINARY}/WhiteStorkManager ${DESTDIR}/usr/bin  
-               install dict1.xdxf ${DESTDIR}/usr/share/WhiteStork/dict/dict.xdxf
-               install dict1.cache ${DESTDIR}/usr/share/WhiteStork/dict/dict.cache
-               install dict2.xdxf ${DESTDIR}/usr/share/WhiteStork/other/dict.xdxf
-#              install dict2.cache ${DESTDIR}/usr/share/WhiteStork/other/dict.cache
-               install ${BINARY}/engine_xdxf.so ${DESTDIR}/usr/lib/WhiteStork
-               install ${INCLUDE}/dictionary_engine.h ${DESTDIR}/usr/include/WhiteStork
-               install data/org.maemo.WhiteStorkGui.service ${DESTDIR}/usr/share/dbus-1/services
-               install data/org.maemo.WhiteStorkManager.service ${DESTDIR}/usr/share/dbus-1/services
-               install data/whitestork.desktop ${DESTDIR}/usr/share/applications/hildon
-               install data/whitestork.png ${DESTDIR}/usr/share/pixmaps
-               install data/icon.png ${DESTDIR}/usr/share/pixmaps
-               install data/dict_icon.png  ${DESTDIR}//usr/share/pixmaps
+               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}
+
+uninstall:
+               @-fakeroot dpkg --purge mdictionary
+#              @-fakeroot dpkg --purge mdictionarydictionary
+
+display: access
+               @fakeroot su ${USER} -c 'af-sb-init.sh start'   
+
+display-s: access
+               @fakeroot su ${USER} -c 'af-sb-init.sh stop'
+
+display-r: access
+               @fakeroot su ${USER} -c 'af-sb-init.sh restart'
+
+access:
+               @fakeroot chmod 0777 /var/run
+
+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