architecture type changed when package creation (package with plugin); GB locale...
[mdictionary] / Makefile
index d358d3d..17a2434 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ MANAGER = ${SOURCE}/manager
 DBUS = ${SOURCE}/dbus_wrapper
 BOOKMARKS:=bdb
 BOOKMARKS_DIR = ${SOURCE}/bookmarks/${BOOKMARKS}
+DESTDIR = 
 
 ifeq (${BOOKMARKS}, sql)
        SQLITE:=-DSQLITE=0
@@ -33,12 +34,12 @@ STARDICT = stardict
 APP_NAME = whitestork
 
 #versions
-MAJOR_VER = 0
-MINOR_VER = 6
-RELEASE_MAJOR_VER = 0
-RELEASE_MINOR_VER = 6
-RELEASE_PATCH_VER = 0
-PACK_VER = 1
+MAJOR_VER = 1
+MINOR_VER = 0
+RELEASE_MAJOR_VER = 1
+RELEASE_MINOR_VER = 0
+RELEASE_PATCH_VER = 1
+PACK_VER = 0
 FRM_VER = 0.1
 
 # VERSION_FILE = ./${INCLUDE}/ws_version.h
@@ -52,24 +53,29 @@ META_PACK_NAME = whitestorkdictionary
 
 GUI_EXECUTABLE = ${BINARIES}/WhiteStork
 GUI_SERVICEFILE = org.maemo.WhiteStorkGui.service
-GUI_DIRS = ${PACKAGES}/${GUI_PACK_NAME}/usr/bin ${PACKAGES}/${GUI_PACK_NAME}/usr/share/applications/hildon ${PACKAGES}/${GUI_PACK_NAME}/usr/share/doc/whitestorkgui ${PACKAGES}/${GUI_PACK_NAME}/usr/share/pixmaps ${PACKAGES}/${GUI_PACK_NAME}/usr/share/dbus-1/services ${PACKAGES}/${GUI_PACK_NAME}/usr/share/locale  
+GUI_DIRS = ${DESTDIR}/usr/bin ${DESTDIR}/usr/share/applications/hildon ${DESTDIR}/usr/share/pixmaps ${DESTDIR}/usr/share/dbus-1/services ${DESTDIR}/usr/share/locale  
+#${DESTDIR}/usr/share/doc/whitestorkgui
 GUI_DBUS = ${DATA}/other/${GUI_SERVICEFILE}
 GUI_ICONS = ${DATA}/icons/whitestork_icon.png ${DATA}/icons/whitestork.png ${DATA}/icons/ws_top.png ${DATA}/icons/ws_tra.png
-GUI_LOCALE = ${DATA}/locale/en_GB ${DATA}/locale/pl_PL
+GUI_LOCALE = ${DATA}/locale/out/
 GUI_DOC = ${DATA}/docs/${GUI_PACK_NAME}/
 GUI_OTHER = ${DATA}/other/whitestork.desktop
 
 MNG_EXECUTABLE = ${BINARIES}/WhiteStorkManager 
 MNG_SERVICEFILE = org.maemo.WhiteStorkManager.service
 MNG_LIB = ${BINARIES}/ws_bookmark.so
-MNG_DIRS = ${PACKAGES}/${MNG_PACK_NAME}/usr/bin ${PACKAGES}/${MNG_PACK_NAME}/usr/lib/WhiteStork ${PACKAGES}/${MNG_PACK_NAME}/usr/share/dbus-1/services  ${PACKAGES}/${MNG_PACK_NAME}/usr/share/WhiteStork ${PACKAGES}/${MNG_PACK_NAME}/usr/share/doc/${MNG_PACK_NAME}
+MNG_DIRS = ${DESTDIR}/usr/bin ${DESTDIR}/usr/lib/WhiteStork ${DESTDIR}/usr/share/dbus-1/services  ${DESTDIR}/usr/share/WhiteStork ${DESTDIR}/usr/share/doc/${MNG_PACK_NAME}
 MNG_DBUS = ${DATA}/other/${MNG_SERVICEFILE}
 MNG_OTHER = ${DATA}/dictionaries 
+MNG_DICT1 = ${DATA}/dictionaries/elements/dict.cache ${DATA}/dictionaries/elements/dict.xdxf ${DESTDIR}/usr/share/WhiteStork/dictionaries/elements/
+MNG_DICT2 = ${DATA}/dictionaries/us-en/dict.xdxf ${DESTDIR}/usr/share/WhiteStork/dictionaries/us-en/
+MNG_DICT_DIRS = ${DESTDIR}/usr/share/WhiteStork/dictionaries/elements/ ${DESTDIR}/usr/share/WhiteStork/dictionaries/us-en/
 MNG_BOOKMARKS = ${DATA}/bookmarks/${BOOKMARKS}/*
 MNG_DOC = ${DATA}/docs/${MNG_PACK_NAME}/
 
 PLUGINS_LIB = ${BINARIES}/engine_*.so
-PLUGINS_DIRS = ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/lib/WhiteStork ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/share/doc/${PLUGINS_PACK_NAME} ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/share/pixmaps
+PLUGINS_DIRS = ${DESTDIR}/usr/lib/WhiteStork ${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}/
 
@@ -83,7 +89,7 @@ ALL_LINGUAS="en_GB"
 
 
 ifeq (${MAKECMDGOALS}, release-package)
-       APP_VER = ${RELEASE_MAJOR_VER}.${RELEASE_MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'`
+       APP_VER = ${RELEASE_MAJOR_VER}.${RELEASE_MINOR_VER}.${RELEASE_PATCH_VER}
 else
        APP_VER = ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'`
 endif
@@ -99,11 +105,6 @@ LOG_INST = ${LOG_DIR}/install.log
 first: build
        @echo -e -n ""
 
-#create new tagged version from current trunk
-
-# update-version:
-#              @echo -e -n "#ifndef _VERSION_H\n#define _VERSION_H\n\n#define WS_VERSION \"${APP_VER}\"\n#endif\n"  > ${VERSION_FILE}
-
 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
@@ -137,13 +138,9 @@ localization:
                @echo -e -n "Generating locale...\n"
                @echo -e -n "Generating locale...\n" > ${LOG_BUILD}
                
-               @./generate_locale ${DATA}/locale ${PACKAGES}/${GUI_PACK_NAME}/usr/share/locale
-
-localization2:
-               @install -d ${DATA}/locale/en_GB/LC_MESSAGES/
-               @install -d ${DATA}/locale/pl_PL/LC_MESSAGES/
-               @msgfmt ${DATA}/locale/en_GB.po -o ${DATA}/locale/en_GB/LC_MESSAGES/whitestork.mo
-               @msgfmt ${DATA}/locale/pl_PL.po -o ${DATA}/locale/pl_PL/LC_MESSAGES/whitestork.mo
+               @./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 ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager ${BINARIES}/ws_bookmark.so plugins
                @echo -e -n "\nBuilding WhiteStork is finished.\n"
@@ -212,6 +209,7 @@ clean: clean-logs
                @-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}
@@ -219,67 +217,12 @@ clean: clean-logs
 #              @-cd ${STARDICT_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
 #              @-cd ${BOOKMARKS_DIR} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
 
-run: build-test run-dict clean-temp
+run: clean install entries run-dict clean-temp
 
 
 run-dict:
                @run-standalone.sh WhiteStorkManager
 
-build-test: clean clean-temp build
-               @echo -e -n "Copying needed files to specific directories...\n"
-               @echo -e -n > ${LOG_RUN}
-               @-fakeroot install -d /usr/share/WhiteStork/dictionaries/elements
-               @-fakeroot mkdir /usr/share/WhiteStork/dictionaries/us-en
-               @-fakeroot mkdir /usr/share/WhiteStork/dictionaries/bookmarks
-               @-fakeroot mkdir /usr/lib/WhiteStork
-               @-fakeroot mkdir /usr/include/WhiteStork
-
-               @echo "Copying Manager files"
-               @cp -f ${BINARIES}/WhiteStorkManager /usr/bin/
-               @cp -f ${DATA}/other/org.maemo.WhiteStorkManager.service  /usr/share/dbus-1/services
-               @cp -f ${DATA}/dict1.xdxf /usr/share/WhiteStork/dictionaries/elements/dict.xdxf
-               @cp -f ${DATA}/dict1.cache  /usr/share/WhiteStork/dictionaries/elements/dict.cache
-               @cp -f ${DATA}/dict2.xdxf  /usr/share/WhiteStork/dictionaries/us-en/dict.xdxf
-               
-               @cp -rf ${DATA}/stardict /usr/share/WhiteStork/dictionaries
-
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/name "Bookmarks"
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/path "/usr/share/WhiteStork/dictionaries/bookmarks"
-               @gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/active true
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/xdxf/path "/usr/lib/WhiteStork/engine_xdxf.so"
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/bookmarks/path "/usr/lib/WhiteStork/ws_bookmark.so"
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/stardict/path "/usr/lib/WhiteStork/engine_stardict.so"
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/name "Elements Database"
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/path "/usr/share/WhiteStork/dictionaries/elements"
-               @gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/active true
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/name "American - English Dictionary"
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/path "/usr/share/WhiteStork/dictionaries/us-en"
-               @gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/active true
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/stardict/name "StarDict"
-               @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/stardict/path "/usr/share/WhiteStork/dictionaries/stardict"
-               @gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/stardict/active true
-
-               @echo "Copying GUI files"
-               @cp -f ${BINARIES}/WhiteStork /usr/bin/
-               @cp -f ${DATA}/whitestorkgui.desktop /usr/share/applications/hildon/whitestork.desktop
-               @ln -s /usr/share/applications/hildon/whitestork.desktop /etc/others-menu/extra_applications/0112_whitestorkgui.desktop
-               @cp -f ${DATA}/whitestork.png /usr/share/pixmaps
-               @cp -f ${DATA}/icon.png /usr/share/pixmaps/whitestork_icon.png
-               @cp -f ${DATA}/org.maemo.WhiteStorkGui.service /usr/share/dbus-1/services
-               @gconftool-2 --type bool --set /apps/maemo/WhiteStork/configuration/licence true
-               
-               @echo "Copying XDXF Engine files"
-               @cp -f ${BINARIES}/engine_xdxf.so /usr/lib/WhiteStork/
-               @cp -f ${DATA}/engine_xdxf_icon.png /usr/share/pixmaps
-
-               @echo "Copying StarDict Engine files"
-               @cp -f ${BINARIES}/engine_stardict.so /usr/lib/WhiteStork/
-               #@cp -f ${DATA}/engine_stardict_icon.png /usr/share/pixmaps
-               
-               @echo "Copying Bookmark's files"
-               @cp -f ${BINARIES}/ws_bookmark.so /usr/lib/WhiteStork/
-               @cp -f ${DATA}/ws_bookmarks /usr/share/WhiteStork/dictionaries/bookmarks/ws_bookmarks
-
 clean-temp:
                @-fakeroot rm -rf /usr/share/WhiteStork
                @-fakeroot rm -rf /usr/lib/WhiteStork
@@ -295,141 +238,73 @@ clean-temp:
                @-fakeroot rm -f /usr/lib/WhiteStork/engine_stardict.so
 
                gconftool-2 --recursive-unset /apps/maemo/WhiteStork
-run-deb:
-               @run-standalone.sh WhiteStork &
-
-debs: pre-debs mng-deb plugins-deb gui-deb meta-package
-               @echo -e -n "Building debian packages finished.\n"
 
-mng-deb: ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStorkManager ${BINARIES}/ws_bookmark.so
-               @echo -e -n "**-->Making manager package...\n"
-               @echo -e -n "**-->Making manager package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               
-               @cp -rf ${DATA}/package_contents/${MNG_PACK_NAME} ${PACKAGES}
-               
+install-manager: localization ${BINARIES}/ws_dbus.o  ${BINARIES}/ws_bookmark.so ${BINARIES}/WhiteStorkManager
                @install -d ${MNG_DIRS}
-               @cp ${MNG_EXECUTABLE} ${PACKAGES}/${MNG_PACK_NAME}/usr/bin
-               @cp ${MNG_LIB} ${PACKAGES}/${MNG_PACK_NAME}/usr/lib/WhiteStork
-               @cp ${MNG_DBUS} ${PACKAGES}/${MNG_PACK_NAME}/usr/share/dbus-1/services
-               @find  ${MNG_DOC} -type f -not -name copyright -not -path *.svn* -exec cp {} ${PACKAGES}/${MNG_PACK_NAME}/usr/share/doc/${MNG_PACK_NAME} \;
-               @gzip -r --best ${PACKAGES}/${MNG_PACK_NAME}/usr/share/doc/${MNG_PACK_NAME}
-               @cp ${MNG_DOC}/copyright ${PACKAGES}/${MNG_PACK_NAME}/usr/share/doc/${MNG_PACK_NAME}
-               @cp -rf ${MNG_OTHER} ${PACKAGES}/${MNG_PACK_NAME}/usr/share/WhiteStork
-               @install -d ${PACKAGES}/${MNG_PACK_NAME}/usr/share/WhiteStork/dictionaries/bookmarks
-               @cp -rf ${MNG_BOOKMARKS} ${PACKAGES}/${MNG_PACK_NAME}/usr/share/WhiteStork/dictionaries/bookmarks
-               @echo ${PACKAGES}/${MNG_PACK_NAME}
-#              @-find ${PACKAGES}/${MNG_PACK_NAME} -type d -name .svn -exec echo "jest" \;>> ${LOG_DEBS} 2>> ${LOG_DEBS}
-#              @-find ${PACKAGES}/${MNG_PACK_NAME} -type d -name .svn -exec rm -rf {} \;>> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               @echo po
-               @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${PACKAGES}/${MNG_PACK_NAME}/DEBIAN/control > ${PACKAGES}/${MNG_PACK_NAME}/DEBIAN/control_backup
-               @sed 's/Installed-Size:/Installed-Size: '`du -s ${PACKAGES}/${MNG_PACK_NAME} | awk {'print $$1'}`'/ ' ${PACKAGES}/${MNG_PACK_NAME}/DEBIAN/control_backup > ${PACKAGES}/${MNG_PACK_NAME}/DEBIAN/control
-               @rm ${PACKAGES}/${MNG_PACK_NAME}/DEBIAN/control_backup
+               @cp ${MNG_EXECUTABLE} ${DESTDIR}/usr/bin
+               @cp ${MNG_LIB} ${DESTDIR}/usr/lib/WhiteStork
+               @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} \;
                
-               @cd ${PACKAGES}/${MNG_PACK_NAME} && find -path '*DEBIAN*' -prune -o -type f -exec md5sum {} >> DEBIAN/md5sums \;
-               @cd ${PACKAGES} && fakeroot dpkg-deb --build ${MNG_PACK_NAME} ../${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ../${LOG_DEBS} 2>> ../${LOG_DEBS}
-
-gui-deb: clean ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork localization
-               @echo -e -n "**-->Making whitestork GUI package...\n"
-               @echo -e -n "**-->Making whitestork GUI package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS}
+#              @install -d ${MNG_DICT_DIRS}
+#              @cp ${MNG_DICT1}
+#              @cp ${MNG_DICT2}
                
-               @cp -rf ${DATA}/package_contents/${GUI_PACK_NAME} ${PACKAGES}
-               @install -d ${GUI_DIRS}
-               
-               @cp ${GUI_EXECUTABLE} ${PACKAGES}/${GUI_PACK_NAME}/usr/bin
-               @cp ${GUI_ICONS} ${PACKAGES}/${GUI_PACK_NAME}/usr/share/pixmaps
-               @cp ${GUI_DBUS} ${PACKAGES}/${GUI_PACK_NAME}/usr/share/dbus-1/services
-               @cp ${GUI_OTHER} ${PACKAGES}/${GUI_PACK_NAME}/usr/share/applications/hildon
-               
-               @find  ${GUI_DOC} -type f -not -name copyright -not -path *.svn* -exec cp {} ${PACKAGES}/${GUI_PACK_NAME}/usr/share/doc/${GUI_PACK_NAME} \;
-
-               @gzip -r --best ${PACKAGES}/${GUI_PACK_NAME}/usr/share/doc/${GUI_PACK_NAME}
+               @install -d ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
+               @cp -rf ${MNG_BOOKMARKS} ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
                
-               @cp ${GUI_DOC}/copyright ${PACKAGES}/${GUI_PACK_NAME}/usr/share/doc/${GUI_PACK_NAME}
-               
-               @-find ${PACKAGES}/${GUI_PACK_NAME} -name .svn -exec rm -rf {} \;>> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               
-               @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${PACKAGES}/${GUI_PACK_NAME}/DEBIAN/control > ${PACKAGES}/${GUI_PACK_NAME}/DEBIAN/control_backup
-               @sed 's/Installed-Size:/Installed-Size: '`du -s ${PACKAGES}/${GUI_PACK_NAME}| awk {'print $$1'}`'/ ' ${PACKAGES}/${GUI_PACK_NAME}/DEBIAN/control_backup > ${PACKAGES}/${GUI_PACK_NAME}/DEBIAN/control
-               
-               @rm ${PACKAGES}/${GUI_PACK_NAME}/DEBIAN/control_backup
-               
-#@touch ${PACKAGES}/${GUI_PACK_NAME}/DEBIAN/md5sums
-               @cd ${PACKAGES}/${GUI_PACK_NAME} && find -path '*DEBIAN*' -prune -o -type f -exec md5sum {} >> DEBIAN/md5sums \;
-               @cd ${PACKAGES} && fakeroot dpkg-deb --build ${GUI_PACK_NAME} ../${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ../${LOG_DEBS} 2>> ../${LOG_DEBS}
-
-
-plugins-deb: clean plugins
-               @echo -e -n "**-->Making whitestorkplugins package...\n"
-               @echo -e -n "**-->Making whitestorkplugins package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               
-               @cp -rf ${DATA}/package_contents/${PLUGINS_PACK_NAME} ${PACKAGES}
+install-gui:   ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork 
+               @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 -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} ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/lib/WhiteStork
-               @cp ${PLUGINS_ICONS} ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/share/pixmaps
-               
-               @find  ${PLUGINS_DOC} -type f -not -name copyright -not -path *.svn* -exec cp {} ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/share/doc/${PLUGINS_PACK_NAME} \;
-
-               @gzip -r --best ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/share/doc/${PLUGINS_PACK_NAME}
-               
-               @cp ${PLUGINS_DOC}/copyright ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/share/doc/${PLUGINS_PACK_NAME}
-               
-               @-find ${PACKAGES}/${PLUGINS_PACK_NAME} -name .svn -exec rm -rf {} \;>> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               
-               @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${PACKAGES}/${PLUGINS_PACK_NAME}/DEBIAN/control > ${PACKAGES}/${PLUGINS_PACK_NAME}/DEBIAN/control_backup
-               @sed 's/Installed-Size:/Installed-Size: '`du -s ${PACKAGES}/${PLUGINS_PACK_NAME} | awk {'print $$1'}`'/ ' ${PACKAGES}/${PLUGINS_PACK_NAME}/DEBIAN/control_backup > ${PACKAGES}/${PLUGINS_PACK_NAME}/DEBIAN/control
-               
-               @rm ${PACKAGES}/${PLUGINS_PACK_NAME}/DEBIAN/control_backup
-               
-               @cd ${PACKAGES}/${PLUGINS_PACK_NAME} && find -path '*DEBIAN*' -prune -o -type f -exec md5sum {} >> DEBIAN/md5sums \;
-               @cd ${PACKAGES}  &&  fakeroot dpkg-deb --build ${PLUGINS_PACK_NAME} ../${PLUGINS_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb>> ../${LOG_DEBS}  2>> ../${LOG_DEBS}
-
-               
-eng-deb: plugins-deb
-
-debs-i: install
-               
-               
-install: clean-inst-log uninstall eng-deb-i mng-deb-i gui-deb-i
+               @cp ${PLUGINS_LIB} ${DESTDIR}/usr/lib/WhiteStork
+               @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:       install-manager install-gui install-plugins
+               @echo -e "\n\nIf you are installing whitestork, please run 'make entries', before running the application ( not as root )\n\n"
+
+entries:       
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/name "Elements Database"
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/path "/usr/share/WhiteStork/dictionaries/elements"
+               gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/active true
+               gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/optimized true
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/name "American - English Dictionary"
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/path "/usr/share/WhiteStork/dictionaries/us-en"
+               gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/active true
+               gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/optimized false
+               
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/bookmarks/path "/usr/lib/WhiteStork/ws_bookmark.so"
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/name "Bookmarks"
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/path "/usr/share/WhiteStork/dictionaries/bookmarks"
+               gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/active false
+               gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/optimized true
+               chmod -R 0777 /usr/share/WhiteStork/dictionaries
+               
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/xdxf/path "/usr/lib/WhiteStork/engine_xdxf.so"
+               gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/stardict/path "/usr/lib/WhiteStork/engine_stardict.so"
+               
+#              maemo-select-menu-location whitestork.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 "Installing new package MANAGER...\n"
-               @fakeroot dpkg -i ${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_INST} 2>> ${LOG_INST}
-
-gui-deb-i: 
-               @echo -e -n "Installing new package GUI...\n"
-               @fakeroot dpkg -i ${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_INST} 2>> ${LOG_INST}
-
-eng-deb-i: plugins-deb-i
-
-plugins-deb-i: 
-               @echo -e -n "Installing WhiteStork's plugin package...\n"
-               @fakeroot dpkg -i ${PLUGINS_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_INST} 2>> ${LOG_INST}
-
-bookmark-deb-i: 
-               @echo -e -n "Removing old BOOKMARKS ENGINE...\n"
-               @fakeroot dpkg -r whitestorkbookmarks  >/dev/null 2>/dev/null           
-               @echo -e -n "Installing new package whitestorkbookmarks...\n"
-               @fakeroot dpkg -i ${BOOKMARKS_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb  >> ${LOG_INST} 2>> ${LOG_INST}
-               
-
-
-pre-debs: clean
-               @echo -e -n "Making *.deb packages...\nPlease wait...\n"
-               @echo -e -n "" > ${LOG_DEBS}
-
 uninstall:
-               @-fakeroot dpkg --purge whitestorkgui
                @-fakeroot dpkg --purge whitestork
-               @-fakeroot dpkg --purge whitestorkplugins
 #              @-fakeroot dpkg --purge whitestorkdictionary
 
 display: access
@@ -449,34 +324,10 @@ release-package: clean debs meta-package
 
 snapshot: tag-version send-last
 
-meta-package:  
-               @echo -e -n "**-->Making whitestork meta package...\n"
-               @echo -e -n "**-->Making whitestork meta package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               
-               @install -d ${META_DIRS}
-               
-               @cp -rf ${DATA}/package_contents/${META_PACK_NAME} ${PACKAGES}
-               
-               @find  ${META_DOC} -type f -not -name copyright -not -path *.svn* -exec cp {} ${PACKAGES}/${META_PACK_NAME}/usr/share/doc/${META_PACK_NAME}/ \;
-               
-               @gzip -r --best ${PACKAGES}/${META_PACK_NAME}/usr/share/doc/${META_PACK_NAME}
-               @cp ${META_DOC}/copyright ${PACKAGES}/${META_PACK_NAME}/usr/share/doc/${META_PACK_NAME}
-               
-               @-find ${PACKAGES}/${META_PACK_NAME} -name .svn -exec rm -rf {} \;>> ${LOG_DEBS} 2>> ${LOG_DEBS}
-               
-               @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${PACKAGES}/${META_PACK_NAME}/DEBIAN/control > ${PACKAGES}/${META_PACK_NAME}/DEBIAN/control_backup
-               @sed 's/Installed-Size:/Installed-Size: '`du -s ${PACKAGES}/${META_PACK_NAME} | awk {'print $$1'}`'/ ' ${PACKAGES}/${META_PACK_NAME}/DEBIAN/control_backup > ${PACKAGES}/${META_PACK_NAME}/DEBIAN/control
-               
-               @rm ${PACKAGES}/${META_PACK_NAME}/DEBIAN/control_backup
-               
-               @cd ${PACKAGES}/${META_PACK_NAME} && find -path '*DEBIAN*' -prune -o -type f -exec md5sum {} >> DEBIAN/md5sums \;
-               @cd ${PACKAGES}  &&  fakeroot dpkg-deb --build ${META_PACK_NAME} ../${META_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb>> ../${LOG_DEBS}  2>> ../${LOG_DEBS}
-
 repo:  release-package meta-package
 
        @rm -rf ${DEB_REP_DIR}
        @./generate_repo ${DEB_REP_DIR}
        
-test:  
-       @echo ${SQLITE}
-       
+package: clean
+       dpkg-buildpackage -rfakeroot