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/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/ws_tra.png
60 GUI_LOCALE = ${DATA}/locale/out/
61 GUI_DOC = ${DATA}/docs/${GUI_PACK_NAME}/
62 GUI_OTHER = ${DATA}/other/whitestork.desktop
64 MNG_EXECUTABLE = ${BINARIES}/WhiteStorkManager
65 MNG_SERVICEFILE = org.maemo.WhiteStorkManager.service
66 MNG_LIB = ${BINARIES}/ws_bookmark.so
67 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}
68 MNG_DBUS = ${DATA}/other/${MNG_SERVICEFILE}
69 MNG_OTHER = ${DATA}/dictionaries
70 MNG_DICT1 = ${DATA}/dictionaries/elements/dict.cache ${DATA}/dictionaries/elements/dict.xdxf ${DESTDIR}/usr/share/WhiteStork/dictionaries/elements/
71 MNG_DICT2 = ${DATA}/dictionaries/us-en/dict.xdxf ${DESTDIR}/usr/share/WhiteStork/dictionaries/us-en/
72 MNG_DICT_DIRS = ${DESTDIR}/usr/share/WhiteStork/dictionaries/elements/ ${DESTDIR}/usr/share/WhiteStork/dictionaries/us-en/
73 MNG_BOOKMARKS = ${DATA}/bookmarks/${BOOKMARKS}/*
74 MNG_DOC = ${DATA}/docs/${MNG_PACK_NAME}/
76 PLUGINS_LIB = ${BINARIES}/engine_*.so
77 PLUGINS_DIRS = ${DESTDIR}/usr/lib/WhiteStork ${DESTDIR}/usr/share/pixmaps
78 #${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME}
79 PLUGINS_ICONS = ${DATA}/icons/engine_xdxf_icon.png
80 PLUGINS_DOC = ${DATA}/docs/${PLUGINS_PACK_NAME}/
82 META_DIRS = ${PACKAGES}/${META_PACK_NAME}/usr/share/doc/${META_PACK_NAME}
83 META_DOC = ${DATA}/docs/${META_PACK_NAME}/
85 MAIL_ADDRESS = mdictionary-devel@garage.maemo.org
86 LOCALEDIR=/usr/share/locale
87 GETTEXT_PACKAGE=whitestork
91 ifeq (${MAKECMDGOALS}, release-package)
92 APP_VER = ${RELEASE_MAJOR_VER}.${RELEASE_MINOR_VER}.${RELEASE_PATCH_VER}
94 APP_VER = ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'`
97 FILES = ${DATA}/files_debbuild
99 LOG_CLEAN = ${LOG_DIR}/clean.log
100 LOG_BUILD = ${LOG_DIR}/build.log
101 LOG_RUN = ${LOG_DIR}/run.log
102 LOG_DEBS = ${LOG_DIR}/debs.log
103 LOG_INST = ${LOG_DIR}/install.log
109 @install -d ${REP_TAG}/${APP_NAME}-${APP_VER}
110 @tar -czf ${REP_TAG}/${APP_NAME}-${APP_VER}/${APP_NAME}-${APP_VER}.tar.gz ../trunk/* --exclude .svn
111 @svn add ${REP_TAG}/${APP_NAME}-${APP_VER}
112 @svn ci ${REP_TAG}/${APP_NAME}-${APP_VER} -m "Tagged new version: ${APP_NAME}-${APP_VER}"
115 @tar -czf ${APP_NAME}-${APP_VER}.tar.gz *_${APP_VER}-${PACK_VER}_${ARCH}.deb
116 @echo -e -n "#!/bin/bash\n\
117 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\
118 rm -f ~/${APP_NAME}-${APP_VER}.tar.gz\n" > mail.script
120 @chmod +x mail.script
123 This message was generated automatically , please do not reply.\n\
124 Attachment: ${APP_NAME}-${APP_VER}.tar.gz - tarball with the newest Whitestork's packages.\n\
125 Attachment: build.log - logs from building binaries.\n\
126 Attachment: debs.log - logs from making *.deb packages.\n\n\
127 Automatic Building Framework ver: ${FRM_VER}\nCopyright 2006 ComArch S.A.\n" > mail.content
128 @scp ${APP_NAME}-${APP_VER}.tar.gz krzsas@localhost:~/
129 @scp ${LOG_BUILD} krzsas@localhost:~/
130 @scp ${LOG_DEBS} krzsas@localhost:~/
131 @scp mail.script krzsas@localhost:~/
132 @scp mail.content krzsas@localhost:~/
135 @ssh krzsas@localhost ./mail.script
138 @echo -e -n "Generating locale...\n"
139 @echo -e -n "Generating locale...\n" > ${LOG_BUILD}
141 @./generate_locale ${DATA}/locale/ ${GUI_LOCALE}
142 @echo -e -n "Locale generation successfully completed...\n"
143 @echo -e -n "Locale generation successfully completed...\n" > ${LOG_BUILD}
145 build: pre-build ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager ${BINARIES}/ws_bookmark.so plugins
146 @echo -e -n "\nBuilding WhiteStork is finished.\n"
149 @echo -e -n "Building WhiteStork... \n"
150 @echo -e -n "" > ${LOG_BUILD}
152 plugins: ${BINARIES}/engine_xdxf.so ${BINARIES}/engine_stardict.so
155 ${BINARIES}/WhiteStorkManager:
157 @echo -e -n "**--> Compiling Manager...\n"
158 @echo -e -n "**--> Compiling Manager...\n" >> ${LOG_BUILD}
159 @make SQLITE=${SQLITE} -C ${MANAGER} >> ${LOG_BUILD}
161 ${BINARIES}/ws_dbus.o:
162 @echo -e -n "**--> Compiling D-BUS Wrapper... \n"
163 @echo -e -n "**--> Compiling D-BUS Wrapper... \n" >> ${LOG_BUILD}
164 # @cd ${DBUS} && make >> ../../${LOG_BUILD}
165 @make -C ${DBUS} >> ${LOG_BUILD}
167 ${BINARIES}/WhiteStork:
169 @echo -e -n "**--> Compiling User Interface...\n"
170 @echo -e -n "**--> Compiling User Interface...\n" >> ${LOG_BUILD}
171 # @cd ${GUI} && make APP_VER=${APP_VER} >> ../../${LOG_BUILD}
172 @make APP_VER=${APP_VER} -C ${GUI} >> ${LOG_BUILD}
174 ${BINARIES}/engine_xdxf.so:
176 @echo -e -n "**--> Compiling XDXF Engine...\n"
177 @echo -e -n "**--> Compiling XDXF Engine...\n" >> ${LOG_BUILD}
178 # @cd ${XDXF_PLUGIN} && make >> ../../../${LOG_BUILD}
179 @make -C ${XDXF_PLUGIN} >> ${LOG_BUILD}
181 ${BINARIES}/engine_stardict.so:
183 @echo -e -n "**--> Compiling StarDict Engine...\n"
184 @echo -e -n "**--> Compiling StarDict Engine...\n" >> ${LOG_BUILD}
185 # @cd ${STARDICT_PLUGIN} && make >> ../../../${LOG_BUILD}
186 @make -C ${STARDICT_PLUGIN} >> ${LOG_BUILD}
188 ${BINARIES}/ws_bookmark.so:
190 @echo -e -n "**--> Compiling Bookmarks...\n"
191 @echo -e -n "**--> Compiling Bookmarks...\n" >> ${LOG_BUILD}
192 @make -C ${BOOKMARKS_DIR} >> ${LOG_BUILD}
195 @echo -e -n "Cleaning all logs\n"
196 @rm -f ${LOG_DIR}/*.log
199 @-echo -e -n "Cleaning project directories\n"
200 @echo -e -n "" > ${LOG_CLEAN}
201 @-rm -f ${BINARIES}/* >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
202 @-rm -f *~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
203 @-rm -f *.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
204 @-rm -rf ${PACKAGES}/*
205 @-make -C ${GUI} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
206 @-make -C ${DBUS} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
207 @-make -C ${XDXF_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
208 @-make -C ${STARDICT_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
209 @-cd ${MANAGER} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
210 @-make -C ${MANAGER} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
211 @find src/bookmarks/ -mindepth 1 -maxdepth 1 -type d -not -name .svn -exec make -C {} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} \;
212 @-rm -rf ${GUI_LOCALE}*
214 # @-cd ${GUI} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
215 # @-cd ${DBUS} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
216 # @-cd ${XDXF_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
217 # @-cd ${STARDICT_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
218 # @-cd ${BOOKMARKS_DIR} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
220 run: clean install entries run-dict clean-temp
224 @run-standalone.sh WhiteStorkManager
227 @-fakeroot rm -rf /usr/share/WhiteStork
228 @-fakeroot rm -rf /usr/lib/WhiteStork
229 @-fakeroot rm -rf /usr/include/WhiteStork
230 @-fakeroot rm -f /etc/others-menu/extra_applications/0112_whitestorkgui.desktop
231 @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop
232 @-fakeroot rm -f /usr/share/pixmaps/whitestork.png
233 @-fakeroot rm -f /usr/share/pixmaps/whitestork_icon.png
234 @-fakeroot rm -f /usr/bin/WhiteStork
235 @-fakeroot rm -f /usr/bin/WhiteStorkManager
236 @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop
237 @-fakeroot rm -f /usr/lib/WhiteStork/engine_xdxf.so
238 @-fakeroot rm -f /usr/lib/WhiteStork/engine_stardict.so
240 gconftool-2 --recursive-unset /apps/maemo/WhiteStork
242 install-manager: localization ${BINARIES}/ws_dbus.o ${BINARIES}/ws_bookmark.so ${BINARIES}/WhiteStorkManager
243 @install -d ${MNG_DIRS}
244 @cp ${MNG_EXECUTABLE} ${DESTDIR}/usr/bin
245 @cp ${MNG_LIB} ${DESTDIR}/usr/lib/WhiteStork
246 @cp ${MNG_DBUS} ${DESTDIR}/usr/share/dbus-1/services
247 @find ${MNG_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${MNG_PACK_NAME} \;
249 # @install -d ${MNG_DICT_DIRS}
253 @install -d ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
254 @cp -rf ${MNG_BOOKMARKS} ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
256 install-gui: ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork
257 @install -d ${GUI_DIRS}
258 @cp ${GUI_EXECUTABLE} ${DESTDIR}/usr/bin
259 @cp ${GUI_ICONS} ${DESTDIR}/usr/share/pixmaps
260 @cp ${GUI_DBUS} ${DESTDIR}/usr/share/dbus-1/services
261 @cp ${GUI_OTHER} ${DESTDIR}/usr/share/applications/hildon
262 @cp -a ${GUI_LOCALE}* ${DESTDIR}/usr/share/locale/
263 # @find ${GUI_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${GUI_PACK_NAME} \;
265 install-plugins: plugins
266 @install -d ${PLUGINS_DIRS}
267 @cp ${PLUGINS_LIB} ${DESTDIR}/usr/lib/WhiteStork
268 @cp ${PLUGINS_ICONS} ${DESTDIR}/usr/share/pixmaps
269 @install -d ${MNG_DICT_DIRS}
272 # @find ${PLUGINS_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME} \;
274 install: install-manager install-gui install-plugins
275 @echo -e "\n\nIf you are installing whitestork, please run 'make entries', before running the application ( not as root )\n\n"
278 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/name "Elements Database"
279 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/path "/usr/share/WhiteStork/dictionaries/elements"
280 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/active true
281 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/optimized true
282 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/name "American - English Dictionary"
283 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/path "/usr/share/WhiteStork/dictionaries/us-en"
284 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/active true
285 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/optimized false
287 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/bookmarks/path "/usr/lib/WhiteStork/ws_bookmark.so"
288 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/name "Bookmarks"
289 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/path "/usr/share/WhiteStork/dictionaries/bookmarks"
290 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/active false
291 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/optimized true
292 chmod -R 0777 /usr/share/WhiteStork/dictionaries
294 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/xdxf/path "/usr/lib/WhiteStork/engine_xdxf.so"
295 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/stardict/path "/usr/lib/WhiteStork/engine_stardict.so"
297 # maemo-select-menu-location whitestork.desktop
300 install_deb: clean-inst-log uninstall eng-deb-i mng-deb-i gui-deb-i
301 @echo -e -n "All packages have been installed/reinstalled.\n"
304 @echo -n "" > ${LOG_INST}
307 @-fakeroot dpkg --purge whitestork
308 # @-fakeroot dpkg --purge whitestorkdictionary
311 @fakeroot su ${USER} -c 'af-sb-init.sh start'
314 @fakeroot su ${USER} -c 'af-sb-init.sh stop'
317 @fakeroot su ${USER} -c 'af-sb-init.sh restart'
320 @fakeroot chmod 0777 /var/run
322 release-package: clean debs meta-package
323 @echo "Release package generation successfully completed"
325 snapshot: tag-version send-last
327 repo: release-package meta-package
329 @rm -rf ${DEB_REP_DIR}
330 @./generate_repo ${DEB_REP_DIR}
333 dpkg-buildpackage -rfakeroot