7 #declaration of directory names
12 PLUGINS = ${SOURCE}/plugins
13 XDXF_PLUGIN = ${PLUGINS}/xdxf
14 STARDICT_PLUGIN = ${PLUGINS}/stardict
16 MANAGER = ${SOURCE}/manager
17 DBUS = ${SOURCE}/dbus_wrapper
19 BOOKMARKS_DIR = ${SOURCE}/bookmarks/${BOOKMARKS}
22 ifeq (${BOOKMARKS}, sql)
26 ifeq (${BOOKMARKS}, sql3)
45 # VERSION_FILE = ./${INCLUDE}/ws_version.h
48 GUI_PACK_NAME = whitestorkgui
49 MNG_PACK_NAME = whitestork
50 PLUGINS_PACK_NAME = whitestorkplugins
51 BOOKMARKS_PACK_NAME = whitestorkbookmarks
52 META_PACK_NAME = whitestorkdictionary
54 GUI_EXECUTABLE = ${BINARIES}/WhiteStork
55 GUI_SERVICEFILE = org.maemo.WhiteStorkGui.service
56 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
57 #${DESTDIR}/usr/share/doc/whitestorkgui
58 GUI_DBUS = ${DATA}/other/${GUI_SERVICEFILE}
59 GUI_ICONS = ${DATA}/icons/whitestork_icon.png ${DATA}/icons/whitestork.png ${DATA}/icons/ws_top.png ${DATA}/icons/qgn_indi_search_whitestork.png ${DATA}/icons/ws_tra.png
60 GUI_LOCALE = ${DATA}/locale/out/
61 GUI_DOC = ${DATA}/docs/${GUI_PACK_NAME}/
62 GUI_OTHER = ${DATA}/other/whitestork.desktop
63 GUI_MIS = ${DATA}/mis/whitestork-search.xml
65 MNG_EXECUTABLE = ${BINARIES}/WhiteStorkManager
66 MNG_SERVICEFILE = org.maemo.WhiteStorkManager.service
67 MNG_LIB = ${BINARIES}/ws_bookmark.so
68 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}
69 MNG_DBUS = ${DATA}/other/${MNG_SERVICEFILE}
70 MNG_OTHER = ${DATA}/dictionaries
71 MNG_DICT1 = ${DATA}/dictionaries/elements/dict.cache ${DATA}/dictionaries/elements/dict.xdxf ${DESTDIR}/usr/share/WhiteStork/dictionaries/elements/
72 MNG_DICT2 = ${DATA}/dictionaries/us-en/dict.xdxf ${DESTDIR}/usr/share/WhiteStork/dictionaries/us-en/
73 MNG_DICT_DIRS = ${DESTDIR}/usr/share/WhiteStork/dictionaries/elements/ ${DESTDIR}/usr/share/WhiteStork/dictionaries/us-en/
74 MNG_BOOKMARKS = ${DATA}/bookmarks/${BOOKMARKS}/*
75 MNG_DOC = ${DATA}/docs/${MNG_PACK_NAME}/
77 PLUGINS_LIB = ${BINARIES}/engine_*.so
78 PLUGINS_DIRS = ${DESTDIR}/usr/lib/WhiteStork ${DESTDIR}/usr/share/pixmaps
79 #${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME}
80 PLUGINS_ICONS = ${DATA}/icons/engine_xdxf_icon.png
81 PLUGINS_DOC = ${DATA}/docs/${PLUGINS_PACK_NAME}/
83 META_DIRS = ${PACKAGES}/${META_PACK_NAME}/usr/share/doc/${META_PACK_NAME}
84 META_DOC = ${DATA}/docs/${META_PACK_NAME}/
86 MAIL_ADDRESS = mdictionary-devel@garage.maemo.org
87 LOCALEDIR=/usr/share/locale
88 GETTEXT_PACKAGE=whitestork
92 ifeq (${MAKECMDGOALS}, release-package)
93 APP_VER = ${RELEASE_MAJOR_VER}.${RELEASE_MINOR_VER}.${RELEASE_PATCH_VER}
95 APP_VER = ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'`
98 FILES = ${DATA}/files_debbuild
100 LOG_CLEAN = ${LOG_DIR}/clean.log
101 LOG_BUILD = ${LOG_DIR}/build.log
102 LOG_RUN = ${LOG_DIR}/run.log
103 LOG_DEBS = ${LOG_DIR}/debs.log
104 LOG_INST = ${LOG_DIR}/install.log
110 @install -d ${REP_TAG}/${APP_NAME}-${APP_VER}
111 @tar -czf ${REP_TAG}/${APP_NAME}-${APP_VER}/${APP_NAME}-${APP_VER}.tar.gz ../trunk/* --exclude .svn
112 @svn add ${REP_TAG}/${APP_NAME}-${APP_VER}
113 @svn ci ${REP_TAG}/${APP_NAME}-${APP_VER} -m "Tagged new version: ${APP_NAME}-${APP_VER}"
116 @tar -czf ${APP_NAME}-${APP_VER}.tar.gz *_${APP_VER}-${PACK_VER}_${ARCH}.deb
117 @echo -e -n "#!/bin/bash\n\
118 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\
119 rm -f ~/${APP_NAME}-${APP_VER}.tar.gz\n" > mail.script
121 @chmod +x mail.script
124 This message was generated automatically , please do not reply.\n\
125 Attachment: ${APP_NAME}-${APP_VER}.tar.gz - tarball with the newest Whitestork's packages.\n\
126 Attachment: build.log - logs from building binaries.\n\
127 Attachment: debs.log - logs from making *.deb packages.\n\n\
128 Automatic Building Framework ver: ${FRM_VER}\nCopyright 2006 ComArch S.A.\n" > mail.content
129 @scp ${APP_NAME}-${APP_VER}.tar.gz krzsas@localhost:~/
130 @scp ${LOG_BUILD} krzsas@localhost:~/
131 @scp ${LOG_DEBS} krzsas@localhost:~/
132 @scp mail.script krzsas@localhost:~/
133 @scp mail.content krzsas@localhost:~/
136 @ssh krzsas@localhost ./mail.script
139 @echo -e -n "Generating locale...\n"
140 @echo -e -n "Generating locale...\n" > ${LOG_BUILD}
142 @./generate_locale ${DATA}/locale/ ${GUI_LOCALE}
143 @echo -e -n "Locale generation successfully completed...\n"
144 @echo -e -n "Locale generation successfully completed...\n" > ${LOG_BUILD}
146 build: pre-build ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager ${BINARIES}/ws_bookmark.so plugins
147 @echo -e -n "\nBuilding WhiteStork is finished.\n"
150 @echo -e -n "Building WhiteStork... \n"
151 @echo -e -n "" > ${LOG_BUILD}
153 plugins: ${BINARIES}/engine_xdxf.so ${BINARIES}/engine_stardict.so
156 ${BINARIES}/WhiteStorkManager:
158 @echo -e -n "**--> Compiling Manager...\n"
159 @echo -e -n "**--> Compiling Manager...\n" >> ${LOG_BUILD}
160 @make SQLITE=${SQLITE} -C ${MANAGER} >> ${LOG_BUILD}
162 ${BINARIES}/ws_dbus.o:
163 @echo -e -n "**--> Compiling D-BUS Wrapper... \n"
164 @echo -e -n "**--> Compiling D-BUS Wrapper... \n" >> ${LOG_BUILD}
165 # @cd ${DBUS} && make >> ../../${LOG_BUILD}
166 @make -C ${DBUS} >> ${LOG_BUILD}
168 ${BINARIES}/WhiteStork:
170 @echo -e -n "**--> Compiling User Interface...\n"
171 @echo -e -n "**--> Compiling User Interface...\n" >> ${LOG_BUILD}
172 # @cd ${GUI} && make APP_VER=${APP_VER} >> ../../${LOG_BUILD}
173 @make APP_VER=${APP_VER} -C ${GUI} >> ${LOG_BUILD}
175 ${BINARIES}/engine_xdxf.so:
177 @echo -e -n "**--> Compiling XDXF Engine...\n"
178 @echo -e -n "**--> Compiling XDXF Engine...\n" >> ${LOG_BUILD}
179 # @cd ${XDXF_PLUGIN} && make >> ../../../${LOG_BUILD}
180 @make -C ${XDXF_PLUGIN} >> ${LOG_BUILD}
182 ${BINARIES}/engine_stardict.so:
184 @echo -e -n "**--> Compiling StarDict Engine...\n"
185 @echo -e -n "**--> Compiling StarDict Engine...\n" >> ${LOG_BUILD}
186 # @cd ${STARDICT_PLUGIN} && make >> ../../../${LOG_BUILD}
187 @make -C ${STARDICT_PLUGIN} >> ${LOG_BUILD}
189 ${BINARIES}/ws_bookmark.so:
191 @echo -e -n "**--> Compiling Bookmarks...\n"
192 @echo -e -n "**--> Compiling Bookmarks...\n" >> ${LOG_BUILD}
193 @make -C ${BOOKMARKS_DIR} >> ${LOG_BUILD}
196 @echo -e -n "Cleaning all logs\n"
197 @rm -f ${LOG_DIR}/*.log
200 @-echo -e -n "Cleaning project directories\n"
201 @echo -e -n "" > ${LOG_CLEAN}
202 @-rm -f ${BINARIES}/* >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
203 @-rm -f *~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
204 @-rm -f *.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
205 @-rm -rf ${PACKAGES}/*
206 @-make -C ${GUI} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
207 @-make -C ${DBUS} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
208 @-make -C ${XDXF_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
209 @-make -C ${STARDICT_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
210 @-cd ${MANAGER} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
211 @-make -C ${MANAGER} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
212 @find src/bookmarks/ -mindepth 1 -maxdepth 1 -type d -not -name .svn -exec make -C {} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} \;
213 @-rm -rf ${GUI_LOCALE}*
215 # @-cd ${GUI} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
216 # @-cd ${DBUS} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
217 # @-cd ${XDXF_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
218 # @-cd ${STARDICT_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
219 # @-cd ${BOOKMARKS_DIR} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
221 run: clean install entries run-dict clean-temp
225 @run-standalone.sh WhiteStorkManager
228 @-fakeroot rm -rf /usr/share/WhiteStork
229 @-fakeroot rm -rf /usr/lib/WhiteStork
230 @-fakeroot rm -rf /usr/include/WhiteStork
231 @-fakeroot rm -f /etc/others-menu/extra_applications/0112_whitestorkgui.desktop
232 @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop
233 @-fakeroot rm -f /usr/share/pixmaps/whitestork.png
234 @-fakeroot rm -f /usr/share/pixmaps/whitestork_icon.png
235 @-fakeroot rm -f /usr/bin/WhiteStork
236 @-fakeroot rm -f /usr/bin/WhiteStorkManager
237 @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop
238 @-fakeroot rm -f /usr/lib/WhiteStork/engine_xdxf.so
239 @-fakeroot rm -f /usr/lib/WhiteStork/engine_stardict.so
241 gconftool-2 --recursive-unset /apps/maemo/WhiteStork
243 install-manager: localization ${BINARIES}/ws_dbus.o ${BINARIES}/ws_bookmark.so ${BINARIES}/WhiteStorkManager
244 @install -d ${MNG_DIRS}
245 @cp ${MNG_EXECUTABLE} ${DESTDIR}/usr/bin
246 @cp ${MNG_LIB} ${DESTDIR}/usr/lib/WhiteStork
247 @cp ${MNG_DBUS} ${DESTDIR}/usr/share/dbus-1/services
248 @find ${MNG_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${MNG_PACK_NAME} \;
250 # @install -d ${MNG_DICT_DIRS}
254 @install -d ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
255 @cp -rf ${MNG_BOOKMARKS} ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
257 install-gui: ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork
258 @install -d ${GUI_DIRS}
259 @cp ${GUI_EXECUTABLE} ${DESTDIR}/usr/bin
260 @cp ${GUI_ICONS} ${DESTDIR}/usr/share/pixmaps
261 @cp ${GUI_DBUS} ${DESTDIR}/usr/share/dbus-1/services
262 @cp ${GUI_OTHER} ${DESTDIR}/usr/share/applications/hildon
263 @cp ${GUI_MIS} ${DESTDIR}/usr/share/mis
264 @cp -a ${GUI_LOCALE}* ${DESTDIR}/usr/share/locale/
265 # @find ${GUI_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${GUI_PACK_NAME} \;
267 install-plugins: plugins
268 @install -d ${PLUGINS_DIRS}
269 @cp ${PLUGINS_LIB} ${DESTDIR}/usr/lib/WhiteStork
270 @cp ${PLUGINS_ICONS} ${DESTDIR}/usr/share/pixmaps
271 @install -d ${MNG_DICT_DIRS}
274 # @find ${PLUGINS_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME} \;
276 install: install-manager install-gui install-plugins
277 @echo -e "\n\nIf you are installing whitestork, please run 'make entries', before running the application ( not as root )\n\n"
280 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/name "Elements Database"
281 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/path "/usr/share/WhiteStork/dictionaries/elements"
282 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/active true
283 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/optimized true
284 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/name "American - English Dictionary"
285 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/path "/usr/share/WhiteStork/dictionaries/us-en"
286 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/active true
287 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/optimized false
289 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/bookmarks/path "/usr/lib/WhiteStork/ws_bookmark.so"
290 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/name "Bookmarks"
291 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/path "/usr/share/WhiteStork/dictionaries/bookmarks"
292 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/active false
293 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/optimized true
294 chmod -R 0777 /usr/share/WhiteStork/dictionaries
296 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/xdxf/path "/usr/lib/WhiteStork/engine_xdxf.so"
297 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/stardict/path "/usr/lib/WhiteStork/engine_stardict.so"
299 # maemo-select-menu-location whitestork.desktop
302 install_deb: clean-inst-log uninstall eng-deb-i mng-deb-i gui-deb-i
303 @echo -e -n "All packages have been installed/reinstalled.\n"
306 @echo -n "" > ${LOG_INST}
309 @-fakeroot dpkg --purge whitestork
310 # @-fakeroot dpkg --purge whitestorkdictionary
313 @fakeroot su ${USER} -c 'af-sb-init.sh start'
316 @fakeroot su ${USER} -c 'af-sb-init.sh stop'
319 @fakeroot su ${USER} -c 'af-sb-init.sh restart'
322 @fakeroot chmod 0777 /var/run
324 release-package: clean debs meta-package
325 @echo "Release package generation successfully completed"
327 snapshot: tag-version send-last
329 repo: release-package meta-package
331 @rm -rf ${DEB_REP_DIR}
332 @./generate_repo ${DEB_REP_DIR}
335 dpkg-buildpackage -rfakeroot