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)
46 # VERSION_FILE = ./${INCLUDE}/ws_version.h
49 GUI_PACK_NAME = whitestorkgui
50 MNG_PACK_NAME = whitestork
51 PLUGINS_PACK_NAME = whitestorkplugins
52 BOOKMARKS_PACK_NAME = whitestorkbookmarks
53 META_PACK_NAME = whitestorkdictionary
55 GUI_EXECUTABLE = ${BINARIES}/WhiteStork
56 GUI_SERVICEFILE = org.maemo.WhiteStorkGui.service
57 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
58 #${DESTDIR}/usr/share/doc/whitestorkgui
59 GUI_DBUS = ${DATA}/other/${GUI_SERVICEFILE}
60 GUI_ICONS = ${DATA}/icons/whitestork_icon.png ${DATA}/icons/whitestork.png ${DATA}/icons/ws_top.png ${DATA}/icons/ws_warning_icon.png ${DATA}/icons/qgn_indi_search_whitestork.png ${DATA}/icons/ws_tra.png
61 GUI_LOCALE = ${DATA}/locale/out/
62 GUI_DOC = ${DATA}/docs/${GUI_PACK_NAME}/
63 GUI_OTHER = ${DATA}/other/whitestork.desktop
64 GUI_MIS = ${DATA}/mis/whitestork-search.xml
66 MNG_EXECUTABLE = ${BINARIES}/WhiteStorkManager
67 MNG_SERVICEFILE = org.maemo.WhiteStorkManager.service
68 MNG_LIB = ${BINARIES}/ws_bookmark.so
69 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}
70 MNG_DBUS = ${DATA}/other/${MNG_SERVICEFILE}
71 MNG_OTHER = ${DATA}/dictionaries
72 MNG_DICT1 = ${DATA}/dictionaries/StarDictSampleDict/sample.dict.dz ${DATA}/dictionaries/StarDictSampleDict/sample.idx ${DATA}/dictionaries/StarDictSampleDict/sample.ifo ${DESTDIR}/usr/share/WhiteStork/dictionaries/StarDictSampleDict/
73 MNG_DICT2 = ${DATA}/dictionaries/XDXFSampleDict/dict.xdxf ${DESTDIR}/usr/share/WhiteStork/dictionaries/XDXFSampleDict/
74 MNG_DICT_DIRS = ${DESTDIR}/usr/share/WhiteStork/dictionaries/StarDictSampleDict/ ${DESTDIR}/usr/share/WhiteStork/dictionaries/XDXFSampleDict/
75 MNG_BOOKMARKS = ${DATA}/bookmarks/${BOOKMARKS}/*
76 MNG_DOC = ${DATA}/docs/${MNG_PACK_NAME}/
78 PLUGINS_LIB = ${BINARIES}/engine_*.so
79 PLUGINS_DIRS = ${DESTDIR}/usr/lib/WhiteStork ${DESTDIR}/usr/share/pixmaps
80 #${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME}
81 PLUGINS_ICONS = ${DATA}/icons/engine_xdxf_icon.png
82 PLUGINS_DOC = ${DATA}/docs/${PLUGINS_PACK_NAME}/
84 META_DIRS = ${PACKAGES}/${META_PACK_NAME}/usr/share/doc/${META_PACK_NAME}
85 META_DOC = ${DATA}/docs/${META_PACK_NAME}/
87 MAIL_ADDRESS = mdictionary-devel@garage.maemo.org
88 LOCALEDIR=/usr/share/locale
89 GETTEXT_PACKAGE=whitestork
91 #APP_VER = ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'`
93 ifeq (${MAKECMDGOALS}, release-package)
94 APP_VER = ${RELEASE_MAJOR_VER}.${RELEASE_MINOR_VER}.${RELEASE_PATCH_VER}
96 APP_VER = ${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}-build`svn log -r HEAD -q | grep -v -e -- | awk '{print $$1}' | tr -d r`
99 FILES = ${DATA}/files_debbuild
101 LOG_CLEAN = ${LOG_DIR}/clean.log
102 LOG_BUILD = ${LOG_DIR}/build.log
103 LOG_RUN = ${LOG_DIR}/run.log
104 LOG_DEBS = ${LOG_DIR}/debs.log
105 LOG_INST = ${LOG_DIR}/install.log
111 @install -d ${REP_TAG}/${APP_NAME}-${APP_VER}
112 @tar -czf ${REP_TAG}/${APP_NAME}-${APP_VER}/${APP_NAME}-${APP_VER}.tar.gz ../trunk/* --exclude .svn
113 @svn add ${REP_TAG}/${APP_NAME}-${APP_VER}
114 @svn ci ${REP_TAG}/${APP_NAME}-${APP_VER} -m "Tagged new version: ${APP_NAME}-${APP_VER}"
117 @tar -czf ${APP_NAME}-${APP_VER}.tar.gz *_${APP_VER}-${PACK_VER}_${ARCH}.deb
118 @echo -e -n "#!/bin/bash\n\
119 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\
120 rm -f ~/${APP_NAME}-${APP_VER}.tar.gz\n" > mail.script
122 @chmod +x mail.script
125 This message was generated automatically , please do not reply.\n\
126 Attachment: ${APP_NAME}-${APP_VER}.tar.gz - tarball with the newest Whitestork's packages.\n\
127 Attachment: build.log - logs from building binaries.\n\
128 Attachment: debs.log - logs from making *.deb packages.\n\n\
129 Automatic Building Framework ver: ${FRM_VER}\nCopyright 2006 ComArch S.A.\n" > mail.content
130 @scp ${APP_NAME}-${APP_VER}.tar.gz krzsas@localhost:~/
131 @scp ${LOG_BUILD} krzsas@localhost:~/
132 @scp ${LOG_DEBS} krzsas@localhost:~/
133 @scp mail.script krzsas@localhost:~/
134 @scp mail.content krzsas@localhost:~/
137 @ssh krzsas@localhost ./mail.script
140 @echo -e -n "Generating locale...\n"
141 @echo -e -n "Generating locale...\n" > ${LOG_BUILD}
143 @./generate_locale ${DATA}/locale/ ${GUI_LOCALE}
144 @echo -e -n "Locale generation successfully completed...\n"
145 @echo -e -n "Locale generation successfully completed...\n" > ${LOG_BUILD}
147 build: pre-build ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager ${BINARIES}/ws_bookmark.so plugins
148 @echo -e -n "\nBuilding WhiteStork is finished.\n"
151 @echo -e -n "Building WhiteStork... \n"
152 @echo -e -n "" > ${LOG_BUILD}
154 plugins: ${BINARIES}/engine_xdxf.so ${BINARIES}/engine_stardict.so
157 ${BINARIES}/WhiteStorkManager:
159 @echo -e -n "**--> Compiling Manager...\n"
160 @echo -e -n "**--> Compiling Manager...\n" >> ${LOG_BUILD}
161 @make SQLITE=${SQLITE} -C ${MANAGER} >> ${LOG_BUILD}
163 ${BINARIES}/ws_dbus.o:
164 @echo -e -n "**--> Compiling D-BUS Wrapper... \n"
165 @echo -e -n "**--> Compiling D-BUS Wrapper... \n" >> ${LOG_BUILD}
166 # @cd ${DBUS} && make >> ../../${LOG_BUILD}
167 @make -C ${DBUS} >> ${LOG_BUILD}
169 ${BINARIES}/WhiteStork:
171 @echo -e -n "**--> Compiling User Interface...\n"
172 @echo -e -n "**--> Compiling User Interface...\n" >> ${LOG_BUILD}
173 # @cd ${GUI} && make APP_VER=${APP_VER} >> ../../${LOG_BUILD}
174 @make APP_VER=${APP_VER} -C ${GUI} >> ${LOG_BUILD}
176 ${BINARIES}/engine_xdxf.so:
178 @echo -e -n "**--> Compiling XDXF Engine...\n"
179 @echo -e -n "**--> Compiling XDXF Engine...\n" >> ${LOG_BUILD}
180 # @cd ${XDXF_PLUGIN} && make >> ../../../${LOG_BUILD}
181 @make -C ${XDXF_PLUGIN} >> ${LOG_BUILD}
183 ${BINARIES}/engine_stardict.so:
185 @echo -e -n "**--> Compiling StarDict Engine...\n"
186 @echo -e -n "**--> Compiling StarDict Engine...\n" >> ${LOG_BUILD}
187 # @cd ${STARDICT_PLUGIN} && make >> ../../../${LOG_BUILD}
188 @make -C ${STARDICT_PLUGIN} >> ${LOG_BUILD}
190 ${BINARIES}/ws_bookmark.so:
192 @echo -e -n "**--> Compiling Bookmarks...\n"
193 @echo -e -n "**--> Compiling Bookmarks...\n" >> ${LOG_BUILD}
194 @make -C ${BOOKMARKS_DIR} >> ${LOG_BUILD}
197 @echo -e -n "Cleaning all logs\n"
198 @rm -f ${LOG_DIR}/*.log
201 @-echo -e -n "Cleaning project directories\n"
202 @echo -e -n "" > ${LOG_CLEAN}
203 @-rm -f ${BINARIES}/* >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
204 @-rm -f *~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
205 @-rm -f *.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
206 @-rm -rf ${PACKAGES}/*
207 @-make -C ${GUI} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
208 @-make -C ${DBUS} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
209 @-make -C ${XDXF_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
210 @-make -C ${STARDICT_PLUGIN} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
211 @-cd ${MANAGER} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
212 @-make -C ${MANAGER} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN}
213 @find src/bookmarks/ -mindepth 1 -maxdepth 1 -type d -not -name .svn -exec make -C {} clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} \;
214 @-rm -rf ${GUI_LOCALE}*
216 # @-cd ${GUI} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
217 # @-cd ${DBUS} && make clean >> ../../${LOG_CLEAN} 2>> ../../${LOG_CLEAN}
218 # @-cd ${XDXF_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
219 # @-cd ${STARDICT_PLUGIN} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
220 # @-cd ${BOOKMARKS_DIR} && make clean >> ../../../${LOG_CLEAN} 2>> ../../../${LOG_CLEAN}
222 run: clean install entries run-dict clean-temp
226 @run-standalone.sh WhiteStorkManager
229 @-fakeroot rm -rf /usr/share/WhiteStork
230 @-fakeroot rm -rf /usr/lib/WhiteStork
231 @-fakeroot rm -rf /usr/include/WhiteStork
232 @-fakeroot rm -f /etc/others-menu/extra_applications/0112_whitestorkgui.desktop
233 @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop
234 @-fakeroot rm -f /usr/share/pixmaps/whitestork.png
235 @-fakeroot rm -f /usr/share/pixmaps/whitestork_icon.png
236 @-fakeroot rm -f /usr/bin/WhiteStork
237 @-fakeroot rm -f /usr/bin/WhiteStorkManager
238 @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop
239 @-fakeroot rm -f /usr/lib/WhiteStork/engine_xdxf.so
240 @-fakeroot rm -f /usr/lib/WhiteStork/engine_stardict.so
242 # gconftool-2 --recursive-unset /apps/maemo/WhiteStork
244 install-manager: localization ${BINARIES}/ws_dbus.o ${BINARIES}/ws_bookmark.so ${BINARIES}/WhiteStorkManager
245 @install -d ${MNG_DIRS}
246 @cp ${MNG_EXECUTABLE} ${DESTDIR}/usr/bin
247 @cp ${MNG_LIB} ${DESTDIR}/usr/lib/WhiteStork
248 @cp ${MNG_DBUS} ${DESTDIR}/usr/share/dbus-1/services
249 @find ${MNG_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${MNG_PACK_NAME} \;
251 # @install -d ${MNG_DICT_DIRS}
255 @install -d ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
256 @cp -rf ${MNG_BOOKMARKS} ${DESTDIR}/usr/share/WhiteStork/dictionaries/bookmarks
258 install-gui: ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork
259 @install -d ${GUI_DIRS}
260 @cp ${GUI_EXECUTABLE} ${DESTDIR}/usr/bin
261 @cp ${GUI_ICONS} ${DESTDIR}/usr/share/pixmaps
262 @cp ${GUI_DBUS} ${DESTDIR}/usr/share/dbus-1/services
263 @cp ${GUI_OTHER} ${DESTDIR}/usr/share/applications/hildon
264 @cp ${GUI_MIS} ${DESTDIR}/usr/share/mis
265 @cp -a ${GUI_LOCALE}* ${DESTDIR}/usr/share/locale/
266 # @find ${GUI_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${GUI_PACK_NAME} \;
268 install-plugins: plugins
269 @install -d ${PLUGINS_DIRS}
270 @cp ${PLUGINS_LIB} ${DESTDIR}/usr/lib/WhiteStork
271 @cp ${PLUGINS_ICONS} ${DESTDIR}/usr/share/pixmaps
272 @install -d ${MNG_DICT_DIRS}
275 # @find ${PLUGINS_DOC} -type f -not -path *.svn* -exec cp {} ${DESTDIR}/usr/share/doc/${PLUGINS_PACK_NAME} \;
277 install: install-manager install-gui install-plugins
278 @echo -e "\n\nIf you are installing whitestork, please run 'make entries', before running the application ( not as root )\n\n"
281 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/StarDictSampleDict/name "Polish - English Sample Dictionary"
282 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/StarDictSampleDict/path "/usr/share/WhiteStork/dictionaries/StarDictSampleDict"
283 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/StarDictSampleDict/active true
284 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/StarDictSampleDict/optimized false
285 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/XDXFSampleDict/name "English - Polish Sample Dictionary"
286 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/XDXFSampleDict/path "/usr/share/WhiteStork/dictionaries/XDXFSampleDict"
287 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/XDXFSampleDict/active true
288 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/XDXFSampleDict/optimized false
290 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/bookmarks/path "/usr/lib/WhiteStork/ws_bookmark.so"
291 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/name "Bookmarks"
292 gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/path "/usr/share/WhiteStork/dictionaries/bookmarks"
293 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/active false
294 gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/bookmarks/optimized true
295 chmod -R 0777 /usr/share/WhiteStork/dictionaries
297 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/xdxf/path "/usr/lib/WhiteStork/engine_xdxf.so"
298 gconftool-2 --type string --set /apps/maemo/WhiteStork/Engines/stardict/path "/usr/lib/WhiteStork/engine_stardict.so"
300 # maemo-select-menu-location whitestork.desktop
303 install_deb: clean-inst-log uninstall eng-deb-i mng-deb-i gui-deb-i
304 @echo -e -n "All packages have been installed/reinstalled.\n"
307 @echo -n "" > ${LOG_INST}
310 @-fakeroot dpkg --purge whitestork
311 # @-fakeroot dpkg --purge whitestorkdictionary
314 @fakeroot su ${USER} -c 'af-sb-init.sh start'
317 @fakeroot su ${USER} -c 'af-sb-init.sh stop'
320 @fakeroot su ${USER} -c 'af-sb-init.sh restart'
323 @fakeroot chmod 0777 /var/run
325 release-package: clean debs meta-package
326 @echo "Release package generation successfully completed"
328 snapshot: tag-version send-last
330 repo: release-package meta-package
332 @rm -rf ${DEB_REP_DIR}
333 @./generate_repo ${DEB_REP_DIR}
336 dpkg-buildpackage -rfakeroot