X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=Makefile;h=917228543dd0dd399acfebbbf9ef51958edbc604;hb=98f6838898bd81b3f3e1fe029d9c4e6d56a7836c;hp=405a0b6a677c2baa2a4da91d09654da2be62fc7b;hpb=35c267a832ec1f7380497e4818646902b7dcfcfd;p=mdictionary diff --git a/Makefile b/Makefile index 405a0b6..9172285 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ ARCH = `arch` REP_TAG = ../tags REP_BRANCH = branches +DEB_REP_DIR = www #declaration of directory names BINARIES = bin @@ -14,64 +15,88 @@ STARDICT_PLUGIN = ${PLUGINS}/stardict GUI = ${SOURCE}/gui MANAGER = ${SOURCE}/manager DBUS = ${SOURCE}/dbus_wrapper -BOOKMARKS = ${SOURCE}/bookmarks +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 = whitestork +APP_NAME = mDictionary #versions -MAJOR_VER = 0 -MINOR_VER = 6 -RELEASE_MAJOR_VER = 0 -RELEASE_MINOR_VER = 6 +MAJOR_VER = 1 +MINOR_VER = 0 +PATCH_VER = 0 +RELEASE_MAJOR_VER = 1 +RELEASE_MINOR_VER = 0 RELEASE_PATCH_VER = 0 -# APP_VER = ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'` -PACK_VER = 1 +PACK_VER = 0 FRM_VER = 0.1 -VERSION_FILE = ./${INCLUDE}/ws_version.h +# VERSION_FILE = ./${INCLUDE}/ws_version.h #package structure -GUI_PACK_NAME = whitestorkgui -MNG_PACK_NAME = whitestork -PLUGINS_PACK_NAME = whitestorkplugins -BOOKMARKS_PACK_NAME = whitestorkbookmarks -META_PACK = 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_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/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_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/whitestork.desktop +GUI_OTHER = ${DATA}/other/mdictionary.desktop +GUI_MIS = ${DATA}/mis/mdictionary-search.xml -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_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_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 = ${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/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=whitestork +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}.`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}'` + 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 @@ -85,12 +110,7 @@ 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 +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} @@ -99,14 +119,14 @@ tag-version: clean 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}\" ${MAIL_ADDRESS} <~/mail.content\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 Whitestork's 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" > mail.content @@ -120,51 +140,61 @@ send-last: debs @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} - @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 - -build: pre-build ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager ${BINARIES}/ws_bookmark.so plugins - @echo -e -n "\nBuilding WhiteStork is finished.\n" +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" +pre-build: + @echo -e -n "Building mdictionary... \n" @echo -e -n "" > ${LOG_BUILD} - -plugins: ${BINARIES}/engine_xdxf.so ${BINARIES}/engine_stardict.so + +plugins: ${BINARIES}/engine_xdxf.so ${BINARIES}/engine_stardict.so -${BINARIES}/WhiteStorkManager: update-version +${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: update-version +${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} +# @cd ${GUI} && make APP_VER=${APP_VER} >> ../../${LOG_BUILD} + @make APP_VER=${APP_VER} -C ${GUI} >> ${LOG_BUILD} -${BINARIES}/engine_xdxf.so: update-version +${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} +# @cd ${XDXF_PLUGIN} && make >> ../../../${LOG_BUILD} + @make -C ${XDXF_PLUGIN} >> ${LOG_BUILD} -${BINARIES}/engine_stardict.so: update-version +${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} +# @cd ${STARDICT_PLUGIN} && make >> ../../../${LOG_BUILD} + @make -C ${STARDICT_PLUGIN} >> ${LOG_BUILD} -${BINARIES}/ws_bookmark.so: update-version +${BINARIES}/engine_bookmarks.so: +# update-version @echo -e -n "**--> Compiling Bookmarks...\n" @echo -e -n "**--> Compiling Bookmarks...\n" >> ${LOG_BUILD} - @cd ${BOOKMARKS} && make >> ../../${LOG_BUILD} + @make -C ${BOOKMARKS_DIR} >> ${LOG_BUILD} clean-logs: @echo -e -n "Cleaning all logs\n" @@ -177,220 +207,113 @@ clean: clean-logs @-rm -f *~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} @-rm -f *.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} @-rm -rf ${PACKAGES}/* - @-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} + @-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} - @-cd ${BOOKMARKS} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN} - @-cd ${STARDICT_PLUGIN} && 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: 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 + @run-standalone.sh mdictionaryManager clean-temp: - @-fakeroot rm -rf /usr/share/WhiteStork - @-fakeroot rm -rf /usr/lib/WhiteStork - @-fakeroot rm -rf /usr/include/WhiteStork - @-fakeroot rm -f /etc/others-menu/extra_applications/0112_whitestorkgui.desktop - @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop - @-fakeroot rm -f /usr/share/pixmaps/whitestork.png - @-fakeroot rm -f /usr/share/pixmaps/whitestork_icon.png - @-fakeroot rm -f /usr/bin/WhiteStork - @-fakeroot rm -f /usr/bin/WhiteStorkManager - @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop - @-fakeroot rm -f /usr/lib/WhiteStork/engine_xdxf.so - @-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 - @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} + @-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} ${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 + @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} \; - @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} +# @install -d ${MNG_DICT_DIRS} +# @cp ${MNG_DICT1} +# @cp ${MNG_DICT2} - @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 - @-find ${PACKAGES}/${MNG_PACK_NAME} -name .svn -exec rm -rf {} \;>> ${LOG_DEBS} 2>> ${LOG_DEBS} - - @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 + @install -d ${DESTDIR}/usr/share/mdictionary/dictionaries/bookmarks + @cp -rf ${MNG_BOOKMARKS} ${DESTDIR}/usr/share/mdictionary/dictionaries/bookmarks - @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} - - @cp -rf ${DATA}/package_contents/${GUI_PACK_NAME} ${PACKAGES} +install-gui: ${BINARIES}/ws_dbus.o ${GUI_EXECUTABLE} @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 -r ${GUI_LOCALE} ${PACKAGES}/${GUI_PACK_NAME}/usr/share/locale - @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} - - @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} + @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} ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/lib/WhiteStork - @cp ${PLUGINS_ICONS} ${PACKAGES}/${PLUGINS_PACK_NAME}/usr/share/pixmaps + @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 - @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} + 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 - @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 + 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" - @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} +# maemo-select-menu-location mdictionary.desktop - -eng-deb: plugins-deb -debs-i: install - - -install: clean-inst-log uninstall eng-deb-i mng-deb-i gui-deb-i +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 ...\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 mdictionary +# @-fakeroot dpkg --purge mdictionarydictionary display: access @fakeroot su ${USER} -c 'af-sb-init.sh start' @@ -409,40 +332,16 @@ release-package: clean debs meta-package snapshot: tag-version send-last -meta-package-pack-dirs: - @echo -e -n "Creating and cleaning directories necessary for whitestorkdictionary meta-package..." >/dev/null 2>/dev/null - @-rm -rf ${PACKAGES}/* >/dev/null 2>/dev/null - - @install -d ${PACKAGES}/debian/DEBIAN >/dev/null 2>/dev/null - @install -d ${PACKAGES}/debian/etc/others-menu/extra_applications >/dev/null 2>/dev/null - @install -d ${PACKAGES}/debian/usr/share/applications/hildon >/dev/null 2>/dev/null - @install -d ${PACKAGES}/debian/usr/share/doc/whitestorkdictionary >/dev/null 2>/dev/null - @install -d ${PACKAGES}/debian/bin >/dev/null 2>/dev/null - @install -d ${PACKAGES}/debian/usr/share/dbus-1/services >/dev/null 2>/dev/null - - @find ${PACKAGES}/debian -type d -exec chmod 0755 {} \; - -meta-package: meta-package-pack-dirs - - @echo -e -n "**-->Making WhiteStork meta-package...\n" - - @find ${FILES} -type f -maxdepth 1 -name "metc_*[^~]" -exec ${DATA}/copy_clean.sh {} "${PACKAGES}/debian/DEBIAN" \; - - @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${PACKAGES}/debian/DEBIAN/control > ${PACKAGES}/debian/DEBIAN/control_backup - - @mv ${PACKAGES}/debian/DEBIAN/control_backup ${PACKAGES}/debian/DEBIAN/control - - @find ${FILES} -type f -maxdepth 1 -name "metC_*[^~]" -exec ${DATA}/copy_clean.sh {} "${PACKAGES}/debian/usr/share/doc/whitestorkdictionary" \; - @gzip --best "${PACKAGES}/debian/usr/share/doc/${META_PACK}/changelog" - @gzip --best "${PACKAGES}/debian/usr/share/doc/${META_PACK}/changelog.Debian" - - @touch ${PACKAGES}/debian/DEBIAN/md5sums - @chmod g-w ${PACKAGES}/debian/DEBIAN/md5sums - @find "${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${DATA}/add_sums.sh {} "${PACKAGES}/debian" \; - - @cd ${PACKAGES} && fakeroot dpkg-deb --build ../${META_PACK}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ../${LOG_DEBS} 2>> ../${LOG_DEBS} - repo: release-package meta-package - @rm -rf repo - @./generate_repo + @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