summaryrefslogtreecommitdiff
authorwimpie <wimpie>2005-01-09 03:02:21 (UTC)
committer wimpie <wimpie>2005-01-09 03:02:21 (UTC)
commit67d1d0b292553af550219d770cbd5c00987d8b8b (patch) (unidiff)
tree517759c7fbda44a40ff733e3b5d5667d90558caa
parent987bc9a2c5b39ddd4dc2a665cea65688bfd2179e (diff)
downloadopie-67d1d0b292553af550219d770cbd5c00987d8b8b.zip
opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.gz
opie-67d1d0b292553af550219d770cbd5c00987d8b8b.tar.bz2
CONTROL files : reset version to 'standard' format
(partly rolls back my drastic all-applicatoins-same-version change) now format is x.y(.z)$EXTRAVERSION where x.y (and aptionally .z) are x : major version y : minor version z : application patch and extra version is seconds-since-epoch this value can be used to automatically upgrade versions with minor changes (without manual update of the control file)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make8
-rw-r--r--core/multimedia/opieplayer/modplug/opie-modplugin.control2
-rw-r--r--core/pim/addressbook/addressbook.cpp2
-rw-r--r--core/pim/today/task-opie-today.control2
-rw-r--r--core/settings/security/demo/multiauth.control2
-rw-r--r--core/tools/quicklauncher/main.cpp3
-rw-r--r--dependencies.in12
-rw-r--r--etc/opie-keytabs.control2
-rw-r--r--libopie2/libopie2.control2
-rw-r--r--libopie2/opiecore/libopiecore2.control2
-rw-r--r--libopie2/opiedb/libopiedb2.control2
-rw-r--r--libopie2/opiemm/libopiemm2.control2
-rw-r--r--libopie2/opienet/libopienet2.control2
-rw-r--r--libopie2/opiepim/libopiepim2.control2
-rw-r--r--libopie2/opiesecurity/libopiesecurity2.control2
-rw-r--r--libopie2/opieui/oresource.cpp1
-rw-r--r--libqtaux/libqtaux.control2
-rw-r--r--noncore/applets/zkbapplet/zkbapplet.control2
-rw-r--r--noncore/apps/dagger/opie-dagger.control2
-rw-r--r--noncore/games/bounce/opie-bounce.control2
-rw-r--r--noncore/games/buzzword/opie-buzzword.control2
-rw-r--r--noncore/games/kbill/opie-kbill.control2
-rw-r--r--noncore/games/kcheckers/opie-kcheckers.control2
-rw-r--r--noncore/games/kpacman/opie-kpacman.control2
-rw-r--r--noncore/multimedia/camera/opie-camera.control2
-rw-r--r--noncore/multimedia/opieplayer2/opie-mediaplayer2-codecs.control2
-rw-r--r--noncore/multimedia/powerchord/opie-powerchord.control2
-rw-r--r--noncore/net/mail/libetpanstuff/libetpan.control2
-rw-r--r--noncore/net/mail/libmailwrapper/libmailwrapper.control2
-rw-r--r--noncore/net/mail/taskbarapplet/opie-mailapplet.control2
-rw-r--r--noncore/net/opierdesktop/opie-rdesktop.control2
-rw-r--r--noncore/net/opietooth/blue-pin/opie-bluepin.control2
-rw-r--r--noncore/net/opietooth/manager/opie-bluetoothmanager.control2
-rw-r--r--noncore/net/wellenreiter/opie-wellenreiter.control2
-rw-r--r--noncore/securityplugins/blueping/bluepingplugin.control2
-rw-r--r--noncore/securityplugins/dummy/dummyplugin.control2
-rw-r--r--noncore/securityplugins/notice/notice.control2
-rw-r--r--noncore/securityplugins/pin/pin.control2
-rw-r--r--noncore/tools/opie-sh/opie-sh.control2
-rw-r--r--noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.control2
-rw-r--r--noncore/unsupported/gsmtool/opie-gsmtool.control2
-rw-r--r--noncore/unsupported/ubrowser/opie-ubrowser.control2
-rwxr-xr-xscripts/GeneratePackageMake8
-rwxr-xr-xscripts/mkipkg10
-rwxr-xr-xscripts/tothreaded4
45 files changed, 73 insertions, 49 deletions
diff --git a/Rules.make b/Rules.make
index 644a6cf..bdfe6d4 100644
--- a/Rules.make
+++ b/Rules.make
@@ -1,308 +1,316 @@
1.phony: force 1.phony: force
2force: 2force:
3 3
4$(configs) : 4$(configs) :
5 $(call makecfg,$@) 5 $(call makecfg,$@)
6 6
7$(TOPDIR)/gen.pro : $(TOPDIR)/.config 7$(TOPDIR)/gen.pro : $(TOPDIR)/.config
8 echo > $@ 8 echo > $@
9# added for threaded version 9# added for threaded version
10ifneq ($(CONFIG_THREADED),) 10ifneq ($(CONFIG_THREADED),)
11 echo CONFIG += thread >> $@ 11 echo CONFIG += thread >> $@
12else 12else
13 echo CONFIG -= thread >> $@ 13 echo CONFIG -= thread >> $@
14endif 14endif
15# added for auto stripped build
16ifneq ($(CONFIG_STRIP),)
17 echo CONFIG += strip >> $@
18endif
15ifneq ($(CONFIG_DEBUG),) 19ifneq ($(CONFIG_DEBUG),)
16 echo CONFIG += debug >> $@ 20 echo CONFIG += debug >> $@
17 echo CONFIG -= release >> $@ 21 echo CONFIG -= release >> $@
18 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@ 22 echo DEFINES += "QT_COMPONENT_DEBUG=2" >> $@
19 echo DEFINES += QT_DEBUG >> $@ 23 echo DEFINES += QT_DEBUG >> $@
20else 24else
21 echo CONFIG -= debug >> $@ 25 echo CONFIG -= debug >> $@
22 echo CONFIG += release >> $@ 26 echo CONFIG += release >> $@
23 echo DEFINES += "OPIE_NO_DEBUG" >> $@ 27 echo DEFINES += "OPIE_NO_DEBUG" >> $@
24endif 28endif
25ifeq ($(CONFIG_STATIC),y) 29ifeq ($(CONFIG_STATIC),y)
26 echo !contains\( TARGET,qpe \) \{ >> $@ 30 echo !contains\( TARGET,qpe \) \{ >> $@
27 echo CONFIG += staticlib >> $@ 31 echo CONFIG += staticlib >> $@
28 echo \} >> $@ 32 echo \} >> $@
29endif 33endif
30ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3 34ifeq ($(filter 3.%,$(QTE_VERSION)),) # not qt3
31 echo CONFIG -= qt3 >> $@ 35 echo CONFIG -= qt3 >> $@
32else 36else
33 echo CONFIG += qt3 >> $@ 37 echo CONFIG += qt3 >> $@
34endif 38endif
35ifneq ($(CONFIG_QUICK_LAUNCH),) 39ifneq ($(CONFIG_QUICK_LAUNCH),)
36 echo contains\( CONFIG, quick-app \) \{ >> $@ 40 echo contains\( CONFIG, quick-app \) \{ >> $@
37 echo CONFIG -= staticlib >> $@ 41 echo CONFIG -= staticlib >> $@
38 echo CONFIG -= quick-app >> $@ 42 echo CONFIG -= quick-app >> $@
39 echo CONFIG += quick-app-lib >> $@ 43 echo CONFIG += quick-app-lib >> $@
40 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@ 44 echo QUICKLAUNCH_PATH = $(CONFIG_QUICKLAUNCH_PATH) >> $@
41 echo \} >> $@ 45 echo \} >> $@
42else 46else
43 echo contains\( CONFIG, quick-app \) \{ >> $@ 47 echo contains\( CONFIG, quick-app \) \{ >> $@
44 echo CONFIG -= quick-app >> $@ 48 echo CONFIG -= quick-app >> $@
45 echo CONFIG += quick-app-bin >> $@ 49 echo CONFIG += quick-app-bin >> $@
46 echo \} >> $@ 50 echo \} >> $@
47endif 51endif
48ifeq ($(CONFIG_SQL_PIM_BACKEND),y) 52ifeq ($(CONFIG_SQL_PIM_BACKEND),y)
49 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@ 53 echo ENABLE_SQL_PIM_BACKEND=$(CONFIG_SQL_PIM_BACKEND) >> $@
50else 54else
51 echo ENABLE_SQL_PIM_BACKEND=n >> $@ 55 echo ENABLE_SQL_PIM_BACKEND=n >> $@
52endif 56endif
53ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y) 57ifeq ($(CONFIG_OPIE_NO_OVERRIDE_QT),y)
54 echo CONFIG += no-override >> $@ 58 echo CONFIG += no-override >> $@
55endif 59endif
56ifeq ($(CONFIG_OPIELOGIN_USEPAM),y) 60ifeq ($(CONFIG_OPIELOGIN_USEPAM),y)
57 echo CONFIG += OPIELOGIN_USEPAM >> $@ 61 echo CONFIG += OPIELOGIN_USEPAM >> $@
58endif 62endif
59ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y) 63ifeq ($(CONFIG_LIBQPE_WITHROHFEEDBACK),y)
60 echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@ 64 echo CONFIG += LIBQPE_WITHROHFEEDBACK >> $@
61endif 65endif
62ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y) 66ifeq ($(CONFIG_OPIE_NO_ERASERECT_FIX),y)
63 echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@ 67 echo DEFINES += OPIE_NO_ERASE_RECT_HACKFIX >> $@
64endif 68endif
65ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y) 69ifeq ($(CONFIG_OPIE_NO_BUILTIN_SHUTDOWN),y)
66 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@ 70 echo DEFINES += OPIE_NO_BUILTIN_SHUTDOWN >> $@
67endif 71endif
68ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y) 72ifeq ($(CONFIG_OPIE_NO_BUILTIN_CALIBRATE),y)
69 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@ 73 echo DEFINES += OPIE_NO_BUILTIN_CALIBRATE >> $@
70endif 74endif
71ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y) 75ifeq ($(CONFIG_USE_REALTIME_AUDIO_THREAD),y)
72 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@ 76 echo DEFINES += USE_REALTIME_AUDIO_THREAD >> $@
73endif 77endif
74ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y) 78ifeq ($(CONFIG_USE_FILE_NOTIFICATION),y)
75 echo DEFINES += USE_FILE_NOTIFICATION >> $@ 79 echo DEFINES += USE_FILE_NOTIFICATION >> $@
76endif 80endif
77ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y) 81ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
78 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ 82 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@
79endif 83endif
80ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) 84ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
81 echo DEFINES += OPIE_NEW_MALLOC >> $@ 85 echo DEFINES += OPIE_NEW_MALLOC >> $@
82endif 86endif
83ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) 87ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y)
84 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ 88 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@
85endif 89endif
86 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ 90 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@
87ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) 91ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y)
88 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ 92 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@
89endif 93endif
90ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y) 94ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y)
91 echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@ 95 echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@
92 endif 96 endif
93# Write LIB dirs and INC dirs... 97# Write LIB dirs and INC dirs...
94ifeq ($(CONFIG_LIBETPAN_DEP),y) 98ifeq ($(CONFIG_LIBETPAN_DEP),y)
95 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ 99 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@
96 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ 100 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@
97endif 101endif
98ifeq ($(CONFIG_LIBPCAP_DEP),y) 102ifeq ($(CONFIG_LIBPCAP_DEP),y)
99 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ 103 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@
100 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ 104 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@
101endif 105endif
102ifeq ($(CONFIG_LIBSQLITE_DEP),y) 106ifeq ($(CONFIG_LIBSQLITE_DEP),y)
103 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ 107 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@
104 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ 108 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@
105endif 109endif
106ifeq ($(CONFIG_LIBXINE_DEP),y) 110ifeq ($(CONFIG_LIBXINE_DEP),y)
107 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@ 111 echo LIBXINE_LIB_DIR = $(CONFIG_LIBXINE_LIB_DIR) >> $@
108 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@ 112 echo LIBXINE_INC_DIR = $(CONFIG_LIBXINE_INC_DIR) >> $@
109endif 113endif
114ifeq ($(CONFIG_LIBBLUEZ_DEP),y)
115 echo LIBBLUEZ_LIB_DIR = $(CONFIG_LIBBLUEZ_LIB_DIR) >> $@
116 echo LIBBLUEZ_INC_DIR = $(CONFIG_LIBBLUEZ_INC_DIR) >> $@
117endif
110ifeq ($(CONFIG_LIBIPK_DEP),y) 118ifeq ($(CONFIG_LIBIPK_DEP),y)
111 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@ 119 echo LIBIPK_LIB_DIR = $(CONFIG_LIBIPK_LIB_DIR) >> $@
112 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@ 120 echo LIBIPK_INC_DIR = $(CONFIG_LIBIPK_INC_DIR) >> $@
113endif 121endif
114ifeq ($(CONFIG_LIBSDK_DEP),y) 122ifeq ($(CONFIG_LIBSDK_DEP),y)
115 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@ 123 echo LIBSDL_LIB_DIR = $(CONFIG_LIBSDL_LIB_DIR) >> $@
116 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@ 124 echo LIBSDL_INC_DIR = $(CONFIG_LIBSDL_INC_DIR) >> $@
117endif 125endif
118ifeq ($(CONFIG_LIBSWORD_DEP),y) 126ifeq ($(CONFIG_LIBSWORD_DEP),y)
119 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@ 127 echo LIBSWORD_LIB_DIR = $(CONFIG_LIBSWORD_LIB_DIR) >> $@
120 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@ 128 echo LIBSWORD_INC_DIR = $(CONFIG_LIBSWORD_INC_DIR) >> $@
121endif 129endif
122$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages 130$(TOPDIR)/.depends : $(shell if [ -e $(TOPDIR)/config.in ]\; then echo $(TOPDIR)/config.in\; fi\;) $(TOPDIR)/.config $(TOPDIR)/packages
123 @echo Generating dependency information... 131 @echo Generating dependency information...
124# add to subdir-y, and add descend rules 132# add to subdir-y, and add descend rules
125 @cat $(TOPDIR)/packages | grep -v '^#' | \ 133 @cat $(TOPDIR)/packages | grep -v '^#' | \
126 awk '{print \ 134 awk '{print \
127 ".PHONY : " $$2 "\n" \ 135 ".PHONY : " $$2 "\n" \
128 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \ 136 "subdir-$$(" $$1 ") += " $$2 "\n\n"; \
129 print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends 137 print $$2 " : " $$2 "/Makefile\n\t+$$(call descend,$$@,$(filter-out $$@,$$(filter-out $$@,$$(MAKECMDGOALS))))\n"; }' > $(TOPDIR)/.depends
130 cat $(TOPDIR)/packages | grep -v '^#' | \ 138 cat $(TOPDIR)/packages | grep -v '^#' | \
131 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \ 139 perl -ne '($$cfg, $$dir, $$pro) = $$_ =~ /^(\S+)\s+(\S+)\s+(\S+)/; if ( -e "$$dir/$$pro" ) { print "$$dir/Makefile : $$dir/$$pro \$$(QMAKE) \$$(OPIEDIR)/gen.pro \$$(OPIEDIR)/.config\n\t\$$(call makefilegen,\$$@)\n\n"; }' \
132 >> $(TOPDIR)/.depends 140 >> $(TOPDIR)/.depends
133# interpackage dependency generation 141# interpackage dependency generation
134 @cat $(TOPDIR)/packages | \ 142 @cat $(TOPDIR)/packages | \
135 $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends 143 $(TOPDIR)/scripts/deps.pl >> $(TOPDIR)/.depends
136 144
137$(TOPDIR)/.depends.cfgs: 145$(TOPDIR)/.depends.cfgs:
138# config.in interdependencies 146# config.in interdependencies
139 @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs 147 @echo $(configs) | sed -e 's,/config.in,,g' | ( for i in `cat`; do echo $$i; done ) > dirs
140 @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@ 148 @cat dirs | ( for i in `cat`; do if [ "`cat dirs|grep $$i 2>/dev/null|wc -l`" -ne "1" ]; then deps=`cat dirs|grep $$i| grep -v "^$$i$$"|for i in \`cat|sed -e's,^$(TOPDIR)/,$$(TOPDIR)/,g'\`; do echo $$i/config.in; done`; echo `echo $$i/config.in|sed -e 's,^$(TOPDIR)/,$$(TOPDIR)/,'` : $$deps; fi; done ) >> $@
141 @-rm -f dirs 149 @-rm -f dirs
142 150
143$(QTDIR)/stamp-headers : 151$(QTDIR)/stamp-headers :
144 @-rm -f $(QTDIR)/stamp-headers* 152 @-rm -f $(QTDIR)/stamp-headers*
145 ( cd $(QTDIR)/include; \ 153 ( cd $(QTDIR)/include; \
146 $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \ 154 $(patsubst %,ln -sf ../src/kernel/%;,qgfx_qws.h qwsmouse_qws.h \
147 qcopchannel_qws.h qwindowsystem_qws.h \ 155 qcopchannel_qws.h qwindowsystem_qws.h \
148 qfontmanager_qws.h qwsdefaultdecoration_qws.h)) 156 qfontmanager_qws.h qwsdefaultdecoration_qws.h))
149 touch $@ 157 touch $@
150 158
151$(QTDIR)/stamp-headers-x11 : 159$(QTDIR)/stamp-headers-x11 :
152 @-rm -f $(QTDIR)/stamp-headers* 160 @-rm -f $(QTDIR)/stamp-headers*
153 cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h) 161 cd $(QTDIR)/include; $(patsubst %,ln -sf $(OPIEDIR)/x11/libqpe-x11/qt/%;,qgfx_qws.h qwsmouse_qws.h qcopchannel_qws.h qwindowsystem_qws.h qfontmanager_qws.h qwsdefaultdecoration_qws.h)
154 touch $@ 162 touch $@
155 163
156$(OPIEDIR)/stamp-headers : 164$(OPIEDIR)/stamp-headers :
157 @-rm -f $(OPIEDIR)/stamp-headers* 165 @-rm -f $(OPIEDIR)/stamp-headers*
158 mkdir -p $(TOPDIR)/include/qpe \ 166 mkdir -p $(TOPDIR)/include/qpe \
159 $(TOPDIR)/include/qtopia \ 167 $(TOPDIR)/include/qtopia \
160 $(TOPDIR)/include/opie \ 168 $(TOPDIR)/include/opie \
161 $(TOPDIR)/include/opie2 \ 169 $(TOPDIR)/include/opie2 \
162 $(TOPDIR)/include/opie2/private \ 170 $(TOPDIR)/include/opie2/private \
163 $(TOPDIR)/include/qtopia/private \ 171 $(TOPDIR)/include/qtopia/private \
164 $(TOPDIR)/include/sl 172 $(TOPDIR)/include/sl
165 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) 173 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; )
166 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) 174 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; )
167 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) 175 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; )
168 # libopie2 176 # libopie2
169 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; ) 177 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/*.h .; )
170 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; ) 178 ( cd include/opie2 && ln -sf ../../libopie2/opiecore/device/*.h .; )
171 ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; ) 179 ( cd include/opie2 && ln -sf ../../libopie2/opiemm/*.h .; )
172 ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; ) 180 ( cd include/opie2 && ln -sf ../../libopie2/opiedb/*.h .; )
173 ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; ) 181 ( cd include/opie2 && ln -sf ../../libopie2/opienet/*.h .; )
174 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; ) 182 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/*.h .; )
175 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; ) 183 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; )
176 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/backend/*.h .; ) 184 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/backend/*.h .; )
177 ( cd include/opie2/private && ln -sf ../../../libopie2/opiepim/private/*.h .; ) 185 ( cd include/opie2/private && ln -sf ../../../libopie2/opiepim/private/*.h .; )
178 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; ) 186 ( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; )
179 ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; ) 187 ( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; )
180 ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; ) 188 ( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; )
181 ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; ) 189 ( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; )
182 ( cd include/opie2 && ln -sf ../../libopie2/opiesecurity/*.h .; ) 190 ( cd include/opie2 && ln -sf ../../libopie2/opiesecurity/*.h .; )
183 # auxilliary libraries 191 # auxilliary libraries
184 ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; ) 192 ( cd include/opie2 && ln -sf ../../libqtaux/*.h .; )
185 ( cd include/sl && ln -sf ../../libslcompat/*.h .; ) 193 ( cd include/sl && ln -sf ../../libslcompat/*.h .; )
186 ( cd include/ && ln -sf ../noncore/net/ftplib/*.h .; ) 194 ( cd include/ && ln -sf ../noncore/net/ftplib/*.h .; )
187 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardcfg.h .; ) 195 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardcfg.h .; )
188 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardpicks.h .; ) 196 ( cd include/ && ln -sf ../inputmethods/pickboard/pickboardpicks.h .; )
189 # all 197 # all
190 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ 198 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opieui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
191 ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done ) 199 ln -sf ../../libopie2/opieui/$$generatedHeader $$generatedHeader; done )
192 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ 200 ( cd include/opie2; for generatedHeader in `cd ../../libopie2/opiepim/ui; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
193 ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done ) 201 ln -sf ../../libopie2/opiepim/ui/$$generatedHeader $$generatedHeader; done )
194 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h 202 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h
195 touch $@ 203 touch $@
196 204
197$(OPIEDIR)/stamp-headers-x11 : 205$(OPIEDIR)/stamp-headers-x11 :
198 @-rm -f $(OPIEDIR)/stamp-headers* 206 @-rm -f $(OPIEDIR)/stamp-headers*
199 mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \ 207 mkdir -p $(TOPDIR)/include/qpe $(TOPDIR)/include/qtopia \
200 $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private 208 $(TOPDIR)/include/opie $(TOPDIR)/include/qtopia/private
201 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; ) 209 ( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; )
202 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; ) 210 ( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; )
203 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; ) 211 ( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; )
204 ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; ) 212 ( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; )
205 ( cd include/opie && ln -sf ../../libsql/*.h .; ) 213 ( cd include/opie && ln -sf ../../libsql/*.h .; )
206 ( cd include/opie && ln -sf ../../libopie/pim/*.h .; ) 214 ( cd include/opie && ln -sf ../../libopie/pim/*.h .; )
207 ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \ 215 ( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
208 ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done ) 216 ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done )
209 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h 217 ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h
210 ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; ) 218 ( cd include/qpe; ln -sf ../../x11/libqpe-x11/qpe/*.h .; )
211 touch $@ 219 touch $@
212 220
213$(TOPDIR)/library/custom.h : $(TOPDIR)/.config 221$(TOPDIR)/library/custom.h : $(TOPDIR)/.config
214 @-rm -f $@ 222 @-rm -f $@
215 @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\ 223 @$(if $(patsubst "%",%,$(CONFIG_CUSTOMFILE)),\
216 ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@) 224 ln -sf $(patsubst "%",%,$(CONFIG_CUSTOMFILE)) $@)
217 @touch $@ 225 @touch $@
218 226
219$(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/qmake/qmake: 227$(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf $(TOPDIR)/scripts/kconfig/conf $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/qmake/qmake:
220 +$(call descend,$(shell dirname $@),$(shell basename $@)) 228 +$(call descend,$(shell dirname $@),$(shell basename $@))
221 229
222menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in 230menuconfig: $(TOPDIR)/scripts/lxdialog/lxdialog $(TOPDIR)/scripts/kconfig/mconf ./config.in
223 $(TOPDIR)/scripts/kconfig/mconf ./config.in 231 $(TOPDIR)/scripts/kconfig/mconf ./config.in
224 @touch ./.config.stamp 232 @touch ./.config.stamp
225 233
226xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in 234xconfig: $(TOPDIR)/scripts/kconfig/qconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in
227 $(TOPDIR)/scripts/kconfig/qconf ./config.in 235 $(TOPDIR)/scripts/kconfig/qconf ./config.in
228 @touch .config.stamp 236 @touch .config.stamp
229 237
230gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in 238gconfig: $(TOPDIR)/scripts/kconfig/gconf $(TOPDIR)/scripts/kconfig/libkconfig.so ./config.in
231 $(TOPDIR)/scripts/kconfig/gconf ./config.in 239 $(TOPDIR)/scripts/kconfig/gconf ./config.in
232 @touch .config.stamp 240 @touch .config.stamp
233 241
234config: $(TOPDIR)/scripts/kconfig/conf ./config.in 242config: $(TOPDIR)/scripts/kconfig/conf ./config.in
235 $(TOPDIR)/scripts/kconfig/conf ./config.in 243 $(TOPDIR)/scripts/kconfig/conf ./config.in
236 @touch .config.stamp 244 @touch .config.stamp
237 245
238oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 246oldconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
239 $(TOPDIR)/scripts/kconfig/conf -o ./config.in 247 $(TOPDIR)/scripts/kconfig/conf -o ./config.in
240 @touch .config.stamp 248 @touch .config.stamp
241 249
242randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 250randconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
243 $(TOPDIR)/scripts/kconfig/conf -r ./config.in 251 $(TOPDIR)/scripts/kconfig/conf -r ./config.in
244 @touch .config.stamp 252 @touch .config.stamp
245 253
246allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 254allyesconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
247 $(TOPDIR)/scripts/kconfig/conf -y ./config.in 255 $(TOPDIR)/scripts/kconfig/conf -y ./config.in
248 @touch .config.stamp 256 @touch .config.stamp
249 257
250allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 258allnoconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
251 $(TOPDIR)/scripts/kconfig/conf -n ./config.in 259 $(TOPDIR)/scripts/kconfig/conf -n ./config.in
252 @touch .config.stamp 260 @touch .config.stamp
253 261
254defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in 262defconfig: $(TOPDIR)/scripts/kconfig/conf ./config.in
255 $(TOPDIR)/scripts/kconfig/conf -d ./config.in 263 $(TOPDIR)/scripts/kconfig/conf -d ./config.in
256 @touch .config.stamp 264 @touch .config.stamp
257 265
258$(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default 266$(TOPDIR)/qmake/qmake : $(TOPDIR)/mkspecs/default
259 267
260$(TOPDIR)/mkspecs/default : 268$(TOPDIR)/mkspecs/default :
261 ln -sf linux-g++ $@ 269 ln -sf linux-g++ $@
262 270
263$(TOPDIR)/scripts/subst : force 271$(TOPDIR)/scripts/subst : force
264 @( \ 272 @( \
265 echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \ 273 echo 's,\$$QPE_VERSION,$(QPE_VERSION),g'; \
266 echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \ 274 echo 's,\$$OPIE_VERSION,$(OPIE_VERSION),g'; \
267 echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \ 275 echo 's,\$$QTE_VERSION,$(QTE_VERSION),g'; \
268 echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \ 276 echo 's,\$$QTE_REVISION,$(QTE_REVISION),g'; \
269 echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \ 277 echo 's,\$$SUB_VERSION,$(SUB_VERSION),g'; \
270 echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \ 278 echo 's,\$$EXTRAVERSION,$(EXTRAVERSION),g'; \
271 echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \ 279 echo 's,\$$QTE_BASEVERSION,$(QTE_BASEVERSION),g'; \
272 ) > $@ || ( rm -f $@; exit 1 ) 280 ) > $@ || ( rm -f $@; exit 1 )
273 281
274$(TOPDIR)/scripts/filesubst : force 282$(TOPDIR)/scripts/filesubst : force
275 @( \ 283 @( \
276 echo 's,\$$OPIEDIR/root/,/,g'; \ 284 echo 's,\$$OPIEDIR/root/,/,g'; \
277 echo 's,$(OPIEDIR)/root/,/,g'; \ 285 echo 's,$(OPIEDIR)/root/,/,g'; \
278 echo 's,\$$OPIEDIR,$(prefix),g'; \ 286 echo 's,\$$OPIEDIR,$(prefix),g'; \
279 echo 's,$(OPIEDIR),$(prefix),g'; \ 287 echo 's,$(OPIEDIR),$(prefix),g'; \
280 echo 's,\$$QTDIR,$(prefix),g'; \ 288 echo 's,\$$QTDIR,$(prefix),g'; \
281 echo 's,$(QTDIR),$(prefix),g'; \ 289 echo 's,$(QTDIR),$(prefix),g'; \
282 echo 's,^\(\./\)*root/,/,g'; \ 290 echo 's,^\(\./\)*root/,/,g'; \
283 echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \ 291 echo 's,^\(\./\)*etc/,$(prefix)/etc/,g'; \
284 echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \ 292 echo 's,^\(\./\)*lib/,$(prefix)/lib/,g'; \
285 echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \ 293 echo 's,^\(\./\)*bin/,$(prefix)/bin/,g'; \
286 echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \ 294 echo 's,^\(\./\)*pics/,$(prefix)/pics/,g'; \
287 echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \ 295 echo 's,^\(\./\)*sounds/,$(prefix)/sounds/,g'; \
288 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ 296 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \
289 echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \ 297 echo 's,^\(\./\)*plugins/,$(prefix)/plugins/,g'; \
290 echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \ 298 echo 's,^\(\./\)*apps/,$(prefix)/apps/,g'; \
291 echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \ 299 echo 's,^\(\./\)*share/,$(prefix)/share/,g'; \
292 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \ 300 echo 's,^\(\./\)*i18n/,$(prefix)/i18n/,g'; \
293 echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \ 301 echo 's,^\(\./\)*help/,$(prefix)/help/,g'; \
294 ) > $@ || ( rm -f $@; exit 1 ) 302 ) > $@ || ( rm -f $@; exit 1 )
295 303
296## general rules ## 304## general rules ##
297 305
298define descend 306define descend
299 $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2) 307 $(MAKE) $(if $(QMAKE),QMAKE=$(QMAKE)) -C $(1) $(2)
300endef 308endef
301 309
302define makefilegen 310define makefilegen
303 cd $(if $(1),$(dir $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(notdir $(1))) $(word 3,$(shell grep "[[:space:]]$(patsubst %/Makefile,%,$(1))[[:space:]]" $(OPIEDIR)/packages)) 311 cd $(if $(1),$(dir $(1))); $(TOPDIR)/qmake/qmake $(3) -o $(if $(1),$(notdir $(1))) $(word 3,$(shell grep "[[:space:]]$(patsubst %/Makefile,%,$(1))[[:space:]]" $(OPIEDIR)/packages))
304endef 312endef
305 313
306define makecfg 314define makecfg
307 $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR) 315 $(TOPDIR)/scripts/makecfg.pl $1 $(OPIEDIR)
308endef 316endef
diff --git a/core/multimedia/opieplayer/modplug/opie-modplugin.control b/core/multimedia/opieplayer/modplug/opie-modplugin.control
index 9e0957b..6e9ad7c 100644
--- a/core/multimedia/opieplayer/modplug/opie-modplugin.control
+++ b/core/multimedia/opieplayer/modplug/opie-modplugin.control
@@ -1,10 +1,10 @@
1Package: opie-modplugin 1Package: opie-modplugin
2Files: plugins/codecs/libmodplugin.so* 2Files: plugins/codecs/libmodplugin.so*
3Priority: optional 3Priority: optional
4Section: libs 4Section: libs
5Maintainer: Simon Hausmann <hausmann@kde.org>, L.J. Potter <lpotter@trolltech.com> 5Maintainer: Simon Hausmann <hausmann@kde.org>, L.J. Potter <lpotter@trolltech.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 2.0.2-$EXTRAVERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9Description: MOD/XM/S3M/IT plugin using libmodplug 9Description: MOD/XM/S3M/IT plugin using libmodplug
10 Plugin to play MOD/XM/S3M/IT amiga tracker modules with the mediaplayer in the Opie environment. 10 Plugin to play MOD/XM/S3M/IT amiga tracker modules with the mediaplayer in the Opie environment.
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 0654e1a..3f0ac74 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -1,1049 +1,1049 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** Copyright (C) 2003 Stefan Eilers (eilers.stefan@epost.de) 3** Copyright (C) 2003 Stefan Eilers (eilers.stefan@epost.de)
4** 4**
5** This file is part of the Open Palmtop Environment (see www.opie.info). 5** This file is part of the Open Palmtop Environment (see www.opie.info).
6** 6**
7** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 10** packaging of this file.
11** 11**
12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14** 14**
15** See http://www.trolltech.com/gpl/ for GPL licensing information. 15** See http://www.trolltech.com/gpl/ for GPL licensing information.
16** 16**
17** 17**
18**********************************************************************/ 18**********************************************************************/
19 19
20#define QTOPIA_INTERNAL_FD 20#define QTOPIA_INTERNAL_FD
21 21
22// #include "addresssettings.h" 22// #include "addresssettings.h"
23#include "addressbook.h" 23#include "addressbook.h"
24 24
25#include <opie2/odebug.h> 25#include <opie2/odebug.h>
26#include <opie2/ofileselector.h> 26#include <opie2/ofileselector.h>
27#include <opie2/ofiledialog.h> 27#include <opie2/ofiledialog.h>
28#include <opie2/opimcontact.h> 28#include <opie2/opimcontact.h>
29#include <opie2/ocontactaccessbackend_vcard.h> 29#include <opie2/ocontactaccessbackend_vcard.h>
30 30
31#include <qpe/resource.h> 31#include <qpe/resource.h>
32#include <qpe/ir.h> 32#include <qpe/ir.h>
33#include <qpe/qpemessagebox.h> 33#include <qpe/qpemessagebox.h>
34#include <qmenubar.h> 34#include <qmenubar.h>
35// #include <qtoolbar.h> 35// #include <qtoolbar.h>
36// #include <qmenubar.h> 36// #include <qmenubar.h>
37#include <qpe/qpeapplication.h> 37#include <qpe/qpeapplication.h>
38 38
39#include <qaction.h> 39#include <qaction.h>
40#include <qlayout.h> 40#include <qlayout.h>
41#include <qmessagebox.h> 41#include <qmessagebox.h>
42#include <qtoolbutton.h> 42#include <qtoolbutton.h>
43 43
44#include <stdlib.h> 44#include <stdlib.h>
45#include <sys/stat.h> 45#include <sys/stat.h>
46#include <sys/types.h> 46#include <sys/types.h>
47#include <fcntl.h> 47#include <fcntl.h>
48#include <unistd.h> 48#include <unistd.h>
49 49
50 50
51#include "picker.h" 51#include "picker.h"
52#include "configdlg.h" 52#include "configdlg.h"
53 53
54extern QString addressbookPersonalVCardName(); 54extern QString addressbookPersonalVCardName();
55 55
56AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, 56AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
57 WFlags f ) 57 WFlags f )
58 : QMainWindow( parent, name, f ), 58 : QMainWindow( parent, name, f ),
59 catMenu (0l), 59 catMenu (0l),
60 abEditor(0l), 60 abEditor(0l),
61 syncing(FALSE), 61 syncing(FALSE),
62 m_tableViewButton(0l), 62 m_tableViewButton(0l),
63 m_cardViewButton(0l) 63 m_cardViewButton(0l)
64{ 64{
65 isLoading = true; 65 isLoading = true;
66 66
67 m_config.load(); 67 m_config.load();
68 68
69 setCaption( tr("Contacts") ); 69 setCaption( tr("Contacts") );
70 setIcon( Resource::loadPixmap( "AddressBook" ) ); 70 setIcon( Resource::loadPixmap( "addressbook/AddressBook" ) );
71 71
72 // Settings for Main Menu 72 // Settings for Main Menu
73 // setToolBarsMovable( false ); 73 // setToolBarsMovable( false );
74 setToolBarsMovable( !m_config.fixedBars() ); 74 setToolBarsMovable( !m_config.fixedBars() );
75 setRightJustification( true ); 75 setRightJustification( true );
76 76
77 QToolBar *bar = new QToolBar( this ); 77 QToolBar *bar = new QToolBar( this );
78 bar->setHorizontalStretchable( TRUE ); 78 bar->setHorizontalStretchable( TRUE );
79 79
80 QMenuBar *mbList = new QMenuBar( bar ); 80 QMenuBar *mbList = new QMenuBar( bar );
81 mbList->setMargin( 0 ); 81 mbList->setMargin( 0 );
82 82
83 QPopupMenu *edit = new QPopupMenu( mbList ); 83 QPopupMenu *edit = new QPopupMenu( mbList );
84 mbList->insertItem( tr( "Contact" ), edit ); 84 mbList->insertItem( tr( "Contact" ), edit );
85 85
86 // Category Menu 86 // Category Menu
87 catMenu = new QPopupMenu( this ); 87 catMenu = new QPopupMenu( this );
88 catMenu->setCheckable( TRUE ); 88 catMenu->setCheckable( TRUE );
89 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); 89 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
90 mbList->insertItem( tr("View"), catMenu ); 90 mbList->insertItem( tr("View"), catMenu );
91 91
92 // Create Toolbar 92 // Create Toolbar
93 listTools = new QToolBar( this, "list operations" ); 93 listTools = new QToolBar( this, "list operations" );
94 listTools->setHorizontalStretchable( true ); 94 listTools->setHorizontalStretchable( true );
95 addToolBar( listTools ); 95 addToolBar( listTools );
96 moveToolBar( listTools, m_config.getToolBarPos() ); 96 moveToolBar( listTools, m_config.getToolBarPos() );
97 97
98 // View Icons 98 // View Icons
99 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/listview" ), 99 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/listview" ),
100 QString::null, 0, this, 0 ); 100 QString::null, 0, this, 0 );
101 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); 101 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) );
102 m_tableViewButton->setToggleAction( true ); 102 m_tableViewButton->setToggleAction( true );
103 m_tableViewButton->addTo( listTools ); 103 m_tableViewButton->addTo( listTools );
104 m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "addressbook/cardview" ), QString::null, 0, this, 0 ); 104 m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "addressbook/cardview" ), QString::null, 0, this, 0 );
105 connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); 105 connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) );
106 m_cardViewButton->setToggleAction( true ); 106 m_cardViewButton->setToggleAction( true );
107 m_cardViewButton->addTo( listTools ); 107 m_cardViewButton->addTo( listTools );
108 108
109 listTools->addSeparator(); 109 listTools->addSeparator();
110 110
111 // Other Buttons 111 // Other Buttons
112 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 112 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null,
113 0, this, 0 ); 113 0, this, 0 );
114 actionNew = a; 114 actionNew = a;
115 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); 115 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
116 a->addTo( edit ); 116 a->addTo( edit );
117 a->addTo( listTools ); 117 a->addTo( listTools );
118 118
119 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 119 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
120 0, this, 0 ); 120 0, this, 0 );
121 actionEdit = a; 121 actionEdit = a;
122 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); 122 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
123 a->addTo( edit ); 123 a->addTo( edit );
124 a->addTo( listTools ); 124 a->addTo( listTools );
125 125
126 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 126 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
127 0, this, 0 ); 127 0, this, 0 );
128 actionTrash = a; 128 actionTrash = a;
129 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); 129 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
130 a->addTo( edit ); 130 a->addTo( edit );
131 a->addTo( listTools ); 131 a->addTo( listTools );
132 132
133 133
134 // make it possible to go directly to businesscard via qcop call 134 // make it possible to go directly to businesscard via qcop call
135 //#if defined(Q_WS_QWS) // Why this ? (se) 135 //#if defined(Q_WS_QWS) // Why this ? (se)
136#if !defined(QT_NO_COP) 136#if !defined(QT_NO_COP)
137 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); 137 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
138 connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)), 138 connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)),
139 this, SLOT ( appMessage(const QCString&,const QByteArray&) ) ); 139 this, SLOT ( appMessage(const QCString&,const QByteArray&) ) );
140#endif 140#endif
141 // #endif 141 // #endif
142 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), 142 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
143 QString::null, 0, this, 0 ); 143 QString::null, 0, this, 0 );
144 actionFind = a; 144 actionFind = a;
145 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); 145 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) );
146 a->addTo( edit ); 146 a->addTo( edit );
147 a->addTo( listTools ); 147 a->addTo( listTools );
148 148
149 // Much better search widget, taken from QTReader.. (se) 149 // Much better search widget, taken from QTReader.. (se)
150 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); 150 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE );
151 searchBar->setHorizontalStretchable( TRUE ); 151 searchBar->setHorizontalStretchable( TRUE );
152 searchBar->hide(); 152 searchBar->hide();
153 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 153 searchEdit = new QLineEdit( searchBar, "searchEdit" );
154 154
155 // QFont f("unifont", 16 /*, QFont::Bold*/); 155 // QFont f("unifont", 16 /*, QFont::Bold*/);
156 // searchEdit->setFont( f ); 156 // searchEdit->setFont( f );
157 157
158 searchBar->setStretchableWidget( searchEdit ); 158 searchBar->setStretchableWidget( searchEdit );
159 connect( searchEdit, SIGNAL( returnPressed() ), 159 connect( searchEdit, SIGNAL( returnPressed() ),
160 this, SLOT( slotFind() ) ); 160 this, SLOT( slotFind() ) );
161 161
162 a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); 162 a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 );
163 connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); 163 connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
164 a->addTo( searchBar ); 164 a->addTo( searchBar );
165 165
166 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 166 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
167 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) ); 167 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) );
168 a->addTo( searchBar ); 168 a->addTo( searchBar );
169 169
170 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ), 170 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ),
171 QString::null, 0, this, 0 ); 171 QString::null, 0, this, 0 );
172 //a->setEnabled( FALSE ); we got support for it now :) zecke 172 //a->setEnabled( FALSE ); we got support for it now :) zecke
173 actionMail = a; 173 actionMail = a;
174 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); 174 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
175 a->addTo( edit ); 175 a->addTo( edit );
176 a->addTo( listTools ); 176 a->addTo( listTools );
177 177
178 if ( Ir::supported() ) { 178 if ( Ir::supported() ) {
179 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, 179 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null,
180 0, this, 0 ); 180 0, this, 0 );
181 actionBeam = a; 181 actionBeam = a;
182 connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); 182 connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) );
183 a->addTo( edit ); 183 a->addTo( edit );
184 a->addTo( listTools ); 184 a->addTo( listTools );
185 } 185 }
186 186
187 edit->insertSeparator(); 187 edit->insertSeparator();
188 188
189 a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null, 189 a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null,
190 0, this, 0); 190 0, this, 0);
191 actionPersonal = a; 191 actionPersonal = a;
192 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); 192 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) );
193 a->addTo( edit ); 193 a->addTo( edit );
194 194
195 a = new QAction( tr("Export vCard"), Resource::loadPixmap( "addressbook/fileexport"), QString::null, 195 a = new QAction( tr("Export vCard"), Resource::loadPixmap( "addressbook/fileexport"), QString::null,
196 0, this, 0); 196 0, this, 0);
197 actionPersonal = a; 197 actionPersonal = a;
198 connect( a, SIGNAL( activated() ), this, SLOT( exportvCard() ) ); 198 connect( a, SIGNAL( activated() ), this, SLOT( exportvCard() ) );
199 a->addTo( edit ); 199 a->addTo( edit );
200 200
201 edit->insertSeparator(); 201 edit->insertSeparator();
202 202
203 a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ), 203 a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ),
204 QString::null, 0, this, 0 , TRUE ); 204 QString::null, 0, this, 0 , TRUE );
205 actionPersonal = a; 205 actionPersonal = a;
206 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); 206 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) );
207 a->addTo( edit ); 207 a->addTo( edit );
208 208
209 209
210#ifdef __DEBUG_RELEASE 210#ifdef __DEBUG_RELEASE
211 // Remove this function for public Release ! This is only 211 // Remove this function for public Release ! This is only
212 // for debug purposes .. 212 // for debug purposes ..
213 a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); 213 a = new QAction( tr( "Save all Data"), QString::null, 0, 0 );
214 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); 214 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) );
215 a->addTo( edit ); 215 a->addTo( edit );
216#endif 216#endif
217 a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 217 a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null,
218 0, this, 0 ); 218 0, this, 0 );
219 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); 219 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) );
220 a->addTo( edit ); 220 a->addTo( edit );
221 221
222 // Create Views 222 // Create Views
223 listContainer = new QWidget( this ); 223 listContainer = new QWidget( this );
224 QVBoxLayout *vb = new QVBoxLayout( listContainer ); 224 QVBoxLayout *vb = new QVBoxLayout( listContainer );
225 225
226 m_abView = new AbView( listContainer, m_config.orderList() ); 226 m_abView = new AbView( listContainer, m_config.orderList() );
227 vb->addWidget( m_abView ); 227 vb->addWidget( m_abView );
228 // abList->setHScrollBarMode( QScrollView::AlwaysOff ); 228 // abList->setHScrollBarMode( QScrollView::AlwaysOff );
229 connect( m_abView, SIGNAL( signalViewSwitched(int) ), 229 connect( m_abView, SIGNAL( signalViewSwitched(int) ),
230 this, SLOT( slotViewSwitched(int) ) ); 230 this, SLOT( slotViewSwitched(int) ) );
231 231
232 232
233 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); 233 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) );
234 234
235 // m_abView->load(); // Already done by c'tor . 235 // m_abView->load(); // Already done by c'tor .
236 236
237 // Letter Picker 237 // Letter Picker
238 pLabel = new LetterPicker( listContainer ); 238 pLabel = new LetterPicker( listContainer );
239 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); 239 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char)));
240 connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); 240 connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) );
241 241
242 vb->addWidget( pLabel ); 242 vb->addWidget( pLabel );
243 243
244 // All Categories into view-menu.. 244 // All Categories into view-menu..
245 populateCategories(); 245 populateCategories();
246 246
247 // Fontsize 247 // Fontsize
248 defaultFont = new QFont( m_abView->font() ); 248 defaultFont = new QFont( m_abView->font() );
249 slotSetFont(m_config.fontSize()); 249 slotSetFont(m_config.fontSize());
250 m_curFontSize = m_config.fontSize(); 250 m_curFontSize = m_config.fontSize();
251 251
252 setCentralWidget(listContainer); 252 setCentralWidget(listContainer);
253 253
254 //odebug << "adressbook contrsuction: t=" << t.elapsed() << oendl; 254 //odebug << "adressbook contrsuction: t=" << t.elapsed() << oendl;
255 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); 255 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
256 connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) ); 256 connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) );
257 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), 257 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),
258 this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); 258 this, SLOT( appMessage(const QCString&,const QByteArray&) ) );
259 259
260 260
261 isLoading = false; 261 isLoading = false;
262} 262}
263 263
264 264
265void AddressbookWindow::slotConfig() 265void AddressbookWindow::slotConfig()
266{ 266{
267 ConfigDlg* dlg = new ConfigDlg( this, "Config" ); 267 ConfigDlg* dlg = new ConfigDlg( this, "Config" );
268 dlg -> setConfig( m_config ); 268 dlg -> setConfig( m_config );
269 if ( QPEApplication::execDialog( dlg ) ) { 269 if ( QPEApplication::execDialog( dlg ) ) {
270 odebug << "Config Dialog accepted!" << oendl; 270 odebug << "Config Dialog accepted!" << oendl;
271 m_config = dlg -> getConfig(); 271 m_config = dlg -> getConfig();
272 if ( m_curFontSize != m_config.fontSize() ){ 272 if ( m_curFontSize != m_config.fontSize() ){
273 odebug << "Font was changed!" << oendl; 273 odebug << "Font was changed!" << oendl;
274 m_curFontSize = m_config.fontSize(); 274 m_curFontSize = m_config.fontSize();
275 emit slotSetFont( m_curFontSize ); 275 emit slotSetFont( m_curFontSize );
276 } 276 }
277 m_abView -> setListOrder( m_config.orderList() ); 277 m_abView -> setListOrder( m_config.orderList() );
278 } 278 }
279 279
280 delete dlg; 280 delete dlg;
281} 281}
282 282
283 283
284void AddressbookWindow::slotSetFont( int size ) 284void AddressbookWindow::slotSetFont( int size )
285{ 285{
286 odebug << "void AddressbookWindow::slotSetFont( " << size << " )" << oendl; 286 odebug << "void AddressbookWindow::slotSetFont( " << size << " )" << oendl;
287 287
288 if (size > 2 || size < 0) 288 if (size > 2 || size < 0)
289 size = 1; 289 size = 1;
290 290
291 m_config.setFontSize( size ); 291 m_config.setFontSize( size );
292 292
293 QFont *currentFont; 293 QFont *currentFont;
294 294
295 switch (size) { 295 switch (size) {
296 case 0: 296 case 0:
297 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); 297 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) );
298 currentFont = new QFont (m_abView->font()); 298 currentFont = new QFont (m_abView->font());
299 // abList->resizeRows(currentFont->pixelSize() + 7); :SX 299 // abList->resizeRows(currentFont->pixelSize() + 7); :SX
300 // abList->resizeRows(); 300 // abList->resizeRows();
301 break; 301 break;
302 case 1: 302 case 1:
303 m_abView->setFont( *defaultFont ); 303 m_abView->setFont( *defaultFont );
304 currentFont = new QFont (m_abView->font()); 304 currentFont = new QFont (m_abView->font());
305 // // abList->resizeRows(currentFont->pixelSize() + 7); 305 // // abList->resizeRows(currentFont->pixelSize() + 7);
306 // abList->resizeRows(); 306 // abList->resizeRows();
307 break; 307 break;
308 case 2: 308 case 2:
309 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); 309 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) );
310 currentFont = new QFont (m_abView->font()); 310 currentFont = new QFont (m_abView->font());
311 // //abList->resizeRows(currentFont->pixelSize() + 7); 311 // //abList->resizeRows(currentFont->pixelSize() + 7);
312 // abList->resizeRows(); 312 // abList->resizeRows();
313 break; 313 break;
314 } 314 }
315} 315}
316 316
317 317
318 318
319void AddressbookWindow::importvCard() { 319void AddressbookWindow::importvCard() {
320 QString str = Opie::Ui::OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); 320 QString str = Opie::Ui::OFileDialog::getOpenFileName( 1,"/");//,"", "*", this );
321 if(!str.isEmpty() ){ 321 if(!str.isEmpty() ){
322 setDocument((const QString&) str ); 322 setDocument((const QString&) str );
323 } 323 }
324 324
325} 325}
326void AddressbookWindow::exportvCard() 326void AddressbookWindow::exportvCard()
327{ 327{
328 odebug << "void AddressbookWindow::exportvCard()" << oendl; 328 odebug << "void AddressbookWindow::exportvCard()" << oendl;
329 QString filename = Opie::Ui::OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this ); 329 QString filename = Opie::Ui::OFileDialog::getSaveFileName( 1,"/home/"); //,"", "*", this );
330 if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){ 330 if( !filename.isEmpty() && ( filename[filename.length()-1] != '/' ) ){
331 odebug << " Save to file " << filename << ", (" << filename.length()-1 << ")" << oendl; 331 odebug << " Save to file " << filename << ", (" << filename.length()-1 << ")" << oendl;
332 Opie::OPimContact curCont = m_abView->currentEntry(); 332 Opie::OPimContact curCont = m_abView->currentEntry();
333 if ( !curCont.isEmpty() ){ 333 if ( !curCont.isEmpty() ){
334 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, 334 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
335 filename ); 335 filename );
336 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook_exp", QString::null , vcard_backend, true ); 336 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook_exp", QString::null , vcard_backend, true );
337 if ( access ){ 337 if ( access ){
338 access->add( curCont ); 338 access->add( curCont );
339 access->save(); 339 access->save();
340 } 340 }
341 delete access; 341 delete access;
342 }else 342 }else
343 QMessageBox::critical( 0, "Export VCard", 343 QMessageBox::critical( 0, "Export VCard",
344 QString( tr( "You have to select a contact !") ) ); 344 QString( tr( "You have to select a contact !") ) );
345 345
346 }else 346 }else
347 QMessageBox::critical( 0, "Export VCard", 347 QMessageBox::critical( 0, "Export VCard",
348 QString( tr( "You have to set a filename !") ) ); 348 QString( tr( "You have to set a filename !") ) );
349} 349}
350 350
351void AddressbookWindow::setDocument( const QString &filename ) 351void AddressbookWindow::setDocument( const QString &filename )
352{ 352{
353 odebug << "void AddressbookWindow::setDocument( " << filename << " )" << oendl; 353 odebug << "void AddressbookWindow::setDocument( " << filename << " )" << oendl;
354 354
355 // Switch to default backend. This should avoid to import into 355 // Switch to default backend. This should avoid to import into
356 // the personal database accidently. 356 // the personal database accidently.
357 if ( actionPersonal->isOn() ){ 357 if ( actionPersonal->isOn() ){
358 actionPersonal->setOn( false ); 358 actionPersonal->setOn( false );
359 slotPersonalView(); 359 slotPersonalView();
360 } 360 }
361 361
362 if ( filename.find(".vcf") != int(filename.length()) - 4 ){ 362 if ( filename.find(".vcf") != int(filename.length()) - 4 ){
363 363
364 364
365 365
366 switch( QMessageBox::information( this, tr ( "Right file type ?" ), 366 switch( QMessageBox::information( this, tr ( "Right file type ?" ),
367 tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ), 367 tr( "The selected file \n does not end with \".vcf\".\n Do you really want to open it?" ),
368 tr( "&Yes" ), tr( "&No" ), QString::null, 368 tr( "&Yes" ), tr( "&No" ), QString::null,
369 0, // Enter == button 0 369 0, // Enter == button 0
370 2 ) ) { // Escape == button 2 370 2 ) ) { // Escape == button 2
371 case 0: 371 case 0:
372 odebug << "YES clicked" << oendl; 372 odebug << "YES clicked" << oendl;
373 break; 373 break;
374 case 1: 374 case 1:
375 odebug << "NO clicked" << oendl; 375 odebug << "NO clicked" << oendl;
376 return; 376 return;
377 break; 377 break;
378 } 378 }
379 } 379 }
380 380
381 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, 381 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
382 filename ); 382 filename );
383 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); 383 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
384 Opie::OPimContactAccess::List allList = access->allRecords(); 384 Opie::OPimContactAccess::List allList = access->allRecords();
385 odebug << "Found number of contacts in File: " << allList.count() << oendl; 385 odebug << "Found number of contacts in File: " << allList.count() << oendl;
386 386
387 if ( !allList.count() ) { 387 if ( !allList.count() ) {
388 QMessageBox::information( this, "Import VCard", 388 QMessageBox::information( this, "Import VCard",
389 "It was impossible to import\nthe VCard.\n" 389 "It was impossible to import\nthe VCard.\n"
390 "The VCard may be corrupted!" ); 390 "The VCard may be corrupted!" );
391 } 391 }
392 392
393 bool doAsk = true; 393 bool doAsk = true;
394 Opie::OPimContactAccess::List::Iterator it; 394 Opie::OPimContactAccess::List::Iterator it;
395 for ( it = allList.begin(); it != allList.end(); ++it ){ 395 for ( it = allList.begin(); it != allList.end(); ++it ){
396 odebug << "Adding Contact from: " << (*it).fullName() << oendl; 396 odebug << "Adding Contact from: " << (*it).fullName() << oendl;
397 if ( doAsk ){ 397 if ( doAsk ){
398 switch( QMessageBox::information( this, tr ( "Add Contact?" ), 398 switch( QMessageBox::information( this, tr ( "Add Contact?" ),
399 tr( "Do you really want add contact for \n%1?" ) 399 tr( "Do you really want add contact for \n%1?" )
400 .arg( (*it).fullName().latin1() ), 400 .arg( (*it).fullName().latin1() ),
401 tr( "&Yes" ), tr( "&No" ), tr( "&All Yes"), 401 tr( "&Yes" ), tr( "&No" ), tr( "&All Yes"),
402 0, // Enter == button 0 402 0, // Enter == button 0
403 2 ) ) { // Escape == button 2 403 2 ) ) { // Escape == button 2
404 case 0: 404 case 0:
405 odebug << "YES clicked" << oendl; 405 odebug << "YES clicked" << oendl;
406 m_abView->addEntry( *it ); 406 m_abView->addEntry( *it );
407 break; 407 break;
408 case 1: 408 case 1:
409 odebug << "NO clicked" << oendl; 409 odebug << "NO clicked" << oendl;
410 break; 410 break;
411 case 2: 411 case 2:
412 odebug << "YesAll clicked" << oendl; 412 odebug << "YesAll clicked" << oendl;
413 doAsk = false; 413 doAsk = false;
414 break; 414 break;
415 } 415 }
416 }else 416 }else
417 m_abView->addEntry( *it ); 417 m_abView->addEntry( *it );
418 418
419 } 419 }
420 420
421 delete access; 421 delete access;
422} 422}
423 423
424void AddressbookWindow::resizeEvent( QResizeEvent *e ) 424void AddressbookWindow::resizeEvent( QResizeEvent *e )
425{ 425{
426 QMainWindow::resizeEvent( e ); 426 QMainWindow::resizeEvent( e );
427 427
428 428
429} 429}
430 430
431AddressbookWindow::~AddressbookWindow() 431AddressbookWindow::~AddressbookWindow()
432{ 432{
433 ToolBarDock dock; 433 ToolBarDock dock;
434 int dummy; 434 int dummy;
435 bool bDummy; 435 bool bDummy;
436 getLocation ( listTools, dock, dummy, bDummy, dummy ); 436 getLocation ( listTools, dock, dummy, bDummy, dummy );
437 m_config.setToolBarDock( dock ); 437 m_config.setToolBarDock( dock );
438 m_config.save(); 438 m_config.save();
439} 439}
440 440
441void AddressbookWindow::slotUpdateToolbar() 441void AddressbookWindow::slotUpdateToolbar()
442{ 442{
443 Opie::OPimContact ce = m_abView->currentEntry(); 443 Opie::OPimContact ce = m_abView->currentEntry();
444 actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); 444 actionMail->setEnabled( !ce.defaultEmail().isEmpty() );
445} 445}
446 446
447void AddressbookWindow::slotListNew() 447void AddressbookWindow::slotListNew()
448{ 448{
449 Opie::OPimContact cnt; 449 Opie::OPimContact cnt;
450 if( !syncing ) { 450 if( !syncing ) {
451 editEntry( NewEntry ); 451 editEntry( NewEntry );
452 } else { 452 } else {
453 QMessageBox::warning(this, tr("Contacts"), 453 QMessageBox::warning(this, tr("Contacts"),
454 tr("Can not edit data, currently syncing")); 454 tr("Can not edit data, currently syncing"));
455 } 455 }
456} 456}
457 457
458// void AddressbookWindow::slotListView() 458// void AddressbookWindow::slotListView()
459// { 459// {
460 // m_abView -> init( abList->currentEntry() ); 460 // m_abView -> init( abList->currentEntry() );
461 // // :SX mView->sync(); 461 // // :SX mView->sync();
462 // //:SXshowView(); 462 // //:SXshowView();
463// } 463// }
464 464
465void AddressbookWindow::slotListDelete() 465void AddressbookWindow::slotListDelete()
466{ 466{
467 if(!syncing) { 467 if(!syncing) {
468 Opie::OPimContact tmpEntry = m_abView ->currentEntry(); 468 Opie::OPimContact tmpEntry = m_abView ->currentEntry();
469 469
470 // get a name, do the best we can... 470 // get a name, do the best we can...
471 QString strName = tmpEntry.fullName(); 471 QString strName = tmpEntry.fullName();
472 if ( strName.isEmpty() ) { 472 if ( strName.isEmpty() ) {
473 strName = tmpEntry.company(); 473 strName = tmpEntry.company();
474 if ( strName.isEmpty() ) 474 if ( strName.isEmpty() )
475 strName = "No Name"; 475 strName = "No Name";
476 } 476 }
477 477
478 478
479 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ), 479 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ),
480 strName ) ) { 480 strName ) ) {
481 m_abView->removeEntry( tmpEntry.uid() ); 481 m_abView->removeEntry( tmpEntry.uid() );
482 } 482 }
483 } else { 483 } else {
484 QMessageBox::warning( this, tr("Contacts"), 484 QMessageBox::warning( this, tr("Contacts"),
485 tr("Can not edit data, currently syncing") ); 485 tr("Can not edit data, currently syncing") );
486 } 486 }
487} 487}
488 488
489void AddressbookWindow::slotFindOpen() 489void AddressbookWindow::slotFindOpen()
490{ 490{
491 searchBar->show(); 491 searchBar->show();
492 m_abView -> inSearch(); 492 m_abView -> inSearch();
493 searchEdit->setFocus(); 493 searchEdit->setFocus();
494} 494}
495void AddressbookWindow::slotFindClose() 495void AddressbookWindow::slotFindClose()
496{ 496{
497 searchBar->hide(); 497 searchBar->hide();
498 m_abView -> offSearch(); 498 m_abView -> offSearch();
499 // m_abView->setFocus(); 499 // m_abView->setFocus();
500} 500}
501 501
502 502
503void AddressbookWindow::slotFind() 503void AddressbookWindow::slotFind()
504{ 504{
505 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false); 505 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false);
506 506
507 searchEdit->clearFocus(); 507 searchEdit->clearFocus();
508 // m_abView->setFocus(); 508 // m_abView->setFocus();
509 509
510} 510}
511 511
512void AddressbookWindow::slotViewBack() 512void AddressbookWindow::slotViewBack()
513{ 513{
514 // :SX showList(); 514 // :SX showList();
515} 515}
516 516
517void AddressbookWindow::slotViewEdit() 517void AddressbookWindow::slotViewEdit()
518{ 518{
519 if(!syncing) { 519 if(!syncing) {
520 if (actionPersonal->isOn()) { 520 if (actionPersonal->isOn()) {
521 editPersonal(); 521 editPersonal();
522 } else { 522 } else {
523 editEntry( EditEntry ); 523 editEntry( EditEntry );
524 } 524 }
525 } else { 525 } else {
526 QMessageBox::warning( this, tr("Contacts"), 526 QMessageBox::warning( this, tr("Contacts"),
527 tr("Can not edit data, currently syncing") ); 527 tr("Can not edit data, currently syncing") );
528 } 528 }
529} 529}
530 530
531 531
532 532
533void AddressbookWindow::writeMail() 533void AddressbookWindow::writeMail()
534{ 534{
535 Opie::OPimContact c = m_abView -> currentEntry(); 535 Opie::OPimContact c = m_abView -> currentEntry();
536 QString name = c.fileAs(); 536 QString name = c.fileAs();
537 QString email = c.defaultEmail(); 537 QString email = c.defaultEmail();
538 538
539 // I prefer the OPIE-Environment variable before the 539 // I prefer the OPIE-Environment variable before the
540 // QPE-one.. 540 // QPE-one..
541 QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); 541 QString basepath = QString::fromLatin1( getenv("OPIEDIR") );
542 if ( basepath.isEmpty() ) 542 if ( basepath.isEmpty() )
543 basepath = QString::fromLatin1( getenv("QPEDIR") ); 543 basepath = QString::fromLatin1( getenv("QPEDIR") );
544 544
545 // Try to access the preferred. If not possible, try to 545 // Try to access the preferred. If not possible, try to
546 // switch to the other one.. 546 // switch to the other one..
547 if ( m_config.useQtMail() ){ 547 if ( m_config.useQtMail() ){
548 odebug << "Accessing: " << (basepath + "/bin/qtmail") << oendl; 548 odebug << "Accessing: " << (basepath + "/bin/qtmail") << oendl;
549 if ( QFile::exists( basepath + "/bin/qtmail" ) ){ 549 if ( QFile::exists( basepath + "/bin/qtmail" ) ){
550 odebug << "QCop" << oendl; 550 odebug << "QCop" << oendl;
551 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); 551 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)");
552 e << name << email; 552 e << name << email;
553 return; 553 return;
554 } else 554 } else
555 m_config.setUseOpieMail( true ); 555 m_config.setUseOpieMail( true );
556 } 556 }
557 if ( m_config.useOpieMail() ){ 557 if ( m_config.useOpieMail() ){
558 odebug << "Accessing: " << (basepath + "/bin/opiemail") << oendl; 558 odebug << "Accessing: " << (basepath + "/bin/opiemail") << oendl;
559 if ( QFile::exists( basepath + "/bin/opiemail" ) ){ 559 if ( QFile::exists( basepath + "/bin/opiemail" ) ){
560 odebug << "QCop" << oendl; 560 odebug << "QCop" << oendl;
561 QCopEnvelope e("QPE/Application/opiemail", "writeMail(QString,QString)"); 561 QCopEnvelope e("QPE/Application/opiemail", "writeMail(QString,QString)");
562 e << name << email; 562 e << name << email;
563 return; 563 return;
564 } else 564 } else
565 m_config.setUseQtMail( true ); 565 m_config.setUseQtMail( true );
566 } 566 }
567 567
568} 568}
569 569
570static const char * beamfile = "/tmp/obex/contact.vcf"; 570static const char * beamfile = "/tmp/obex/contact.vcf";
571 571
572void AddressbookWindow::slotBeam() 572void AddressbookWindow::slotBeam()
573{ 573{
574 QString beamFilename; 574 QString beamFilename;
575 Opie::OPimContact c; 575 Opie::OPimContact c;
576 if ( actionPersonal->isOn() ) { 576 if ( actionPersonal->isOn() ) {
577 beamFilename = addressbookPersonalVCardName(); 577 beamFilename = addressbookPersonalVCardName();
578 if ( !QFile::exists( beamFilename ) ) 578 if ( !QFile::exists( beamFilename ) )
579 return; // can't beam a non-existent file 579 return; // can't beam a non-existent file
580 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, 580 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
581 beamFilename ); 581 beamFilename );
582 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); 582 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
583 Opie::OPimContactAccess::List allList = access->allRecords(); 583 Opie::OPimContactAccess::List allList = access->allRecords();
584 Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first 584 Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first
585 c = *it; 585 c = *it;
586 586
587 delete access; 587 delete access;
588 } else { 588 } else {
589 unlink( beamfile ); // delete if exists 589 unlink( beamfile ); // delete if exists
590 mkdir("/tmp/obex/", 0755); 590 mkdir("/tmp/obex/", 0755);
591 c = m_abView -> currentEntry(); 591 c = m_abView -> currentEntry();
592 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, 592 Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null,
593 beamfile ); 593 beamfile );
594 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); 594 Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true );
595 access->add( c ); 595 access->add( c );
596 access->save(); 596 access->save();
597 delete access; 597 delete access;
598 598
599 beamFilename = beamfile; 599 beamFilename = beamfile;
600 } 600 }
601 601
602 odebug << "Beaming: " << beamFilename << oendl; 602 odebug << "Beaming: " << beamFilename << oendl;
603 603
604 Ir *ir = new Ir( this ); 604 Ir *ir = new Ir( this );
605 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 605 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
606 QString description = c.fullName(); 606 QString description = c.fullName();
607 ir->send( beamFilename, description, "text/x-vCard" ); 607 ir->send( beamFilename, description, "text/x-vCard" );
608} 608}
609 609
610void AddressbookWindow::beamDone( Ir *ir ) 610void AddressbookWindow::beamDone( Ir *ir )
611{ 611{
612 612
613 delete ir; 613 delete ir;
614 unlink( beamfile ); 614 unlink( beamfile );
615} 615}
616 616
617 617
618static void parseName( const QString& name, QString *first, QString *middle, 618static void parseName( const QString& name, QString *first, QString *middle,
619 QString * last ) 619 QString * last )
620{ 620{
621 621
622 int comma = name.find ( "," ); 622 int comma = name.find ( "," );
623 QString rest; 623 QString rest;
624 if ( comma > 0 ) { 624 if ( comma > 0 ) {
625 *last = name.left( comma ); 625 *last = name.left( comma );
626 comma++; 626 comma++;
627 while ( comma < int(name.length()) && name[comma] == ' ' ) 627 while ( comma < int(name.length()) && name[comma] == ' ' )
628 comma++; 628 comma++;
629 rest = name.mid( comma ); 629 rest = name.mid( comma );
630 } else { 630 } else {
631 int space = name.findRev( ' ' ); 631 int space = name.findRev( ' ' );
632 *last = name.mid( space+1 ); 632 *last = name.mid( space+1 );
633 rest = name.left( space ); 633 rest = name.left( space );
634 } 634 }
635 int space = rest.find( ' ' ); 635 int space = rest.find( ' ' );
636 if ( space <= 0 ) { 636 if ( space <= 0 ) {
637 *first = rest; 637 *first = rest;
638 } else { 638 } else {
639 *first = rest.left( space ); 639 *first = rest.left( space );
640 *middle = rest.mid( space+1 ); 640 *middle = rest.mid( space+1 );
641 } 641 }
642 642
643} 643}
644 644
645 645
646void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) 646void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
647{ 647{
648 bool needShow = FALSE; 648 bool needShow = FALSE;
649 odebug << "Receiving QCop-Call with message " << msg << oendl; 649 odebug << "Receiving QCop-Call with message " << msg << oendl;
650 650
651 651
652 if (msg == "editPersonal()") { 652 if (msg == "editPersonal()") {
653 editPersonal(); 653 editPersonal();
654 } else if (msg == "editPersonalAndClose()") { 654 } else if (msg == "editPersonalAndClose()") {
655 editPersonal(); 655 editPersonal();
656 close(); 656 close();
657 } else if ( msg == "addContact(QString,QString)" ) { 657 } else if ( msg == "addContact(QString,QString)" ) {
658 QDataStream stream(data,IO_ReadOnly); 658 QDataStream stream(data,IO_ReadOnly);
659 QString name, email; 659 QString name, email;
660 stream >> name >> email; 660 stream >> name >> email;
661 661
662 Opie::OPimContact cnt; 662 Opie::OPimContact cnt;
663 QString fn, mn, ln; 663 QString fn, mn, ln;
664 parseName( name, &fn, &mn, &ln ); 664 parseName( name, &fn, &mn, &ln );
665 //odebug << " " << fn << " - " << mn " - " << ln << oendl; 665 //odebug << " " << fn << " - " << mn " - " << ln << oendl;
666 cnt.setFirstName( fn ); 666 cnt.setFirstName( fn );
667 cnt.setMiddleName( mn ); 667 cnt.setMiddleName( mn );
668 cnt.setLastName( ln ); 668 cnt.setLastName( ln );
669 cnt.insertEmails( email ); 669 cnt.insertEmails( email );
670 cnt.setDefaultEmail( email ); 670 cnt.setDefaultEmail( email );
671 cnt.setFileAs(); 671 cnt.setFileAs();
672 672
673 m_abView -> addEntry( cnt ); 673 m_abView -> addEntry( cnt );
674 674
675 // :SXm_abView()->init( cnt ); 675 // :SXm_abView()->init( cnt );
676 editEntry( EditEntry ); 676 editEntry( EditEntry );
677 } else if ( msg == "beamBusinessCard()" ) { 677 } else if ( msg == "beamBusinessCard()" ) {
678 QString beamFilename = addressbookPersonalVCardName(); 678 QString beamFilename = addressbookPersonalVCardName();
679 if ( !QFile::exists( beamFilename ) ) 679 if ( !QFile::exists( beamFilename ) )
680 return; // can't beam a non-existent file 680 return; // can't beam a non-existent file
681 681
682 Ir *ir = new Ir( this ); 682 Ir *ir = new Ir( this );
683 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 683 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
684 QString description = "mycard.vcf"; 684 QString description = "mycard.vcf";
685 ir->send( beamFilename, description, "text/x-vCard" ); 685 ir->send( beamFilename, description, "text/x-vCard" );
686 } else if ( msg == "show(int)" ) { 686 } else if ( msg == "show(int)" ) {
687 raise(); 687 raise();
688 QDataStream stream(data,IO_ReadOnly); 688 QDataStream stream(data,IO_ReadOnly);
689 int uid; 689 int uid;
690 stream >> uid; 690 stream >> uid;
691 691
692 odebug << "Showing uid: " << uid << oendl; 692 odebug << "Showing uid: " << uid << oendl;
693 693
694 // Deactivate Personal View.. 694 // Deactivate Personal View..
695 if ( actionPersonal->isOn() ){ 695 if ( actionPersonal->isOn() ){
696 actionPersonal->setOn( false ); 696 actionPersonal->setOn( false );
697 slotPersonalView(); 697 slotPersonalView();
698 } 698 }
699 699
700 // Reset category and show as card.. 700 // Reset category and show as card..
701 m_abView -> setShowByCategory( QString::null ); 701 m_abView -> setShowByCategory( QString::null );
702 m_abView -> setCurrentUid( uid ); 702 m_abView -> setCurrentUid( uid );
703 slotViewSwitched ( AbView::CardView ); 703 slotViewSwitched ( AbView::CardView );
704 704
705 needShow = true; 705 needShow = true;
706 706
707 707
708 } else if ( msg == "edit(int)" ) { 708 } else if ( msg == "edit(int)" ) {
709 QDataStream stream(data,IO_ReadOnly); 709 QDataStream stream(data,IO_ReadOnly);
710 int uid; 710 int uid;
711 stream >> uid; 711 stream >> uid;
712 712
713 // Deactivate Personal View.. 713 // Deactivate Personal View..
714 if ( actionPersonal->isOn() ){ 714 if ( actionPersonal->isOn() ){
715 actionPersonal->setOn( false ); 715 actionPersonal->setOn( false );
716 slotPersonalView(); 716 slotPersonalView();
717 } 717 }
718 718
719 // Reset category and edit.. 719 // Reset category and edit..
720 m_abView -> setShowByCategory( QString::null ); 720 m_abView -> setShowByCategory( QString::null );
721 m_abView -> setCurrentUid( uid ); 721 m_abView -> setCurrentUid( uid );
722 slotViewEdit(); 722 slotViewEdit();
723 } 723 }
724 724
725 if (needShow) 725 if (needShow)
726 QPEApplication::setKeepRunning(); 726 QPEApplication::setKeepRunning();
727 727
728} 728}
729 729
730void AddressbookWindow::editEntry( EntryMode entryMode ) 730void AddressbookWindow::editEntry( EntryMode entryMode )
731{ 731{
732 Opie::OPimContact entry; 732 Opie::OPimContact entry;
733 if ( !abEditor ) { 733 if ( !abEditor ) {
734 abEditor = new ContactEditor( entry, this, "editor" ); 734 abEditor = new ContactEditor( entry, this, "editor" );
735 } 735 }
736 if ( entryMode == EditEntry ) 736 if ( entryMode == EditEntry )
737 abEditor->setEntry( m_abView -> currentEntry() ); 737 abEditor->setEntry( m_abView -> currentEntry() );
738 else if ( entryMode == NewEntry ) 738 else if ( entryMode == NewEntry )
739 abEditor->setEntry( entry ); 739 abEditor->setEntry( entry );
740 // other things may change the caption. 740 // other things may change the caption.
741 abEditor->setCaption( tr("Edit Address") ); 741 abEditor->setCaption( tr("Edit Address") );
742 742
743 // fix the foxus... 743 // fix the foxus...
744 abEditor->setNameFocus(); 744 abEditor->setNameFocus();
745 if ( QPEApplication::execDialog( abEditor ) ) { 745 if ( QPEApplication::execDialog( abEditor ) ) {
746 setFocus(); 746 setFocus();
747 if ( entryMode == NewEntry ) { 747 if ( entryMode == NewEntry ) {
748 Opie::OPimContact insertEntry = abEditor->entry(); 748 Opie::OPimContact insertEntry = abEditor->entry();
749 insertEntry.assignUid(); 749 insertEntry.assignUid();
750 m_abView -> addEntry( insertEntry ); 750 m_abView -> addEntry( insertEntry );
751 m_abView -> setCurrentUid( insertEntry.uid() ); 751 m_abView -> setCurrentUid( insertEntry.uid() );
752 } else { 752 } else {
753 Opie::OPimContact replEntry = abEditor->entry(); 753 Opie::OPimContact replEntry = abEditor->entry();
754 754
755 if ( !replEntry.isValidUid() ) 755 if ( !replEntry.isValidUid() )
756 replEntry.assignUid(); 756 replEntry.assignUid();
757 757
758 m_abView -> replaceEntry( replEntry ); 758 m_abView -> replaceEntry( replEntry );
759 } 759 }
760 } 760 }
761 // populateCategories(); 761 // populateCategories();
762 762
763} 763}
764 764
765void AddressbookWindow::editPersonal() 765void AddressbookWindow::editPersonal()
766{ 766{
767 Opie::OPimContact entry; 767 Opie::OPimContact entry;
768 768
769 // Switch to personal view if not selected 769 // Switch to personal view if not selected
770 // but take care of the menu, too 770 // but take care of the menu, too
771 if ( ! actionPersonal->isOn() ){ 771 if ( ! actionPersonal->isOn() ){
772 odebug << "*** ++++" << oendl; 772 odebug << "*** ++++" << oendl;
773 actionPersonal->setOn( true ); 773 actionPersonal->setOn( true );
774 slotPersonalView(); 774 slotPersonalView();
775 } 775 }
776 776
777 if ( !abEditor ) { 777 if ( !abEditor ) {
778 abEditor = new ContactEditor( entry, this, "editor" ); 778 abEditor = new ContactEditor( entry, this, "editor" );
779 } 779 }
780 780
781 abEditor->setCaption(tr("Edit My Personal Details")); 781 abEditor->setCaption(tr("Edit My Personal Details"));
782 abEditor->setPersonalView( true ); 782 abEditor->setPersonalView( true );
783 editEntry( EditEntry ); 783 editEntry( EditEntry );
784 abEditor->setPersonalView( false ); 784 abEditor->setPersonalView( false );
785 785
786} 786}
787 787
788 788
789void AddressbookWindow::slotPersonalView() 789void AddressbookWindow::slotPersonalView()
790{ 790{
791 odebug << "slotPersonalView()" << oendl; 791 odebug << "slotPersonalView()" << oendl;
792 if (!actionPersonal->isOn()) { 792 if (!actionPersonal->isOn()) {
793 // we just turned it off 793 // we just turned it off
794 odebug << "slotPersonalView()-> OFF" << oendl; 794 odebug << "slotPersonalView()-> OFF" << oendl;
795 setCaption( tr("Contacts") ); 795 setCaption( tr("Contacts") );
796 actionNew->setEnabled(TRUE); 796 actionNew->setEnabled(TRUE);
797 actionTrash->setEnabled(TRUE); 797 actionTrash->setEnabled(TRUE);
798 actionFind->setEnabled(TRUE); 798 actionFind->setEnabled(TRUE);
799 actionMail->setEnabled(TRUE); 799 actionMail->setEnabled(TRUE);
800 // slotUpdateToolbar(); 800 // slotUpdateToolbar();
801 801
802 m_abView->showPersonal( false ); 802 m_abView->showPersonal( false );
803 803
804 return; 804 return;
805 } 805 }
806 806
807 odebug << "slotPersonalView()-> ON" << oendl; 807 odebug << "slotPersonalView()-> ON" << oendl;
808 // XXX need to disable some QActions. 808 // XXX need to disable some QActions.
809 actionNew->setEnabled(FALSE); 809 actionNew->setEnabled(FALSE);
810 actionTrash->setEnabled(FALSE); 810 actionTrash->setEnabled(FALSE);
811 actionFind->setEnabled(FALSE); 811 actionFind->setEnabled(FALSE);
812 actionMail->setEnabled(FALSE); 812 actionMail->setEnabled(FALSE);
813 813
814 setCaption( tr("Contacts - My Personal Details") ); 814 setCaption( tr("Contacts - My Personal Details") );
815 815
816 m_abView->showPersonal( true ); 816 m_abView->showPersonal( true );
817 817
818} 818}
819 819
820 820
821void AddressbookWindow::listIsEmpty( bool empty ) 821void AddressbookWindow::listIsEmpty( bool empty )
822{ 822{
823 if ( !empty ) { 823 if ( !empty ) {
824 deleteButton->setEnabled( TRUE ); 824 deleteButton->setEnabled( TRUE );
825 } 825 }
826} 826}
827 827
828void AddressbookWindow::reload() 828void AddressbookWindow::reload()
829{ 829{
830 syncing = FALSE; 830 syncing = FALSE;
831 m_abView->clear(); 831 m_abView->clear();
832 m_abView->reload(); 832 m_abView->reload();
833} 833}
834 834
835void AddressbookWindow::flush() 835void AddressbookWindow::flush()
836{ 836{
837 syncing = TRUE; 837 syncing = TRUE;
838 m_abView->save(); 838 m_abView->save();
839} 839}
840 840
841 841
842void AddressbookWindow::closeEvent( QCloseEvent *e ) 842void AddressbookWindow::closeEvent( QCloseEvent *e )
843{ 843{
844 if(active_view == AbView::CardView){ 844 if(active_view == AbView::CardView){
845 slotViewSwitched( AbView::TableView ); 845 slotViewSwitched( AbView::TableView );
846 e->ignore(); 846 e->ignore();
847 return; 847 return;
848 } 848 }
849 if(syncing) { 849 if(syncing) {
850 /* shouldn't we save, I hear you say? well its already been set 850 /* shouldn't we save, I hear you say? well its already been set
851 so that an edit can not occur during a sync, and we flushed 851 so that an edit can not occur during a sync, and we flushed
852 at the start of the sync, so there is no need to save 852 at the start of the sync, so there is no need to save
853 Saving however itself would cause problems. */ 853 Saving however itself would cause problems. */
854 e->accept(); 854 e->accept();
855 return; 855 return;
856 } 856 }
857 //################## shouldn't always save 857 //################## shouldn't always save
858 // True, but the database handles this automatically ! (se) 858 // True, but the database handles this automatically ! (se)
859 if ( save() ) 859 if ( save() )
860 e->accept(); 860 e->accept();
861 else 861 else
862 e->ignore(); 862 e->ignore();
863} 863}
864 864
865/* 865/*
866 Returns TRUE if it is OK to exit 866 Returns TRUE if it is OK to exit
867*/ 867*/
868 868
869bool AddressbookWindow::save() 869bool AddressbookWindow::save()
870{ 870{
871 if ( !m_abView->save() ) { 871 if ( !m_abView->save() ) {
872 if ( QMessageBox::critical( 0, tr( "Out of space" ), 872 if ( QMessageBox::critical( 0, tr( "Out of space" ),
873 tr("Unable to save information.\n" 873 tr("Unable to save information.\n"
874 "Free up some space\n" 874 "Free up some space\n"
875 "and try again.\n" 875 "and try again.\n"
876 "\nQuit anyway?"), 876 "\nQuit anyway?"),
877 QMessageBox::Yes|QMessageBox::Escape, 877 QMessageBox::Yes|QMessageBox::Escape,
878 QMessageBox::No|QMessageBox::Default ) 878 QMessageBox::No|QMessageBox::Default )
879 != QMessageBox::No ) 879 != QMessageBox::No )
880 return TRUE; 880 return TRUE;
881 else 881 else
882 return FALSE; 882 return FALSE;
883 } 883 }
884 return TRUE; 884 return TRUE;
885} 885}
886 886
887#ifdef __DEBUG_RELEASE 887#ifdef __DEBUG_RELEASE
888void AddressbookWindow::slotSave() 888void AddressbookWindow::slotSave()
889{ 889{
890 save(); 890 save();
891} 891}
892#endif 892#endif
893 893
894 894
895void AddressbookWindow::slotNotFound() 895void AddressbookWindow::slotNotFound()
896{ 896{
897 odebug << "Got not found signal!" << oendl; 897 odebug << "Got not found signal!" << oendl;
898 QMessageBox::information( this, tr( "Not Found" ), 898 QMessageBox::information( this, tr( "Not Found" ),
899 "<qt>" + tr( "Unable to find a contact for this search pattern!" ) + "</qt>" ); 899 "<qt>" + tr( "Unable to find a contact for this search pattern!" ) + "</qt>" );
900 900
901 901
902} 902}
903void AddressbookWindow::slotWrapAround() 903void AddressbookWindow::slotWrapAround()
904{ 904{
905 odebug << "Got wrap signal!" << oendl; 905 odebug << "Got wrap signal!" << oendl;
906 // if ( doNotifyWrapAround ) 906 // if ( doNotifyWrapAround )
907 // QMessageBox::information( this, tr( "End of list" ), 907 // QMessageBox::information( this, tr( "End of list" ),
908 // tr( "End of list. Wrap around now...!" ) + "\n" ); 908 // tr( "End of list. Wrap around now...!" ) + "\n" );
909 909
910} 910}
911 911
912void AddressbookWindow::slotSetCategory( int c ) 912void AddressbookWindow::slotSetCategory( int c )
913{ 913{
914 odebug << "void AddressbookWindow::slotSetCategory( " << c << " ) from " 914 odebug << "void AddressbookWindow::slotSetCategory( " << c << " ) from "
915 << catMenu->count() << oendl; 915 << catMenu->count() << oendl;
916 916
917 QString cat, book; 917 QString cat, book;
918 AbView::Views view = AbView::TableView; 918 AbView::Views view = AbView::TableView;
919 919
920 if ( c <= 0 ) 920 if ( c <= 0 )
921 return; 921 return;
922 922
923 // Switch view 923 // Switch view
924 if ( c < 3 ) 924 if ( c < 3 )
925 for ( unsigned int i = 1; i < 3; i++ ){ 925 for ( unsigned int i = 1; i < 3; i++ ){
926 if ( catMenu ) 926 if ( catMenu )
927 catMenu->setItemChecked( i, c == (int)i ); 927 catMenu->setItemChecked( i, c == (int)i );
928 } 928 }
929 else 929 else
930 // Checkmark Category Menu Item Selected 930 // Checkmark Category Menu Item Selected
931 for ( unsigned int i = 3; i < catMenu->count(); i++ ) 931 for ( unsigned int i = 3; i < catMenu->count(); i++ )
932 catMenu->setItemChecked( i, c == (int)i ); 932 catMenu->setItemChecked( i, c == (int)i );
933 933
934 // Now switch to the selected category 934 // Now switch to the selected category
935 for ( unsigned int i = 1; i < catMenu->count(); i++ ) { 935 for ( unsigned int i = 1; i < catMenu->count(); i++ ) {
936 if (catMenu->isItemChecked( i )) { 936 if (catMenu->isItemChecked( i )) {
937 if ( i == 1 ){ // default List view 937 if ( i == 1 ){ // default List view
938 book = QString::null; 938 book = QString::null;
939 view = AbView::TableView; 939 view = AbView::TableView;
940 }else if ( i == 2 ){ 940 }else if ( i == 2 ){
941 book = tr( "Cards" ); 941 book = tr( "Cards" );
942 view = AbView::CardView; 942 view = AbView::CardView;
943 // }else if ( i == 3 ){ 943 // }else if ( i == 3 ){
944 // book = tr( "Personal" ); 944 // book = tr( "Personal" );
945 // view = AbView:: PersonalView; 945 // view = AbView:: PersonalView;
946 }else if ( i == 3 ){ // default All Categories 946 }else if ( i == 3 ){ // default All Categories
947 cat = QString::null; 947 cat = QString::null;
948 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled 948 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled
949 cat = "Unfiled"; 949 cat = "Unfiled";
950 odebug << "Unfiled selected!" << oendl; 950 odebug << "Unfiled selected!" << oendl;
951 }else{ 951 }else{
952 cat = m_abView->categories()[i - 4]; 952 cat = m_abView->categories()[i - 4];
953 } 953 }
954 } 954 }
955 } 955 }
956 956
957 // Switch to the selected View 957 // Switch to the selected View
958 slotViewSwitched( view ); 958 slotViewSwitched( view );
959 959
960 // Tell the view about the selected category 960 // Tell the view about the selected category
961 m_abView -> setShowByCategory( cat ); 961 m_abView -> setShowByCategory( cat );
962 962
963 if ( book.isEmpty() ) 963 if ( book.isEmpty() )
964 book = "List"; 964 book = "List";
965 if ( cat.isEmpty() ) 965 if ( cat.isEmpty() )
966 cat = "All"; 966 cat = "All";
967 967
968 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); 968 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) );
969} 969}
970 970
971void AddressbookWindow::slotViewSwitched( int view ) 971void AddressbookWindow::slotViewSwitched( int view )
972{ 972{
973 odebug << "void AddressbookWindow::slotViewSwitched( " << view << " )" << oendl; 973 odebug << "void AddressbookWindow::slotViewSwitched( " << view << " )" << oendl;
974 int menu = 0; 974 int menu = 0;
975 975
976 // Switch to selected view 976 // Switch to selected view
977 switch ( view ){ 977 switch ( view ){
978 case AbView::TableView: 978 case AbView::TableView:
979 menu = 1; 979 menu = 1;
980 m_tableViewButton->setOn(true); 980 m_tableViewButton->setOn(true);
981 m_cardViewButton->setOn(false); 981 m_cardViewButton->setOn(false);
982 break; 982 break;
983 case AbView::CardView: 983 case AbView::CardView:
984 menu = 2; 984 menu = 2;
985 m_tableViewButton->setOn(false); 985 m_tableViewButton->setOn(false);
986 m_cardViewButton->setOn(true); 986 m_cardViewButton->setOn(true);
987 break; 987 break;
988 } 988 }
989 for ( unsigned int i = 1; i < 3; i++ ){ 989 for ( unsigned int i = 1; i < 3; i++ ){
990 if ( catMenu ) 990 if ( catMenu )
991 catMenu->setItemChecked( i, menu == (int)i ); 991 catMenu->setItemChecked( i, menu == (int)i );
992 } 992 }
993 993
994 // Tell the view about the selected view 994 // Tell the view about the selected view
995 m_abView -> setShowToView ( (AbView::Views) view ); 995 m_abView -> setShowToView ( (AbView::Views) view );
996 active_view = view; 996 active_view = view;
997} 997}
998 998
999 999
1000void AddressbookWindow::slotListView() 1000void AddressbookWindow::slotListView()
1001{ 1001{
1002 slotViewSwitched( AbView::TableView ); 1002 slotViewSwitched( AbView::TableView );
1003} 1003}
1004 1004
1005void AddressbookWindow::slotCardView() 1005void AddressbookWindow::slotCardView()
1006{ 1006{
1007 slotViewSwitched( AbView::CardView ); 1007 slotViewSwitched( AbView::CardView );
1008} 1008}
1009 1009
1010void AddressbookWindow::slotSetLetter( char c ) { 1010void AddressbookWindow::slotSetLetter( char c ) {
1011 1011
1012 m_abView->setShowByLetter( c, m_config.letterPickerSearch() ); 1012 m_abView->setShowByLetter( c, m_config.letterPickerSearch() );
1013 1013
1014} 1014}
1015 1015
1016 1016
1017void AddressbookWindow::populateCategories() 1017void AddressbookWindow::populateCategories()
1018{ 1018{
1019 catMenu->clear(); 1019 catMenu->clear();
1020 1020
1021 int id, rememberId; 1021 int id, rememberId;
1022 id = 1; 1022 id = 1;
1023 rememberId = 0; 1023 rememberId = 0;
1024 1024
1025 catMenu->insertItem( Resource::loadPixmap( "addressbook/listview" ), tr( "List" ), id++ ); 1025 catMenu->insertItem( Resource::loadPixmap( "addressbook/listview" ), tr( "List" ), id++ );
1026 catMenu->insertItem( Resource::loadPixmap( "addressbook/cardview" ), tr( "Cards" ), id++ ); 1026 catMenu->insertItem( Resource::loadPixmap( "addressbook/cardview" ), tr( "Cards" ), id++ );
1027 // catMenu->insertItem( tr( "Personal" ), id++ ); 1027 // catMenu->insertItem( tr( "Personal" ), id++ );
1028 catMenu->insertSeparator(); 1028 catMenu->insertSeparator();
1029 1029
1030 catMenu->insertItem( tr( "All" ), id++ ); 1030 catMenu->insertItem( tr( "All" ), id++ );
1031 QStringList categories = m_abView->categories(); 1031 QStringList categories = m_abView->categories();
1032 categories.append( tr( "Unfiled" ) ); 1032 categories.append( tr( "Unfiled" ) );
1033 for ( QStringList::Iterator it = categories.begin(); 1033 for ( QStringList::Iterator it = categories.begin();
1034 it != categories.end(); ++it ) { 1034 it != categories.end(); ++it ) {
1035 catMenu->insertItem( *it, id ); 1035 catMenu->insertItem( *it, id );
1036 if ( *it == m_abView -> showCategory() ) 1036 if ( *it == m_abView -> showCategory() )
1037 rememberId = id; 1037 rememberId = id;
1038 ++id; 1038 ++id;
1039 } 1039 }
1040 1040
1041 1041
1042 if ( m_abView -> showCategory().isEmpty() ) { 1042 if ( m_abView -> showCategory().isEmpty() ) {
1043 slotSetCategory( 3 ); 1043 slotSetCategory( 3 );
1044 } 1044 }
1045 else { 1045 else {
1046 slotSetCategory( rememberId ); 1046 slotSetCategory( rememberId );
1047 } 1047 }
1048} 1048}
1049 1049
diff --git a/core/pim/today/task-opie-today.control b/core/pim/today/task-opie-today.control
index 6798141..3d637cc 100644
--- a/core/pim/today/task-opie-today.control
+++ b/core/pim/today/task-opie-today.control
@@ -1,12 +1,12 @@
1Package: task-opie-today 1Package: task-opie-today
2Priority: optional 2Priority: optional
3Section: opie/pim 3Section: opie/pim
4Maintainer: Maximilian Reiß <harlekin@handhelds.org> 4Maintainer: Maximilian Reiß <harlekin@handhelds.org>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION$EXTRAVERSION 6Version: 0.5$EXTRAVERSION
7Depends: task-opie-minimal, opie-today, opie-today-datebookplugin, opie-today-todolistplugin 7Depends: task-opie-minimal, opie-today, opie-today-datebookplugin, opie-today-todolistplugin
8License: GPL 8License: GPL
9Description: Task for basic Today app setup 9Description: Task for basic Today app setup
10 Includes datebook and todolist plugins. 10 Includes datebook and todolist plugins.
11 11
12Files: 12Files:
diff --git a/core/settings/security/demo/multiauth.control b/core/settings/security/demo/multiauth.control
index c7dd82a..c549035 100644
--- a/core/settings/security/demo/multiauth.control
+++ b/core/settings/security/demo/multiauth.control
@@ -1,16 +1,16 @@
1Package: opie-multiauth 1Package: opie-multiauth
2Files: bin/multiauth apps/Applications/multiauth.desktop pics/security/multiauth.png 2Files: bin/multiauth apps/Applications/multiauth.desktop pics/security/multiauth.png
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Clement Seveillac <clement@nist.gov> 5Maintainer: Clement Seveillac <clement@nist.gov>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.0.2$EXTRAVERSION
8Depends: opie-security 8Depends: opie-security
9Description: multi-plugin authentication demonstrator for Opie. 9Description: multi-plugin authentication demonstrator for Opie.
10 This demonstration application allows us to use one or several 10 This demonstration application allows us to use one or several
11 ways to lock and unlock our device. Since it really locks your 11 ways to lock and unlock our device. Since it really locks your
12 PDA the way you configured it in the Security settings, you can 12 PDA the way you configured it in the Security settings, you can
13 map a button to it through the Buttons settings to lock your 13 map a button to it through the Buttons settings to lock your
14 PDA on demand, with one simple click. 14 PDA on demand, with one simple click.
15 You must install some opie-multiauth-* plugins, and configure 15 You must install some opie-multiauth-* plugins, and configure
16 them through opie-security, to really see its possibilities. 16 them through opie-security, to really see its possibilities.
diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp
index fbed5a1..59dd17e 100644
--- a/core/tools/quicklauncher/main.cpp
+++ b/core/tools/quicklauncher/main.cpp
@@ -1,290 +1,289 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2003 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2003 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_INITAPP 21#define QTOPIA_INTERNAL_INITAPP
22#include "dropins.h" 22#include "dropins.h"
23 23
24/* OPIE */ 24/* OPIE */
25#include <opie2/odebug.h> 25#include <opie2/odebug.h>
26#include <opie2/oapplication.h> 26#include <opie2/oapplication.h>
27 27
28/* QT */ 28/* QT */
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qstrlist.h> 30#include <qstrlist.h>
31#include <qtimer.h> 31#include <qtimer.h>
32#include <qguardedptr.h> 32#include <qguardedptr.h>
33#include <qcopchannel_qws.h> 33#include <qcopchannel_qws.h>
34 34
35#ifdef private 35#ifdef private
36# undef private 36# undef private
37#endif 37#endif
38#define private public 38#define private public
39#include <qtopia/qpeapplication.h> 39#include <qtopia/qpeapplication.h>
40#undef private 40#undef private
41 41
42/* STD */ 42/* STD */
43#include <stdio.h> 43#include <stdio.h>
44#include <stdlib.h> 44#include <stdlib.h>
45#include <sys/types.h> 45#include <sys/types.h>
46#include <sys/stat.h> 46#include <sys/stat.h>
47 47
48#ifdef _OS_LINUX_ 48#ifdef _OS_LINUX_
49#include <sys/prctl.h> 49#include <sys/prctl.h>
50#ifndef PR_SET_NAME 50#ifndef PR_SET_NAME
51#define PR_SET_NAME 15 51#define PR_SET_NAME 15
52#endif 52#endif
53#endif 53#endif
54 54
55#include <unistd.h> 55#include <unistd.h>
56 56
57 57
58using QuickPrivate::PluginLoader; 58using QuickPrivate::PluginLoader;
59 59
60static QPEApplication *app = 0; 60static QPEApplication *app = 0;
61static PluginLoader *loader = 0; 61static PluginLoader *loader = 0;
62static ApplicationInterface *appIface = 0; 62static ApplicationInterface *appIface = 0;
63static QGuardedPtr<QWidget> mainWindow; 63static QGuardedPtr<QWidget> mainWindow;
64 64
65#ifdef _OS_LINUX_ 65#ifdef _OS_LINUX_
66static char **argv0 = 0; 66static char **argv0 = 0;
67static int argv_lth; 67static int argv_lth;
68extern char **environ; 68extern char **environ;
69#ifndef SPT_BUFSIZE 69#ifndef SPT_BUFSIZE
70#define SPT_BUFSIZE 2048 70#define SPT_BUFSIZE 2048
71#endif 71#endif
72#include <stdarg.h> 72#include <stdarg.h>
73void setproctitle (const char *fmt,...) { 73void setproctitle (const char *fmt,...) {
74 int i; 74 int i;
75 char buf[SPT_BUFSIZE]; 75 char buf[SPT_BUFSIZE];
76 va_list ap; 76 va_list ap;
77 77
78 if (!argv0) 78 if (!argv0)
79 return; 79 return;
80 80
81 va_start(ap, fmt); 81 va_start(ap, fmt);
82 (void) vsnprintf(buf, SPT_BUFSIZE, fmt, ap); 82 (void) vsnprintf(buf, SPT_BUFSIZE, fmt, ap);
83 va_end(ap); 83 va_end(ap);
84 84
85 i = strlen (buf); 85 i = strlen (buf);
86 if (i > argv_lth - 2) { 86 if (i > argv_lth - 2) {
87 i = argv_lth - 2; 87 i = argv_lth - 2;
88 buf[i] = '\0'; 88 buf[i] = '\0';
89 } 89 }
90 90
91 memset(argv0[0], '\0', argv_lth); /* clear the memory area */ 91 memset(argv0[0], '\0', argv_lth); /* clear the memory area */
92 (void) strcpy (argv0[0], buf); 92 (void) strcpy (argv0[0], buf);
93 93
94 argv0[1] = NULL; 94 argv0[1] = NULL;
95} 95}
96#endif 96#endif
97 97
98 98
99class QuickLauncher : public QObject 99class QuickLauncher : public QObject
100{ 100{
101 Q_OBJECT 101 Q_OBJECT
102public: 102public:
103 QuickLauncher() : QObject() 103 QuickLauncher() : QObject()
104 { 104 {
105 QCString ch("QPE/QuickLauncher-"); 105 QCString ch("QPE/QuickLauncher-");
106 ch += QString::number(getpid()); 106 ch += QString::number(getpid());
107 qlChannel = new QCopChannel( ch, this); 107 qlChannel = new QCopChannel( ch, this);
108 connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)), 108 connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)),
109 this, SLOT(message(const QCString&,const QByteArray&)) ); 109 this, SLOT(message(const QCString&,const QByteArray&)) );
110 } 110 }
111 111
112 static void exec( int /*argc*/, char **argv ) 112 static void exec( int /*argc*/, char **argv )
113 { 113 {
114 QString appName = argv[0]; 114 QString appName = argv[0];
115 int sep = appName.findRev( '/' ); 115 int sep = appName.findRev( '/' );
116 if ( sep > 0 ) 116 if ( sep > 0 )
117 appName = appName.mid( sep+1 ); 117 appName = appName.mid( sep+1 );
118 118
119 appIface = 0; 119 appIface = 0;
120 if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) != QS_OK ) { 120 if ( ! ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) ) {
121 owarn << "Plugin does not support QuickLauncher interface" << oendl;
122 exit(-1); 121 exit(-1);
123 } 122 }
124 123
125 mainWindow = appIface->createMainWindow( appName ); 124 mainWindow = appIface->createMainWindow( appName );
126 125
127 if ( mainWindow ) { 126 if ( mainWindow ) {
128 if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { 127 if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) {
129 app->showMainDocumentWidget( mainWindow ); 128 app->showMainDocumentWidget( mainWindow );
130 } else { 129 } else {
131 app->showMainWidget( mainWindow ); 130 app->showMainWidget( mainWindow );
132 } 131 }
133 } else { 132 } else {
134 owarn << "Could not create application main window" << oendl; 133 owarn << "Could not create application main window" << oendl;
135 exit(-1); 134 exit(-1);
136 } 135 }
137 } 136 }
138 137
139private slots: 138private slots:
140 void message(const QCString &msg, const QByteArray & data) 139 void message(const QCString &msg, const QByteArray & data)
141 { 140 {
142 QStrList argList; 141 QStrList argList;
143 142
144 if ( msg == "execute(QStrList)" ) { 143 if ( msg == "execute(QStrList)" ) {
145 delete qlChannel; 144 delete qlChannel;
146 QDataStream stream( data, IO_ReadOnly ); 145 QDataStream stream( data, IO_ReadOnly );
147 QStrList argList; 146 QStrList argList;
148 stream >> argList; 147 stream >> argList;
149 odebug << "QuickLauncher execute: " << argList.at(0) << oendl; 148 odebug << "QuickLauncher execute: " << argList.at(0) << oendl;
150 doQuickLaunch( argList ); 149 doQuickLaunch( argList );
151 delete this; 150 delete this;
152 } else if ( msg == "execute(QString)" ) { 151 } else if ( msg == "execute(QString)" ) {
153 delete qlChannel; 152 delete qlChannel;
154 QDataStream stream( data, IO_ReadOnly ); 153 QDataStream stream( data, IO_ReadOnly );
155 QString arg; 154 QString arg;
156 stream >> arg; 155 stream >> arg;
157 odebug << "QuickLauncher execute: " << arg << oendl; 156 odebug << "QuickLauncher execute: " << arg << oendl;
158 QStrList argList; 157 QStrList argList;
159 argList.append( arg.utf8() ); 158 argList.append( arg.utf8() );
160 doQuickLaunch( argList ); 159 doQuickLaunch( argList );
161 delete this; 160 delete this;
162 } 161 }
163 } 162 }
164 163
165private: 164private:
166 void doQuickLaunch( QStrList &argList ) 165 void doQuickLaunch( QStrList &argList )
167 { 166 {
168 static int myargc = argList.count(); 167 static int myargc = argList.count();
169 static char **myargv = new char *[myargc + 1]; 168 static char **myargv = new char *[myargc + 1];
170 169
171 for ( int j = 0; j < myargc; j++ ) { 170 for ( int j = 0; j < myargc; j++ ) {
172 myargv[j] = new char [strlen(argList.at(j))+1]; 171 myargv[j] = new char [strlen(argList.at(j))+1];
173 strcpy( myargv[j], argList.at(j) ); 172 strcpy( myargv[j], argList.at(j) );
174 } 173 }
175 174
176 myargv[myargc] = NULL; 175 myargv[myargc] = NULL;
177#ifdef _OS_LINUX_ 176#ifdef _OS_LINUX_
178 // Change name of process 177 // Change name of process
179 setproctitle(myargv[0]); 178 setproctitle(myargv[0]);
180 prctl( PR_SET_NAME, (unsigned long)myargv[0], 0, 0, 0 ); 179 prctl( PR_SET_NAME, (unsigned long)myargv[0], 0, 0, 0 );
181#endif 180#endif
182 181
183 connect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit())); 182 connect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit()));
184 app->exit_loop(); 183 app->exit_loop();
185 app->initApp( myargc, myargv ); 184 app->initApp( myargc, myargv );
186 exec( myargc, myargv ); 185 exec( myargc, myargv );
187 } 186 }
188 187
189private: 188private:
190 QCopChannel *qlChannel; 189 QCopChannel *qlChannel;
191}; 190};
192 191
193int main( int argc, char** argv ) 192int main( int argc, char** argv )
194{ 193{
195 app = new Opie::Core::OApplication( argc, argv ); 194 app = new Opie::Core::OApplication( argc, argv );
196 195
197 loader = new PluginLoader( "application" ); 196 loader = new PluginLoader( "application" );
198 197
199 unsetenv( "LD_BIND_NOW" ); 198 unsetenv( "LD_BIND_NOW" );
200 199
201 QCString arg0 = argv[0]; 200 QCString arg0 = argv[0];
202 int sep = arg0.findRev( '/' ); 201 int sep = arg0.findRev( '/' );
203 202
204 if ( sep > 0 ) 203 if ( sep > 0 )
205 arg0 = arg0.mid( sep+1 ); 204 arg0 = arg0.mid( sep+1 );
206 205
207 if ( arg0 != "quicklauncher" ) { 206 if ( arg0 != "quicklauncher" ) {
208 odebug << "QuickLauncher invoked as: " << arg0.data() << oendl; 207 odebug << "QuickLauncher invoked as: " << arg0.data() << oendl;
209 QuickLauncher::exec( argc, argv ); 208 QuickLauncher::exec( argc, argv );
210 } else { 209 } else {
211#ifdef _OS_LINUX_ 210#ifdef _OS_LINUX_
212 // Setup to change proc title 211 // Setup to change proc title
213 int i; 212 int i;
214 char **envp = environ; 213 char **envp = environ;
215 /* Move the environment so we can reuse the memory. 214 /* Move the environment so we can reuse the memory.
216 * (Code borrowed from sendmail.) */ 215 * (Code borrowed from sendmail.) */
217 for (i = 0; envp[i] != NULL; i++) 216 for (i = 0; envp[i] != NULL; i++)
218 continue; 217 continue;
219 environ = (char **) malloc(sizeof(char *) * (i + 1)); 218 environ = (char **) malloc(sizeof(char *) * (i + 1));
220 if (environ == NULL) 219 if (environ == NULL)
221 return -1; 220 return -1;
222 for (i = 0; envp[i] != NULL; i++) 221 for (i = 0; envp[i] != NULL; i++)
223 if ((environ[i] = strdup(envp[i])) == NULL) 222 if ((environ[i] = strdup(envp[i])) == NULL)
224 return -1; 223 return -1;
225 environ[i] = NULL; 224 environ[i] = NULL;
226 225
227 argv0 = argv; 226 argv0 = argv;
228 if (i > 0) 227 if (i > 0)
229 argv_lth = envp[i-1] + strlen(envp[i-1]) - argv0[0]; 228 argv_lth = envp[i-1] + strlen(envp[i-1]) - argv0[0];
230 else 229 else
231 argv_lth = argv0[argc-1] + strlen(argv0[argc-1]) - argv0[0]; 230 argv_lth = argv0[argc-1] + strlen(argv0[argc-1]) - argv0[0];
232#endif 231#endif
233 (void)new QuickLauncher(); 232 (void)new QuickLauncher();
234 odebug << "QuickLauncher running" << oendl; 233 odebug << "QuickLauncher running" << oendl;
235 // Pre-load default fonts 234 // Pre-load default fonts
236 QFontMetrics fm( QApplication::font() ); 235 QFontMetrics fm( QApplication::font() );
237 fm.ascent(); // causes font load. 236 fm.ascent(); // causes font load.
238 QFont f( QApplication::font() ); 237 QFont f( QApplication::font() );
239 f.setWeight( QFont::Bold ); 238 f.setWeight( QFont::Bold );
240 QFontMetrics fmb( f ); 239 QFontMetrics fmb( f );
241 fmb.ascent(); // causes font load. 240 fmb.ascent(); // causes font load.
242 241
243 // Each of the following force internal structures/internal 242 // Each of the following force internal structures/internal
244 // initialization to be performed. This may mean allocating 243 // initialization to be performed. This may mean allocating
245 // memory that is not needed by all applications. 244 // memory that is not needed by all applications.
246 Resource::loadIconSet("new"); // do internal init 245 Resource::loadIconSet("new"); // do internal init
247 246
248 /* make sure libopie gets lined in */ 247 /* make sure libopie gets lined in */
249 { 248 {
250 Opie::Ui::OWait item; 249 Opie::Ui::OWait item;
251 } 250 }
252 251
253 // Create a widget to force initialization of title bar images, etc. 252 // Create a widget to force initialization of title bar images, etc.
254 QObject::disconnect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit())); 253 QObject::disconnect(app, SIGNAL(lastWindowClosed()), app, SLOT(hideOrQuit()));
255 QWidget *w = new QWidget(0,0,Qt::WDestructiveClose|Qt::WStyle_ContextHelp|Qt::WStyle_Tool); 254 QWidget *w = new QWidget(0,0,Qt::WDestructiveClose|Qt::WStyle_ContextHelp|Qt::WStyle_Tool);
256 w->setGeometry( -100, -100, 10, 10 ); 255 w->setGeometry( -100, -100, 10, 10 );
257 w->show(); 256 w->show();
258 QTimer::singleShot( 0, w, SLOT(close()) ); 257 QTimer::singleShot( 0, w, SLOT(close()) );
259 258
260 app->enter_loop(); 259 app->enter_loop();
261 } 260 }
262 261
263 int rv = app->exec(); 262 int rv = app->exec();
264 263
265 if ( mainWindow ) 264 if ( mainWindow )
266 delete (QWidget*)mainWindow; 265 delete (QWidget*)mainWindow;
267 delete app; 266 delete app;
268 267
269 if ( appIface ) 268 if ( appIface )
270 loader->releaseInterface( appIface ); 269 loader->releaseInterface( appIface );
271 delete loader; 270 delete loader;
272 271
273 272
274 // Neither QLibrary nor my Dropin is a QObject and they don't depend 273 // Neither QLibrary nor my Dropin is a QObject and they don't depend
275 // on a qApp so we destroy QWidget::destroyMapper() without 274 // on a qApp so we destroy QWidget::destroyMapper() without
276 // crashing the app 275 // crashing the app
277 // 276 //
278 // The problem is there are some 'static' resources not freed 277 // The problem is there are some 'static' resources not freed
279 // in the apps and on destructing these objects are not available 278 // in the apps and on destructing these objects are not available
280 // anymore. In future fix up the apps but for now 279 // anymore. In future fix up the apps but for now
281 // we just skip deletion and hope things go well -zecke 280 // we just skip deletion and hope things go well -zecke
282 // delete app; 281 // delete app;
283 // hack instead -zecke 282 // hack instead -zecke
284 // delete app->pidChannel; 283 // delete app->pidChannel;
285 // app->pidChannel = 0; 284 // app->pidChannel = 0;
286 285
287 return rv; 286 return rv;
288} 287}
289 288
290#include "main.moc" 289#include "main.moc"
diff --git a/dependencies.in b/dependencies.in
index ce1ac96..357d994 100644
--- a/dependencies.in
+++ b/dependencies.in
@@ -1,84 +1,96 @@
1 config LIBETPAN_DEP 1 config LIBETPAN_DEP
2 boolean "Have Libetpan >= 0.33pre" 2 boolean "Have Libetpan >= 0.33pre"
3 default "n" 3 default "n"
4 4
5 config LIBETPAN_LIB_DIR 5 config LIBETPAN_LIB_DIR
6 string "LIBETPAN library dir" 6 string "LIBETPAN library dir"
7 depends LIBETPAN_DEP 7 depends LIBETPAN_DEP
8 8
9 config LIBETPAN_INC_DIR 9 config LIBETPAN_INC_DIR
10 string "LIBETPAN include dir" 10 string "LIBETPAN include dir"
11 depends LIBETPAN_DEP 11 depends LIBETPAN_DEP
12 12
13 config LIBPCAP_DEP 13 config LIBPCAP_DEP
14 boolean "Have libpcap >= 0.7.2" 14 boolean "Have libpcap >= 0.7.2"
15 default "n" 15 default "n"
16 16
17 config LIBPCAP_LIB_DIR 17 config LIBPCAP_LIB_DIR
18 string "LIBPCAP library dir" 18 string "LIBPCAP library dir"
19 depends LIBPCAP_DEP 19 depends LIBPCAP_DEP
20 20
21 config LIBPCAP_INC_DIR 21 config LIBPCAP_INC_DIR
22 string "LIBPCAP include dir" 22 string "LIBPCAP include dir"
23 depends LIBPCAP_DEP 23 depends LIBPCAP_DEP
24 24
25 config LIBSQLITE_DEP 25 config LIBSQLITE_DEP
26 boolean "Have sqlite >= 3.0.7" 26 boolean "Have sqlite >= 3.0.7"
27 default n 27 default n
28 28
29 config LIBSQLITE_LIB_DIR 29 config LIBSQLITE_LIB_DIR
30 string "LIBSQLITE library dir" 30 string "LIBSQLITE library dir"
31 depends LIBSQLITE_DEP 31 depends LIBSQLITE_DEP
32 32
33 config LIBSQLITE_INC_DIR 33 config LIBSQLITE_INC_DIR
34 string "LIBSQLITE include dir" 34 string "LIBSQLITE include dir"
35 depends LIBSQLITE_DEP 35 depends LIBSQLITE_DEP
36 36
37 config LIBXINE_DEP 37 config LIBXINE_DEP
38 boolean "Have libxine >= 1.0rc6" 38 boolean "Have libxine >= 1.0rc6"
39 default "n" 39 default "n"
40 40
41 config LIBXINE_LIB_DIR 41 config LIBXINE_LIB_DIR
42 string "LIBXINE library dir" 42 string "LIBXINE library dir"
43 depends LIBXINE_DEP 43 depends LIBXINE_DEP
44 44
45 config LIBXINE_INC_DIR 45 config LIBXINE_INC_DIR
46 string "LIBXINE include dir" 46 string "LIBXINE include dir"
47 depends LIBXINE_DEP 47 depends LIBXINE_DEP
48 48
49 config LIBIPK_DEP 49 config LIBIPK_DEP
50 boolean "Have libipkg >= 0.99.120" 50 boolean "Have libipkg >= 0.99.120"
51 default "n" 51 default "n"
52 52
53 config LIBIPK_LIB_DIR 53 config LIBIPK_LIB_DIR
54 string "libipkg library dir" 54 string "libipkg library dir"
55 depends LIBIPK_DEP 55 depends LIBIPK_DEP
56 56
57 config LIBIPK_INC_DIR 57 config LIBIPK_INC_DIR
58 string "libipkg include dir" 58 string "libipkg include dir"
59 depends LIBIPK_DEP 59 depends LIBIPK_DEP
60 60
61 config LIBSDL_DEP 61 config LIBSDL_DEP
62 boolean "Have libsdl12 and sdlimage" 62 boolean "Have libsdl12 and sdlimage"
63 default "n" 63 default "n"
64 64
65 config LIBSDL_LIB_DIR 65 config LIBSDL_LIB_DIR
66 string "LIBSDL library dir" 66 string "LIBSDL library dir"
67 depends LIBSDL_DEP 67 depends LIBSDL_DEP
68 68
69 config LIBSDL_INC_DIR 69 config LIBSDL_INC_DIR
70 string "LIBSDL include dir" 70 string "LIBSDL include dir"
71 depends LIBSDL_DEP 71 depends LIBSDL_DEP
72 72
73 config LIBSWORD_DEP 73 config LIBSWORD_DEP
74 boolean "Have libsword > = 1.5.0" 74 boolean "Have libsword > = 1.5.0"
75 default "n" 75 default "n"
76 76
77 config LIBSWORD_LIB_DIR 77 config LIBSWORD_LIB_DIR
78 string "libsword library dir" 78 string "libsword library dir"
79 depends LIBSWORD_DEP 79 depends LIBSWORD_DEP
80 80
81 config LIBSWORD_INC_DIR 81 config LIBSWORD_INC_DIR
82 string "libsword include dir" 82 string "libsword include dir"
83 depends LIBSWORD_DEP 83 depends LIBSWORD_DEP
84 84
85 config LIBBLUEZ_DEP
86 boolean "Have bluez library"
87 default "n"
88
89 config LIBBLUEZ_LIB_DIR
90 string "libbluez library dir"
91 depends LIBBLUEZ_DEP
92
93 config LIBBLUEZ_INC_DIR
94 string "libbluez include dir"
95 depends LIBBLUEZ_DEP
96
diff --git a/etc/opie-keytabs.control b/etc/opie-keytabs.control
index e3d83de..9563b3a 100644
--- a/etc/opie-keytabs.control
+++ b/etc/opie-keytabs.control
@@ -1,9 +1,9 @@
1Package: opie-keytabs 1Package: opie-keytabs
2Files: etc/keytabs/* 2Files: etc/keytabs/*
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.6$EXTRAVERSION
8License: GPL 8License: GPL
9Description: Opie keytabs for terminal applications 9Description: Opie keytabs for terminal applications
diff --git a/libopie2/libopie2.control b/libopie2/libopie2.control
index fcd44b4..e72c535 100644
--- a/libopie2/libopie2.control
+++ b/libopie2/libopie2.control
@@ -1,10 +1,10 @@
1Package: libopie2 1Package: libopie2
2Files: 2Files:
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.8.2$EXTRAVERSION
8Depends: libopiecore2 ($QPE_VERSION), libopiedb2 ($QPE_VERSION), libopiemm2 ($QPE_VERSION), libopienet2 ($QPE_VERSION), libopiepim2 ($QPE_VERSION), libopieui2 ($QPE_VERSION) 8Depends: libopiecore2 ($QPE_VERSION), libopiedb2 ($QPE_VERSION), libopiemm2 ($QPE_VERSION), libopienet2 ($QPE_VERSION), libopiepim2 ($QPE_VERSION), libopieui2 ($QPE_VERSION)
9Provides: libopie2 9Provides: libopie2
10Description: Opie library 2.0 10Description: Opie library 2.0
diff --git a/libopie2/opiecore/libopiecore2.control b/libopie2/opiecore/libopiecore2.control
index c7fc141..1d27c1c 100644
--- a/libopie2/opiecore/libopiecore2.control
+++ b/libopie2/opiecore/libopiecore2.control
@@ -1,10 +1,10 @@
1Package: libopiecore2 1Package: libopiecore2
2Files: lib/libopiecore2.so.* 2Files: lib/libopiecore2.so.*
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.8.5$EXTRAVERSION
8Depends: libqpe1 8Depends: libqpe1
9Provides: libopiecore2 9Provides: libopiecore2
10Description: Opie library 2.0 CORE 10Description: Opie library 2.0 CORE
diff --git a/libopie2/opiedb/libopiedb2.control b/libopie2/opiedb/libopiedb2.control
index 7e9354a..5744b24 100644
--- a/libopie2/opiedb/libopiedb2.control
+++ b/libopie2/opiedb/libopiedb2.control
@@ -1,10 +1,10 @@
1Package: libopiedb2 1Package: libopiedb2
2Files: lib/libopiedb2.so* 2Files: lib/libopiedb2.so*
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.8.2$EXTRAVERSION
8Depends: libqpe1, libopiecore2 ($QPE_VERSION), libsqlite3-0 | sqlite3-bin 8Depends: libqpe1, libopiecore2 ($QPE_VERSION), libsqlite3-0 | sqlite3-bin
9Provides: libopiedb2 9Provides: libopiedb2
10Description: Opie library 2.1 DB 10Description: Opie library 2.1 DB
diff --git a/libopie2/opiemm/libopiemm2.control b/libopie2/opiemm/libopiemm2.control
index 0dd2df2..38d7ddc 100644
--- a/libopie2/opiemm/libopiemm2.control
+++ b/libopie2/opiemm/libopiemm2.control
@@ -1,10 +1,10 @@
1Package: libopiemm2 1Package: libopiemm2
2Files: lib/libopiemm2.so.* 2Files: lib/libopiemm2.so.*
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.8.2$EXTRAVERSION
8Depends: libqpe1, libopiecore2 (1.8.2) 8Depends: libqpe1, libopiecore2 (1.8.2)
9Provides: libopiemm2 9Provides: libopiemm2
10Description: Opie library 2.0 MM 10Description: Opie library 2.0 MM
diff --git a/libopie2/opienet/libopienet2.control b/libopie2/opienet/libopienet2.control
index 69876b5..da53e2b 100644
--- a/libopie2/opienet/libopienet2.control
+++ b/libopie2/opienet/libopienet2.control
@@ -1,10 +1,10 @@
1Package: libopienet2 1Package: libopienet2
2Files: lib/libopienet2.so.* etc/manufacturers 2Files: lib/libopienet2.so.* etc/manufacturers
3Priority: optional 3Priority: optional
4Section: opie/libs 4Section: opie/libs
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.8.4$EXTRAVERSION
8Depends: libopiecore2, libpcap0.8 (>=0.7.2) 8Depends: libopiecore2, libpcap0.8 (>=0.7.2)
9Provides: libopienet2 9Provides: libopienet2
10Description: Opie library 2.0 NET 10Description: Opie library 2.0 NET
diff --git a/libopie2/opiepim/libopiepim2.control b/libopie2/opiepim/libopiepim2.control
index 28b7505..457e20a 100644
--- a/libopie2/opiepim/libopiepim2.control
+++ b/libopie2/opiepim/libopiepim2.control
@@ -1,10 +1,10 @@
1Package: libopiepim2 1Package: libopiepim2
2Files: lib/libopiepim2.so.* 2Files: lib/libopiepim2.so.*
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.8.3$EXTRAVERSION
8Depends: libqpe1, libopiecore2 (>=1.8.0) 8Depends: libqpe1, libopiecore2 (>=1.8.0)
9Provides: libopiepim2 9Provides: libopiepim2
10Description: Opie library 2.0 PIM 10Description: Opie library 2.0 PIM
diff --git a/libopie2/opiesecurity/libopiesecurity2.control b/libopie2/opiesecurity/libopiesecurity2.control
index 1eabb93..0a29a47 100644
--- a/libopie2/opiesecurity/libopiesecurity2.control
+++ b/libopie2/opiesecurity/libopiesecurity2.control
@@ -1,11 +1,11 @@
1Package: libopiesecurity2 1Package: libopiesecurity2
2Files: lib/libopiesecurity2.so.* 2Files: lib/libopiesecurity2.so.*
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.8.5$EXTRAVERSION
8Depends: libqpe1, libopiecore2, libopieui2 8Depends: libqpe1, libopiecore2, libopieui2
9Provides: libopiesecurity2 9Provides: libopiesecurity2
10Recommends: opie-multiauth-pinplugin | opie-multiauth-noticeplugin | opie-multiauth-dummyplugin | opie-multiauth-bluepingplugin, opie-security 10Recommends: opie-multiauth-pinplugin | opie-multiauth-noticeplugin | opie-multiauth-dummyplugin | opie-multiauth-bluepingplugin, opie-security
11Description: Opie library 2.0 security 11Description: Opie library 2.0 security
diff --git a/libopie2/opieui/oresource.cpp b/libopie2/opieui/oresource.cpp
index 9559210..c94421a 100644
--- a/libopie2/opieui/oresource.cpp
+++ b/libopie2/opieui/oresource.cpp
@@ -1,58 +1,59 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 3
4              Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org> 4              Copyright (C) 2003 Patrick S. Vogt <tille@handhelds.org>
5 =. 5 =.
6 .=l. 6 .=l.
7           .>+-= 7           .>+-=
8 _;:,     .>    :=|. This program is free software; you can 8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under 9.> <`_,   >  .   <= redistribute it and/or modify it under
10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11.="- .-=="i,     .._ License as published by the Free Software 11.="- .-=="i,     .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License, 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version. 13     ._= =}       : or (at your option) any later version.
14    .%`+i>       _;_. 14    .%`+i>       _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of 17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more 20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details. 21++=   -.     .`     .: details.
22 :     =  ...= . :.=- 22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include <opie2/oapplication.h> 31#include <opie2/oapplication.h>
32#include <opie2/odebug.h> 32#include <opie2/odebug.h>
33 33
34#include "oresource.h" 34#include "oresource.h"
35 35
36 36
37#ifdef QWS 37#ifdef QWS
38namespace Resource 38namespace Resource
39{ 39{
40 40
41QPixmap loadPixmap( const QString& pix ) 41QPixmap loadPixmap( const QString& pix )
42{ 42{
43 QString filename; 43 QString filename;
44 filename.sprintf( "%s/%s.png", (const char*) oApp->qpeDir(), (const char*) pix ); 44 filename.sprintf( "%s/%s.png", (const char*) oApp->qpeDir(), (const char*) pix );
45 odebug << "Load pixmap " << filename << oendl;
45 QPixmap pixmap( filename ); 46 QPixmap pixmap( filename );
46 if ( pixmap.isNull() ) 47 if ( pixmap.isNull() )
47 { 48 {
48 odebug << "libopie2 resource: can't find pixmap " << filename << oendl; 49 odebug << "libopie2 resource: can't find pixmap " << filename << oendl;
49 } 50 }
50 return pixmap; 51 return pixmap;
51}; 52};
52 53
53}; 54};
54 55
55#endif 56#endif
56 57
57 58
58 59
diff --git a/libqtaux/libqtaux.control b/libqtaux/libqtaux.control
index d801a98..996962f 100644
--- a/libqtaux/libqtaux.control
+++ b/libqtaux/libqtaux.control
@@ -1,10 +1,10 @@
1Package: libqtaux2 1Package: libqtaux2
2Files: lib/libqtaux2.so.* 2Files: lib/libqtaux2.so.*
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 2.3.7$EXTRAVERSION
8Depends: libqte2 8Depends: libqte2
9Provides: libqtaux 9Provides: libqtaux
10Description: Qt/Embedded Auxilliary Stuff 10Description: Qt/Embedded Auxilliary Stuff
diff --git a/noncore/applets/zkbapplet/zkbapplet.control b/noncore/applets/zkbapplet/zkbapplet.control
index 08b540f..4e03c26 100644
--- a/noncore/applets/zkbapplet/zkbapplet.control
+++ b/noncore/applets/zkbapplet/zkbapplet.control
@@ -1,10 +1,10 @@
1Package: zkbapplet 1Package: zkbapplet
2Files: plugins/applets/libzkbapplet.so* pics/zkb-disabled.png share/zkb/*.xml bin/keyz-cfg apps/Settings/keyz-cfg.desktop pics/keyz-cfg.png share/zkb/zkb.xml.sample 2Files: plugins/applets/libzkbapplet.so* pics/zkb-disabled.png share/zkb/*.xml bin/keyz-cfg apps/Settings/keyz-cfg.desktop pics/keyz-cfg.png share/zkb/zkb.xml.sample
3Priority: optional 3Priority: optional
4Section: opie/applets 4Section: opie/applets
5Maintainer: Rajko Albrecht <alwin@handhelds.org> 5Maintainer: Rajko Albrecht <alwin@handhelds.org>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal 7Depends: task-opie-minimal
8Description: ZKB Applet and configuration program 8Description: ZKB Applet and configuration program
9Obsoletes: keyz-cfg 9Obsoletes: keyz-cfg
10Version: $QPE_VERSION$EXTRAVERSION 10Version: 0.6.0$EXTRAVERSION
diff --git a/noncore/apps/dagger/opie-dagger.control b/noncore/apps/dagger/opie-dagger.control
index cfb45be..4ded1f2 100644
--- a/noncore/apps/dagger/opie-dagger.control
+++ b/noncore/apps/dagger/opie-dagger.control
@@ -1,9 +1,9 @@
1Package: opie-dagger 1Package: opie-dagger
2Files: plugins/application/libdagger.so* bin/dagger pics/dagger apps/Applications/dagger.desktop 2Files: plugins/application/libdagger.so* bin/dagger pics/dagger apps/Applications/dagger.desktop
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Depends: task-opie-minimal, libopiecore2, libopieui2 5Depends: task-opie-minimal, libopiecore2, libopieui2
6Architecture: arm 6Architecture: arm
7Maintainer: Dan Williams (drw@handhelds.org) 7Maintainer: Dan Williams (drw@handhelds.org)
8Description: A Bible study program utilizing the Sword library. 8Description: A Bible study program utilizing the Sword library.
9Version: $QPE_VERSION$EXTRAVERSION 9Version: 0.9.1$EXTRAVERSION
diff --git a/noncore/games/bounce/opie-bounce.control b/noncore/games/bounce/opie-bounce.control
index 0513958..54c14b4 100644
--- a/noncore/games/bounce/opie-bounce.control
+++ b/noncore/games/bounce/opie-bounce.control
@@ -1,11 +1,11 @@
1Package: opie-bounce 1Package: opie-bounce
2Files: plugins/application/libbounce.so* bin/bounce apps/Games/bounce.desktop pics/bounce/*.png 2Files: plugins/application/libbounce.so* bin/bounce apps/Games/bounce.desktop pics/bounce/*.png
3Version: $QPE_VERSION$EXTRAVERSION 3Version: 0.6$EXTRAVERSION
4Depends: task-opie-minimal, libopiecore2 4Depends: task-opie-minimal, libopiecore2
5Priority: optional 5Priority: optional
6Section: opie/games 6Section: opie/games
7Maintainer: Martin Imobersteg <imm@gmx.ch> 7Maintainer: Martin Imobersteg <imm@gmx.ch>
8Architecture: arm 8Architecture: arm
9License: GPL 9License: GPL
10Description: bounce 10Description: bounce
11 A JezzGame like game for Qtopia. 11 A JezzGame like game for Qtopia.
diff --git a/noncore/games/buzzword/opie-buzzword.control b/noncore/games/buzzword/opie-buzzword.control
index f76a2c2..586b566 100644
--- a/noncore/games/buzzword/opie-buzzword.control
+++ b/noncore/games/buzzword/opie-buzzword.control
@@ -1,11 +1,11 @@
1Package: opie-buzzword 1Package: opie-buzzword
2Files: plugins/application/libbuzzword.so* bin/buzzword apps/Games/buzzword.desktop pics/buzzword/buzzword.png share/buzzword/buzzwords 2Files: plugins/application/libbuzzword.so* bin/buzzword apps/Games/buzzword.desktop pics/buzzword/buzzword.png share/buzzword/buzzwords
3Version: $QPE_VERSION$EXTRAVERSION 3Version: 1.1$EXTRAVERSION
4Depends: task-opie-minimal,libopiecore2 4Depends: task-opie-minimal,libopiecore2
5Priority: optional 5Priority: optional
6Section: opie/games 6Section: opie/games
7Maintainer: Martin Imobersteg <imm@gmx.ch> 7Maintainer: Martin Imobersteg <imm@gmx.ch>
8Architecture: arm 8Architecture: arm
9License: GPL 9License: GPL
10Description: BuzzWord 10Description: BuzzWord
11 A BuzzWord Bingo for the Opie environment. 11 A BuzzWord Bingo for the Opie environment.
diff --git a/noncore/games/kbill/opie-kbill.control b/noncore/games/kbill/opie-kbill.control
index cf12bca..665fa32 100644
--- a/noncore/games/kbill/opie-kbill.control
+++ b/noncore/games/kbill/opie-kbill.control
@@ -1,13 +1,13 @@
1Package: opie-kbill 1Package: opie-kbill
2Files: bin/kbill apps/Games/kbill.desktop pics/kbill/* 2Files: bin/kbill apps/Games/kbill.desktop pics/kbill/*
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Mark Westcott <mark@houseoffish.org> 5Maintainer: Mark Westcott <mark@houseoffish.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.8$EXTRAVERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9License: GPL 9License: GPL
10Description: The famous hit Bill game 10Description: The famous hit Bill game
11 Hit Bill as hard as you can before he 11 Hit Bill as hard as you can before he
12 infects your network with a wannabe 12 infects your network with a wannabe
13 OS. 13 OS.
diff --git a/noncore/games/kcheckers/opie-kcheckers.control b/noncore/games/kcheckers/opie-kcheckers.control
index e7c20d3..e64acca 100644
--- a/noncore/games/kcheckers/opie-kcheckers.control
+++ b/noncore/games/kcheckers/opie-kcheckers.control
@@ -1,10 +1,10 @@
1Package: opie-kcheckers 1Package: opie-kcheckers
2Files: plugins/application/libkcheckers.so* bin/kcheckers apps/Games/kcheckers.desktop pics/kcheckers 2Files: plugins/application/libkcheckers.so* bin/kcheckers apps/Games/kcheckers.desktop pics/kcheckers
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: leseb <prudhomme@laposte.net> 5Maintainer: leseb <prudhomme@laposte.net>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.3$EXTRAVERSION
8Depends: task-opie-minimal, libopiecore2 8Depends: task-opie-minimal, libopiecore2
9Description: The game of Checkers 9Description: The game of Checkers
10 A game for the Opie environment. 10 A game for the Opie environment.
diff --git a/noncore/games/kpacman/opie-kpacman.control b/noncore/games/kpacman/opie-kpacman.control
index 97120aa..2717f44 100644
--- a/noncore/games/kpacman/opie-kpacman.control
+++ b/noncore/games/kpacman/opie-kpacman.control
@@ -1,11 +1,11 @@
1Package: opie-kpacman 1Package: opie-kpacman
2Files: plugins/applications/libkpacman.so* bin/kpacman apps/Games/kpacman.desktop pics/kpacman/kpacman.png share/kpacman 2Files: plugins/applications/libkpacman.so* bin/kpacman apps/Games/kpacman.desktop pics/kpacman/kpacman.png share/kpacman
3Version: $QPE_VERSION$EXTRAVERSION 3Version: 0.3.1$EXTRAVERSION
4Depends: task-opie-minimal 4Depends: task-opie-minimal
5Priority: optional 5Priority: optional
6Section: opie/games 6Section: opie/games
7Maintainer: Catalin Climov <catalin@climov.com> 7Maintainer: Catalin Climov <catalin@climov.com>
8Architecture: arm 8Architecture: arm
9License: GPL 9License: GPL
10Description: Kpacman 10Description: Kpacman
11 A Pacman clone for Qtopia. 11 A Pacman clone for Qtopia.
diff --git a/noncore/multimedia/camera/opie-camera.control b/noncore/multimedia/camera/opie-camera.control
index 5171050..091de98 100644
--- a/noncore/multimedia/camera/opie-camera.control
+++ b/noncore/multimedia/camera/opie-camera.control
@@ -1,10 +1,10 @@
1Package: opie-camera 1Package: opie-camera
2Files: lib/libcamera.* bin/camera bin/capture pics/camera apps/Applications/camera.desktop 2Files: lib/libcamera.* bin/camera bin/capture pics/camera apps/Applications/camera.desktop
3Priority: optional 3Priority: optional
4Section: opie/multimedia 4Section: opie/multimedia
5Maintainer: Michael 'Mickey' Lauer <mickeyl@Vanille.de> 5Maintainer: Michael 'Mickey' Lauer <mickeyl@Vanille.de>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.0.1$EXTRAVERSION
8Depends: libqpe1, libopiecore2, libopieui2 8Depends: libqpe1, libopiecore2, libopieui2
9Description: A Camera Application 9Description: A Camera Application
10 A Camera Application to use with the Sharp CE-AG06. 10 A Camera Application to use with the Sharp CE-AG06.
diff --git a/noncore/multimedia/opieplayer2/opie-mediaplayer2-codecs.control b/noncore/multimedia/opieplayer2/opie-mediaplayer2-codecs.control
index f4cbc41..9c14ab4 100644
--- a/noncore/multimedia/opieplayer2/opie-mediaplayer2-codecs.control
+++ b/noncore/multimedia/opieplayer2/opie-mediaplayer2-codecs.control
@@ -1,10 +1,10 @@
1Package: opie-mediaplayer2-codecs 1Package: opie-mediaplayer2-codecs
2Files: root/usr/lib/libao.so* root/usr/lib/libogg* root/usr/lib/libvorbisidec.so* root/usr/lib/libxine.so* root/usr/lib/xine/* 2Files: root/usr/lib/libao.so* root/usr/lib/libogg* root/usr/lib/libvorbisidec.so* root/usr/lib/libxine.so* root/usr/lib/xine/*
3Section: ;ibs 3Section: ;ibs
4Essential: no 4Essential: no
5Priority: optional 5Priority: optional
6Version: $QPE_VERSION$EXTRAVERSION 6Version: 0.7$EXTRAVERSION
7Architecture: arm 7Architecture: arm
8Maintainer: Maximilian Reiss <harlekin@handhelds.org> 8Maintainer: Maximilian Reiss <harlekin@handhelds.org>
9Depends: libc6 (>= 2.1), opie-mediaplayer2 9Depends: libc6 (>= 2.1), opie-mediaplayer2
10Description: Codecs for opieplayer 2 10Description: Codecs for opieplayer 2
diff --git a/noncore/multimedia/powerchord/opie-powerchord.control b/noncore/multimedia/powerchord/opie-powerchord.control
index 490e8a2..5216385 100644
--- a/noncore/multimedia/powerchord/opie-powerchord.control
+++ b/noncore/multimedia/powerchord/opie-powerchord.control
@@ -1,11 +1,11 @@
1Package: opie-powercord 1Package: opie-powercord
2Files: plugins/applications/libpowerchord.so* bin/powerchord apps/Applications/powerchord.desktop pics/powerchord share/powerchord 2Files: plugins/applications/libpowerchord.so* bin/powerchord apps/Applications/powerchord.desktop pics/powerchord share/powerchord
3Priority: optional 3Priority: optional
4Section: opie/multimedia 4Section: opie/multimedia
5Maintainer: Camilo Mesias <camilo@mesias.co.uk>, ljp <lpotter@trolltech.com> 5Maintainer: Camilo Mesias <camilo@mesias.co.uk>, ljp <lpotter@trolltech.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.0.8$EXTRAVERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9Description: Guitar Chord generator application 9Description: Guitar Chord generator application
10 Allows naming of chords using base note and key. Fretboard diagrams are 10 Allows naming of chords using base note and key. Fretboard diagrams are
11 produced illustrating ways to play the chord. 11 produced illustrating ways to play the chord.
diff --git a/noncore/net/mail/libetpanstuff/libetpan.control b/noncore/net/mail/libetpanstuff/libetpan.control
index b664157..d90124d 100644
--- a/noncore/net/mail/libetpanstuff/libetpan.control
+++ b/noncore/net/mail/libetpanstuff/libetpan.control
@@ -1,10 +1,10 @@
1Package: libetpan 1Package: libetpan
2Files: usr/lib/libetpan* 2Files: usr/lib/libetpan*
3Priority: optional 3Priority: optional
4Section: system 4Section: system
5Maintainer: Rajko Albrecht <alwin@handhelds.org> 5Maintainer: Rajko Albrecht <alwin@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.33$EXTRAVERSION
8Depends: libssl0.9.7 8Depends: libssl0.9.7
9Description: libetpan mail/news library - A version of libetpan patched for Opies mailing app 9Description: libetpan mail/news library - A version of libetpan patched for Opies mailing app
10License: LGPL 10License: LGPL
diff --git a/noncore/net/mail/libmailwrapper/libmailwrapper.control b/noncore/net/mail/libmailwrapper/libmailwrapper.control
index 3491d67..1226c10 100644
--- a/noncore/net/mail/libmailwrapper/libmailwrapper.control
+++ b/noncore/net/mail/libmailwrapper/libmailwrapper.control
@@ -1,10 +1,10 @@
1Package: libmailwrapper 1Package: libmailwrapper
2Files: lib/libmailwrapper.so* 2Files: lib/libmailwrapper.so*
3Priority: optional 3Priority: optional
4Section: libs 4Section: libs
5Maintainer: Rajko Albrecht <alwin@handhelds.org>, Juergen Graf <jgf@handhelds.org>, Maximilian Reiß <harlekin@handhelds.org> 5Maintainer: Rajko Albrecht <alwin@handhelds.org>, Juergen Graf <jgf@handhelds.org>, Maximilian Reiß <harlekin@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.6$EXTRAVERSION
8Depends: task-opie-minimal, libopiecore2, libopieui2, libetpan (>= 0.33pre) 8Depends: task-opie-minimal, libopiecore2, libopieui2, libetpan (>= 0.33pre)
9Description: wrapper lib needed by Opie's mailer 9Description: wrapper lib needed by Opie's mailer
10License: LGPL 10License: LGPL
diff --git a/noncore/net/mail/taskbarapplet/opie-mailapplet.control b/noncore/net/mail/taskbarapplet/opie-mailapplet.control
index c838e0b..fc7b337 100644
--- a/noncore/net/mail/taskbarapplet/opie-mailapplet.control
+++ b/noncore/net/mail/taskbarapplet/opie-mailapplet.control
@@ -1,10 +1,10 @@
1Package: opie-mailapplet 1Package: opie-mailapplet
2Files: plugins/applets/libmailapplet.so* 2Files: plugins/applets/libmailapplet.so*
3Priority: optional 3Priority: optional
4Section: opie/applets 4Section: opie/applets
5Maintainer: Rajko Albrecht <alwin@handhelds.org>, Juergen Graf <jgf@handhelds.org>, Maximilian Reiß <harlekin@handhelds.org> 5Maintainer: Rajko Albrecht <alwin@handhelds.org>, Juergen Graf <jgf@handhelds.org>, Maximilian Reiß <harlekin@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.5$EXTRAVERSION
8Depends: task-opie-minimal, libopiecore2, opie-mail 8Depends: task-opie-minimal, libopiecore2, opie-mail
9Description: A Biff-like mailchecker 9Description: A Biff-like mailchecker
10License: LGPL 10License: LGPL
diff --git a/noncore/net/opierdesktop/opie-rdesktop.control b/noncore/net/opierdesktop/opie-rdesktop.control
index 2a9d415..754e572 100644
--- a/noncore/net/opierdesktop/opie-rdesktop.control
+++ b/noncore/net/opierdesktop/opie-rdesktop.control
@@ -1,9 +1,9 @@
1Package: opie-rdesktop 1Package: opie-rdesktop
2Files: bin/ordesktop pics/opierdesktop apps/Applications/ordesktop.desktop 2Files: bin/ordesktop pics/opierdesktop apps/Applications/ordesktop.desktop
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org> 5Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.2.0$EXTRAVERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9Description: Remote Desktop Protocol (RDP) Client 9Description: Remote Desktop Protocol (RDP) Client
diff --git a/noncore/net/opietooth/blue-pin/opie-bluepin.control b/noncore/net/opietooth/blue-pin/opie-bluepin.control
index e9aa683..3d94691 100644
--- a/noncore/net/opietooth/blue-pin/opie-bluepin.control
+++ b/noncore/net/opietooth/blue-pin/opie-bluepin.control
@@ -1,10 +1,10 @@
1Package: opie-bluepin 1Package: opie-bluepin
2Files: plugins/application/libbluepin.so* bin/bluepin 2Files: plugins/application/libbluepin.so* bin/bluepin
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Holger Freyther <zecke@handhelds.org> 5Maintainer: Holger Freyther <zecke@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.3.4$EXTRAVERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9License: GPL 9License: GPL
10Description: Bluetooth pin application 10Description: Bluetooth pin application
diff --git a/noncore/net/opietooth/manager/opie-bluetoothmanager.control b/noncore/net/opietooth/manager/opie-bluetoothmanager.control
index 89ab698..5a4d01d 100644
--- a/noncore/net/opietooth/manager/opie-bluetoothmanager.control
+++ b/noncore/net/opietooth/manager/opie-bluetoothmanager.control
@@ -1,10 +1,10 @@
1Package: opie-bluetoothmanager 1Package: opie-bluetoothmanager
2Files: plugins/application/libbluetooth-manager.so* bin/bluetooth-manager apps/Settings/bluetooth-manager.desktop pics/opietooth/* 2Files: plugins/application/libbluetooth-manager.so* bin/bluetooth-manager apps/Settings/bluetooth-manager.desktop pics/opietooth/*
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Maximilian Reiß <max.reiss@gmx.de> 5Maintainer: Maximilian Reiß <max.reiss@gmx.de>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.5.4$EXTRAVERSION
8Depends: task-opie-minimal, libopietooth1, opie-bluepin 8Depends: task-opie-minimal, libopietooth1, opie-bluepin
9License: GPL 9License: GPL
10Description: Bluetooth Manager application 10Description: Bluetooth Manager application
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control
index 7dc9c22..2c36d17 100644
--- a/noncore/net/wellenreiter/opie-wellenreiter.control
+++ b/noncore/net/wellenreiter/opie-wellenreiter.control
@@ -1,10 +1,10 @@
1Package: opie-wellenreiter 1Package: opie-wellenreiter
2Files: bin/wellenreiter pics/wellenreiter apps/Applications/wellenreiter.desktop 2Files: bin/wellenreiter pics/wellenreiter apps/Applications/wellenreiter.desktop
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org> 5Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.0.3$EXTRAVERSION
8Depends: libqpe1, libpcap0.8 (>=0.7.2), libopiecore2, libopienet2, libopieui2 8Depends: libqpe1, libpcap0.8 (>=0.7.2), libopiecore2, libopienet2, libopieui2
9Description: A WaveLAN Network Monitor 9Description: A WaveLAN Network Monitor
10 A WaveLAN Network Monitor/Sniffer for the Opie Environment. 10 A WaveLAN Network Monitor/Sniffer for the Opie Environment.
diff --git a/noncore/securityplugins/blueping/bluepingplugin.control b/noncore/securityplugins/blueping/bluepingplugin.control
index 62562f7..4b3e96a 100644
--- a/noncore/securityplugins/blueping/bluepingplugin.control
+++ b/noncore/securityplugins/blueping/bluepingplugin.control
@@ -1,11 +1,11 @@
1Package: opie-multiauth-bluepingplugin 1Package: opie-multiauth-bluepingplugin
2Files: plugins/security/libmultiauthbluepingplugin.so* pics/security/bluepingplugin.png root/etc/suspend-scripts/S50bluetooth 2Files: plugins/security/libmultiauthbluepingplugin.so* pics/security/bluepingplugin.png root/etc/suspend-scripts/S50bluetooth
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Clement Seveillac <clement@nist.gov> 5Maintainer: Clement Seveillac <clement@nist.gov>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.0.2$EXTRAVERSION
8Depends: libopiecore2, opie-security, bluez-utils (<= 2.3rel-hh5) 8Depends: libopiecore2, opie-security, bluez-utils (<= 2.3rel-hh5)
9Description: Blueping plugin for opie-security authentication. 9Description: Blueping plugin for opie-security authentication.
10 This is a bluetooth-based authentication plugin (you need 10 This is a bluetooth-based authentication plugin (you need
11 to have another Bluetooth device around to use it). 11 to have another Bluetooth device around to use it).
diff --git a/noncore/securityplugins/dummy/dummyplugin.control b/noncore/securityplugins/dummy/dummyplugin.control
index b4cc5e2..bfd4d8d 100644
--- a/noncore/securityplugins/dummy/dummyplugin.control
+++ b/noncore/securityplugins/dummy/dummyplugin.control
@@ -1,11 +1,11 @@
1Package: opie-multiauth-dummyplugin 1Package: opie-multiauth-dummyplugin
2Files: plugins/security/libmultiauthdummyplugin.so* pics/security/dummyplugin.png 2Files: plugins/security/libmultiauthdummyplugin.so* pics/security/dummyplugin.png
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Clement Seveillac <clement@nist.gov> 5Maintainer: Clement Seveillac <clement@nist.gov>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.0.2$EXTRAVERSION
8Depends: libopiecore2, opie-security 8Depends: libopiecore2, opie-security
9Description: Dummy plugin for opie-security authentication. 9Description: Dummy plugin for opie-security authentication.
10 This is a very simple authentication plugin (you just have 10 This is a very simple authentication plugin (you just have
11 to press a button basically), for demonstration purpose. 11 to press a button basically), for demonstration purpose.
diff --git a/noncore/securityplugins/notice/notice.control b/noncore/securityplugins/notice/notice.control
index 091ce74..29a8fb7 100644
--- a/noncore/securityplugins/notice/notice.control
+++ b/noncore/securityplugins/notice/notice.control
@@ -1,11 +1,11 @@
1Package: opie-multiauth-noticeplugin 1Package: opie-multiauth-noticeplugin
2Files: plugins/security/libmultiauthnoticeplugin.so* pics/security/noticeplugin.png pics/security/noticeplugin_small.png 2Files: plugins/security/libmultiauthnoticeplugin.so* pics/security/noticeplugin.png pics/security/noticeplugin_small.png
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Clement Seveillac <clement@nist.gov> 5Maintainer: Clement Seveillac <clement@nist.gov>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.0.1$EXTRAVERSION
8Depends: libopiecore2, opie-security 8Depends: libopiecore2, opie-security
9Description: Notice plugin for opie-security authentication. 9Description: Notice plugin for opie-security authentication.
10 It allows you to display e.g. a notice from your legal departement. 10 It allows you to display e.g. a notice from your legal departement.
11 11
diff --git a/noncore/securityplugins/pin/pin.control b/noncore/securityplugins/pin/pin.control
index 51c3f08..9235f04 100644
--- a/noncore/securityplugins/pin/pin.control
+++ b/noncore/securityplugins/pin/pin.control
@@ -1,11 +1,11 @@
1Package: opie-multiauth-pinplugin 1Package: opie-multiauth-pinplugin
2Files: plugins/security/libmultiauthpinplugin.so* pics/security/pinplugin.png 2Files: plugins/security/libmultiauthpinplugin.so* pics/security/pinplugin.png
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Clement Seveillac <clement@nist.gov> 5Maintainer: Clement Seveillac <clement@nist.gov>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.0.2$EXTRAVERSION
8Depends: libopiecore2, opie-security 8Depends: libopiecore2, opie-security
9Description: PIN plugin for opie-security authentication. 9Description: PIN plugin for opie-security authentication.
10 Simple PIN-based authentication plugin (replicate the functionality 10 Simple PIN-based authentication plugin (replicate the functionality
11 Qtopia has, or Opie used to have, without plugins). 11 Qtopia has, or Opie used to have, without plugins).
diff --git a/noncore/tools/opie-sh/opie-sh.control b/noncore/tools/opie-sh/opie-sh.control
index 496a036..6627335 100644
--- a/noncore/tools/opie-sh/opie-sh.control
+++ b/noncore/tools/opie-sh/opie-sh.control
@@ -1,11 +1,11 @@
1Package: opie-sh 1Package: opie-sh
2Files: bin/opie-sh apps/Opie-SH/opie-sh.desktop pics/opie-sh/*.png help/opie-sh/*.html 2Files: bin/opie-sh apps/Opie-SH/opie-sh.desktop pics/opie-sh/*.png help/opie-sh/*.html
3Priority: optional 3Priority: optional
4Section: opie/sh 4Section: opie/sh
5Maintainer: Thomas Stephens <spiralman@softhome.net> 5Maintainer: Thomas Stephens <spiralman@softhome.net>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.5$EXTRAVERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9License: GPL 9License: GPL
10Description: A QDialog shell frontend 10Description: A QDialog shell frontend
11 A program to let you use various dialogs from the console (or a shell script) 11 A program to let you use various dialogs from the console (or a shell script)
diff --git a/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.control b/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.control
index 0d6b235..9450eee 100644
--- a/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.control
+++ b/noncore/tools/opie-sh/scripts/opie-sh-wavelanchooser.control
@@ -1,11 +1,11 @@
1Package: opie-sh-wavelanchooser 1Package: opie-sh-wavelanchooser
2Files: bin/opie-sh-wavelanchooser.sh apps/Opie-SH/opie-sh-wavelanchooser.desktop pics/opie-sh-scripts/qtwavelan.png 2Files: bin/opie-sh-wavelanchooser.sh apps/Opie-SH/opie-sh-wavelanchooser.desktop pics/opie-sh-scripts/qtwavelan.png
3Installed-Size: 0 3Installed-Size: 0
4Version: $QPE_VERSION$EXTRAVERSION 4Version: 0.1$EXTRAVERSION
5Depends: task-opie-minimal (1.5.0+), opie-sh 5Depends: task-opie-minimal (1.5.0+), opie-sh
6Priority: optional 6Priority: optional
7Section: opie/sh 7Section: opie/sh
8Maintainer: gonz <gonz@directbox.com> 8Maintainer: gonz <gonz@directbox.com>
9Architecture: all 9Architecture: all
10License: GPL 10License: GPL
11Description: Frontend to choose wavelan config 11Description: Frontend to choose wavelan config
diff --git a/noncore/unsupported/gsmtool/opie-gsmtool.control b/noncore/unsupported/gsmtool/opie-gsmtool.control
index d987b11..6c5e4a3 100644
--- a/noncore/unsupported/gsmtool/opie-gsmtool.control
+++ b/noncore/unsupported/gsmtool/opie-gsmtool.control
@@ -1,11 +1,11 @@
1Package: opie-gsmtool 1Package: opie-gsmtool
2Files: plugins/application/libgsmtool.so* bin/gsmtool apps/Applications/gsmtool.desktop pics/gsmtool 2Files: plugins/application/libgsmtool.so* bin/gsmtool apps/Applications/gsmtool.desktop pics/gsmtool
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: David Woodhouse <dwmw2@infradead.org> 5Maintainer: David Woodhouse <dwmw2@infradead.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 1.0.0$EXTRAVERSION
8Depends: task-opie-minimal, gsmlib 8Depends: task-opie-minimal, gsmlib
9License: Public Domain 9License: Public Domain
10Description: GSMTool program 10Description: GSMTool program
11 An GSM phone utility program for the Opie environment. 11 An GSM phone utility program for the Opie environment.
diff --git a/noncore/unsupported/ubrowser/opie-ubrowser.control b/noncore/unsupported/ubrowser/opie-ubrowser.control
index bfa6c30..349a7df 100644
--- a/noncore/unsupported/ubrowser/opie-ubrowser.control
+++ b/noncore/unsupported/ubrowser/opie-ubrowser.control
@@ -1,10 +1,10 @@
1Package: opie-ubrowser 1Package: opie-ubrowser
2Files: bin/ubrowser apps/Applications/ubrowser.desktop pics/ubrowser/*.png plugins/application/libubrowser.so* 2Files: bin/ubrowser apps/Applications/ubrowser.desktop pics/ubrowser/*.png plugins/application/libubrowser.so*
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Thomas Stephens <spiralman@softhome.net> 5Maintainer: Thomas Stephens <spiralman@softhome.net>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: 0.1$EXTRAVERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9License: GPL 9License: GPL
10Description: A very small web browser 10Description: A very small web browser
diff --git a/scripts/GeneratePackageMake b/scripts/GeneratePackageMake
index 099d3e8..9d692a9 100755
--- a/scripts/GeneratePackageMake
+++ b/scripts/GeneratePackageMake
@@ -1,228 +1,228 @@
1# generate file containg control name / package name / files 1# generate file containg control name / package name / files
2find . -name *.control | grep -v -- "-mt.control" | while read i 2find . -name *.control | grep -v -- "-mt.control" | while read i
3do 3do
4 i=${i/.\//} 4 i=${i/.\//}
5 CDIR=${i%/*} 5 CDIR=${i%/*}
6 BNAME=${i##*/} 6 BNAME=${i##*/}
7 BNAME=${BNAME/.control/} 7 BNAME=${BNAME/.control/}
8 echo "cdir: ${CDIR}" 8 echo "cdir: ${CDIR}"
9 echo "bname: ${BNAME}" 9 echo "bname: ${BNAME}"
10 grep -e "Package:" -e "Files:" ./${i} 10 grep -e "Package:" -e "Files:" ./${i}
11done > /tmp/ALL 11done > /tmp/ALL
12 12
13# 13#
14# makefile header 14# makefile header
15# 15#
16 16
17cat << MAKEFILEHEADER 17cat << MAKEFILEHEADER
18 18
19# 19#
20# generate -mt.control file from regular control 20# generate -mt.control file from regular control
21# arg 1 : path to control file to convert 21# arg 1 : path to control file to convert
22# 22#
23 23
24define GenerateMTControl 24define GenerateMTControl
25@echo "Generating -mt control file for \$(basename \$<)" 25@echo "Generating -mt control file for \$(basename \$<)"
26@\$(OPIEDIR)/scripts/tothreaded \$< \$(OPIEDIR)/AllThreadedPackages 26@\$(OPIEDIR)/scripts/tothreaded \$< \$(OPIEDIR)/AllThreadedPackages
27endef 27endef
28 28
29# 29#
30# package one control file 30# package one control file
31# arg 1 : directory from OPIEROOT where control file resides 31# arg 1 : directory from OPIEROOT where control file resides
32# arg 2 : control file basename without -mt (no .control) 32# arg 2 : control file basename without -mt (no .control)
33# arg 3 : control file basename with -mt if needed 33# arg 3 : control file basename with -mt if needed
34# arg 4 : package name (value specified by Package: ...) 34# arg 4 : package name (value specified by Package: ...)
35# 35#
36 36
37define DoPackage 37define DoPackage
38@echo \"Building ipk of \$(4)\" 38echo \"Building ipk of \$(4)\"
39@( \$(ForSubst) ) > \$(TOPDIR)/scripts/subst 39( \$(ForSubst) ) > \$(TOPDIR)/scripts/subst
40@( \$(ForFileSubst) ) > \$(TOPDIR)/scripts/Filesubst 40( \$(ForFileSubst) ) > \$(TOPDIR)/scripts/Filesubst
41@( cd \$(OPIEDIR); \\ 41( cd \$(OPIEDIR); \\
42 \$(OPIEDIR)/scripts/mkipkg \\ 42 \$(OPIEDIR)/scripts/mkipkg \\
43 --subst=\$(OPIEDIR)/scripts/subst \\ 43 --subst=\$(OPIEDIR)/scripts/subst \\
44 --filesubst=\$(OPIEDIR)/scripts/filesubst \\ 44 --filesubst=\$(OPIEDIR)/scripts/filesubst \\
45 --control=\$(OPIEDIR)/\$(1)/\$(3).control \\ 45 --control=\$(OPIEDIR)/\$(1)/\$(3).control \\
46 --prerm=\$(OPIEDIR)/\$(1)/\$(2).prerm \\ 46 --prerm=\$(OPIEDIR)/\$(1)/\$(2).prerm \\
47 --preinst=\$(OPIEDIR)/\$(1)/\$(2).preinst \\ 47 --preinst=\$(OPIEDIR)/\$(1)/\$(2).preinst \\
48 --postrm=\$(OPIEDIR)/\$(1)/\$(2).postrm \\ 48 --postrm=\$(OPIEDIR)/\$(1)/\$(2).postrm \\
49 --postinst=\$(OPIEDIR)/\$(1)/\$(2).postinst \\ 49 --postinst=\$(OPIEDIR)/\$(1)/\$(2).postinst \\
50 --strip=\$(STRIP) \$(OPIEDIR); \\ 50 --strip=\$(STRIP) \$(OPIEDIR); \\
51 rm -f \$(OPIEDIR)/Packages/\$(4)_*.ipk; \\ 51 rm -f \$(OPIEDIR)/Packages/\$(4)_*.ipk; \\
52 mv *.ipk \$(OPIEDIR)/Packages; \\ 52 mv *.ipk \$(OPIEDIR)/Packages; \\
53 touch \$(OPIEDIR)/Packages/\$(4) \\ 53 touch \$(OPIEDIR)/Packages/\$(4) \\
54) || true 54) || true
55endef 55endef
56 56
57# 57#
58# prepared for generating the substfile for every build 58# prepared for generating the substfile for every build
59# 59#
60 60
61define ForSubst 61define ForSubst
62echo 's,\\\$\$QPE_VERSION,\$(QPE_VERSION),g'; \\ 62echo 's,\\\$\$QPE_VERSION,\$(QPE_VERSION),g'; \\
63echo 's,\\\$\$OPIE_VERSION,\$(OPIE_VERSION),g'; \\ 63echo 's,\\\$\$OPIE_VERSION,\$(OPIE_VERSION),g'; \\
64echo 's,\\\$\$QTE_VERSION,\$(QTE_VERSION),g'; \\ 64echo 's,\\\$\$QTE_VERSION,\$(QTE_VERSION),g'; \\
65echo 's,\\\$\$QTE_REVISION,\$(QTE_REVISION),g'; \\ 65echo 's,\\\$\$QTE_REVISION,\$(QTE_REVISION),g'; \\
66echo 's,\\\$\$SUB_VERSION,\$(SUB_VERSION),g'; \\ 66echo 's,\\\$\$SUB_VERSION,\$(SUB_VERSION),g'; \\
67echo 's,\\\$\$EXTRAVERSION,\$(EXTRAVERSION),g'; \\ 67echo 's,\\\$\$EXTRAVERSION,\$(EXTRAVERSION),g'; \\
68echo 's,\\\$\$QTE_BASEVERSION,\$(QTE_BASEVERSION),g' 68echo 's,\\\$\$QTE_BASEVERSION,\$(QTE_BASEVERSION),g'
69endef 69endef
70 70
71define ForFileSubst 71define ForFileSubst
72echo 's,\\\$\$OPIEDIR/root/,/,g'; \\ 72echo 's,\\\$\$OPIEDIR/root/,/,g'; \\
73echo 's,\$(OPIEDIR)/root/,/,g'; \\ 73echo 's,\$(OPIEDIR)/root/,/,g'; \\
74echo 's,\\\$\$OPIEDIR,\$(prefix),g'; \\ 74echo 's,\\\$\$OPIEDIR,\$(prefix),g'; \\
75echo 's,\$(OPIEDIR),\$(prefix),g'; \\ 75echo 's,\$(OPIEDIR),\$(prefix),g'; \\
76echo 's,\\\$\$QTDIR,\$(prefix),g'; \\ 76echo 's,\\\$\$QTDIR,\$(prefix),g'; \\
77echo 's,\$(QTDIR),\$(prefix),g'; \\ 77echo 's,\$(QTDIR),\$(prefix),g'; \\
78echo 's,^\(\./\)*root/,/,g'; \\ 78echo 's,^\(\./\)*root/,/,g'; \\
79echo 's,^\(\./\)*etc/,\$(prefix)/etc/,g'; \\ 79echo 's,^\(\./\)*etc/,\$(prefix)/etc/,g'; \\
80echo 's,^\(\./\)*lib/,\$(prefix)/lib/,g'; \\ 80echo 's,^\(\./\)*lib/,\$(prefix)/lib/,g'; \\
81echo 's,^\(\./\)*bin/,\$(prefix)/bin/,g'; \\ 81echo 's,^\(\./\)*bin/,\$(prefix)/bin/,g'; \\
82echo 's,^\(\./\)*pics/,\$(prefix)/pics/,g'; \\ 82echo 's,^\(\./\)*pics/,\$(prefix)/pics/,g'; \\
83echo 's,^\(\./\)*sounds/,\$(prefix)/sounds/,g'; \\ 83echo 's,^\(\./\)*sounds/,\$(prefix)/sounds/,g'; \\
84echo 's,^\(\./\)*i18n/,\$(prefix)/i18n/,g'; \\ 84echo 's,^\(\./\)*i18n/,\$(prefix)/i18n/,g'; \\
85echo 's,^\(\./\)*plugins/,\$(prefix)/plugins/,g'; \\ 85echo 's,^\(\./\)*plugins/,\$(prefix)/plugins/,g'; \\
86echo 's,^\(\./\)*apps/,\$(prefix)/apps/,g'; \\ 86echo 's,^\(\./\)*apps/,\$(prefix)/apps/,g'; \\
87echo 's,^\(\./\)*share/,\$(prefix)/share/,g'; \\ 87echo 's,^\(\./\)*share/,\$(prefix)/share/,g'; \\
88echo 's,^\(\./\)*i18n/,\$(prefix)/i18n/,g'; \\ 88echo 's,^\(\./\)*i18n/,\$(prefix)/i18n/,g'; \\
89echo 's,^\(\./\)*help/,\$(prefix)/help/,g' 89echo 's,^\(\./\)*help/,\$(prefix)/help/,g'
90endef 90endef
91 91
92# 92#
93# Will contain a list of all non-mt control files 93# Will contain a list of all non-mt control files
94ALLCONTROLFILES= 94ALLCONTROLFILES=
95 95
96# 96#
97# Will contain a list of all packaging targets 97# Will contain a list of all packaging targets
98ALLPACKAGES= 98ALLPACKAGES=
99 99
100# s contains now single space 100# s contains now single space
101s=\$(x) \$(x) 101s=\$(x) \$(x)
102 102
103# 103#
104# for convenience : generate AllTh 104# for convenience : generate AllTh
105ATP=\$(OPIEDIR)/AllThreadedPackages 105ATP=\$(OPIEDIR)/AllThreadedPackages
106 106
107MAKEFILEHEADER 107MAKEFILEHEADER
108 108
109while read k 109while read k
110do 110do
111 CDIR="${k#* }" 111 CDIR="${k#* }"
112 read k 112 read k
113 BNAME="${k#* }" 113 BNAME="${k#* }"
114 read k 114 read k
115 case $k in 115 case $k in
116 *"ackage:"*) 116 *"ackage:"*)
117 Pkg="${k#* }" 117 Pkg="${k#* }"
118 Pkg="${Pkg// }" 118 Pkg="${Pkg// }"
119 ;; 119 ;;
120 *"iles:"*) 120 *"iles:"*)
121 Files="${k/Files:/}" 121 Files="${k/Files:/}"
122 ;; 122 ;;
123 esac 123 esac
124 read k 124 read k
125 case $k in 125 case $k in
126 *"ackage:"*) 126 *"ackage:"*)
127 Pkg="${k#* }" 127 Pkg="${k#* }"
128 Pkg="${Pkg// }" 128 Pkg="${Pkg// }"
129 ;; 129 ;;
130 *"iles:"*) 130 *"iles:"*)
131 Files="${k/Files:/}" 131 Files="${k/Files:/}"
132 ;; 132 ;;
133 esac 133 esac
134 134
135 cat << HERE 135 cat << HERE
136# 136#
137# package $Pkg in ${BNAME} 137# package $Pkg in ${BNAME}
138# 138#
139 139
140package-${Pkg} : \$(OPIEDIR)/Packages/$Pkg 140package-${Pkg} : \$(OPIEDIR)/Packages/$Pkg
141package-${Pkg}-mt : \$(ATP) \$(OPIEDIR)/Packages/$Pkg-mt 141package-${Pkg}-mt : \$(ATP) \$(OPIEDIR)/Packages/$Pkg-mt
142 142
143# collect control files and package targets 143# collect control files and package targets
144 144
145ALLCONTROLFILES += ${CDIR}/${BNAME}.control 145ALLCONTROLFILES += ${CDIR}/${BNAME}.control
146ALLPACKAGES += $Pkg 146ALLPACKAGES += $Pkg
147 147
148# to generate -mt control file 148# to generate -mt control file
149\$(OPIEDIR)/${CDIR}/${BNAME}-mt.control : \$(OPIEDIR)/${CDIR}/${BNAME}.control 149\$(OPIEDIR)/${CDIR}/${BNAME}-mt.control : \$(OPIEDIR)/${CDIR}/${BNAME}.control
150 \$(GenerateMTControl) 150 \$(GenerateMTControl)
151 151
152HERE 152HERE
153 153
154 if [ ! -z "${Files}" ] 154 if [ ! -z "${Files}" ]
155 then 155 then
156 156
157 cat << HERE 157 cat << HERE
158# optimize speed 158# optimize speed
159.phony : \$(wildcard \$(addprefix \$(OPIEDIR)/,${Files})) 159.phony : \$(wildcard \$(addprefix \$(OPIEDIR)/,${Files}))
160 160
161# capture missing files (because not built) 161# capture missing files (because not built)
162\$(OPIEDIR)/Packages/$Pkg \$(OPIEDIR)/Packages/$Pkg-mt \$(SUBSTFILES): \$(wildcard \$(addprefix \$(OPIEDIR)/,${Files})) 162\$(OPIEDIR)/Packages/$Pkg \$(OPIEDIR)/Packages/$Pkg-mt \$(SUBSTFILES): \$(wildcard \$(addprefix \$(OPIEDIR)/,${Files}))
163HERE 163HERE
164 164
165# echo "\$(wildcard \$(addprefix \$(OPIEDIR)/,${Files})) : " 165# echo "\$(wildcard \$(addprefix \$(OPIEDIR)/,${Files})) : "
166 166
167 fi 167 fi
168 168
169 cat << HERE 169 cat << HERE
170\$(OPIEDIR)/Packages/$Pkg : \$(OPIEDIR)/${CDIR}/${BNAME}.control 170\$(OPIEDIR)/Packages/$Pkg : \$(OPIEDIR)/${CDIR}/${BNAME}.control
171 @\$(call DoPackage,${CDIR},${BNAME},${BNAME},${Pkg}) 171 @\$(call DoPackage,${CDIR},${BNAME},${BNAME},${Pkg})
172\$(OPIEDIR)/Packages/$Pkg-mt : \$(OPIEDIR)/${CDIR}/${BNAME}-mt.control 172\$(OPIEDIR)/Packages/$Pkg-mt : \$(OPIEDIR)/${CDIR}/${BNAME}-mt.control
173 @\$(call DoPackage,${CDIR},${BNAME},${BNAME}-mt,${Pkg}-mt) 173 @\$(call DoPackage,${CDIR},${BNAME},${BNAME}-mt,${Pkg}-mt)
174 174
175HERE 175HERE
176 176
177done < /tmp/ALL 177done < /tmp/ALL
178 178
179cat << HERE 179cat << HERE
180# 180#
181# regenerate package file if control files are modified 181# regenerate package file if control files are modified
182# 182#
183 183
184Package.make : \$(addprefix \$(OPIEDIR)/,\$(ALLCONTROLFILES)) 184Package.make : \$(addprefix \$(OPIEDIR)/,\$(ALLCONTROLFILES))
185 185
186# 186#
187# make targets to build packages 187# make targets to build packages
188# needs quicklauncher link in location (because dangling 188# needs quicklauncher link in location (because dangling
189# links are not considered as true files by the wildcard command) 189# links are not considered as true files by the wildcard command)
190# 190#
191# if you want to build one package only then use 191# if you want to build one package only then use
192# make package-<basenameof control> 192# make package-<basenameof control>
193# or make package-<basenameof control>-mt 193# or make package-<basenameof control>-mt
194# 194#
195 195
196packages : /opt/QtPalmtop/bin/quicklauncher \\ 196packages : /opt/QtPalmtop/bin/quicklauncher \\
197 \$(OPIEDIR)/Packages \\ 197 \$(OPIEDIR)/Packages \\
198 \$(add prefix \$(OPIEDIR)/Packages/,\$(ALLPACKAGES)) 198 \$(add prefix \$(OPIEDIR)/Packages/,\$(ALLPACKAGES))
199packages-mt : /opt/QtPalmtop/bin/quicklauncher \\ 199packages-mt : /opt/QtPalmtop/bin/quicklauncher \\
200 \$(ATP) \\ 200 \$(ATP) \\
201 \$(OPIEDIR)/Packages \\ 201 \$(OPIEDIR)/Packages \\
202 \$(addprefix \$(OPIEDIR)/Packages/,\$(addsuffix -mt,\$(ALLPACKAGES))) 202 \$(addprefix \$(OPIEDIR)/Packages/,\$(addsuffix -mt,\$(ALLPACKAGES)))
203 203
204# 204#
205# capture missing quichlauncher link 205# capture missing quichlauncher link
206# 206#
207 207
208/opt/QtPalmtop/bin/quicklauncher : 208/opt/QtPalmtop/bin/quicklauncher :
209 @echo "create a link from /opt/QtPalmtop to \$(OPIEDIR) for this target to work" 209 @echo "create a link from /opt/QtPalmtop to \$(OPIEDIR) for this target to work"
210 exit 2 210 exit 2
211 211
212# 212#
213# Create Packages directory 213# Create Packages directory
214# 214#
215 215
216\$(OPIEDIR)/Packages : 216\$(OPIEDIR)/Packages :
217 @mkdir \$(OPIEDIR)/Packages 217 @mkdir \$(OPIEDIR)/Packages
218 218
219# 219#
220# update file containing all packages 220# update file containing all packages
221# 221#
222 222
223\$(ATP) : \$(addprefix \$(OPIEDIR)/,\$(ALLCONTROLFILES)) 223\$(ATP) : \$(addprefix \$(OPIEDIR)/,\$(ALLCONTROLFILES))
224 @echo "Generating \$(notdir \$(ATP))" 224 @echo "Generating \$(notdir \$(ATP))"
225 @echo -e "\$(subst \$(s),,\$(foreach i,\$(ALLPACKAGES),\$(i)\n))" > \$@ 225 @echo -e "\$(subst \$(s),,\$(foreach i,\$(ALLPACKAGES),\$(i)\n))" > \$@
226HERE 226HERE
227 227
228rm /tmp/ALL 228rm /tmp/ALL
diff --git a/scripts/mkipkg b/scripts/mkipkg
index a336371..2f020f4 100755
--- a/scripts/mkipkg
+++ b/scripts/mkipkg
@@ -1,388 +1,392 @@
1#!/bin/sh 1#!/bin/sh
2# vim: et sw=4 2# vim: et sw=4
3 3
4# TODO: srcdir!=builddir 4# TODO: srcdir!=builddir
5 5
6usage() 6usage()
7{ 7{
8 echo "usage: $self --destdir=[destination installation directory]" 8 echo "usage: $self --destdir=[destination installation directory]"
9 echo "usage: $self [destination installation directory]" 9 echo "usage: $self [destination installation directory]"
10 exit 1 10 exit 1
11} 11}
12 12
13self=mkipkg 13self=mkipkg
14destdir= 14destdir=
15strip=strip 15strip=strip
16control= 16control=
17builddir= 17builddir=
18srcdir= 18srcdir=
19prefix= 19prefix=
20preinst= 20preinst=
21postinst= 21postinst=
22prerm= 22prerm=
23postrm= 23postrm=
24mkfsjffs2= 24mkfsjffs2=
25ipkgbuild=ipkg-build 25ipkgbuild=ipkg-build
26buildversion= 26buildversion=
27subst= 27subst=
28user=root 28user=root
29group=root 29group=root
30filesubst= 30filesubst=
31 31
32oldpwd= 32oldpwd=
33 33
34for option 34for option
35do 35do
36 case "$option" in 36 case "$option" in
37 -*=*) 37 -*=*)
38 arg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` 38 arg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'`
39 ;; 39 ;;
40 esac 40 esac
41 41
42 case "$option" in 42 case "$option" in
43 --destdir=*) 43 --destdir=*)
44 destdir=$arg 44 destdir=$arg
45 ;; 45 ;;
46 --strip=*) 46 --strip=*)
47 strip=$arg 47 strip=$arg
48 ;; 48 ;;
49 --control=*) 49 --control=*)
50 control=$arg 50 control=$arg
51 ;; 51 ;;
52 --preinst=*) 52 --preinst=*)
53 preinst=$arg 53 preinst=$arg
54 ;; 54 ;;
55 --postinst=*) 55 --postinst=*)
56 postinst=$arg 56 postinst=$arg
57 ;; 57 ;;
58 --prerm=*) 58 --prerm=*)
59 prerm=$arg 59 prerm=$arg
60 ;; 60 ;;
61 --postrm=*) 61 --postrm=*)
62 postrm=$arg 62 postrm=$arg
63 ;; 63 ;;
64 --builddir=*) 64 --builddir=*)
65 builddir=$arg 65 builddir=$arg
66 ;; 66 ;;
67 --srcdir=*) 67 --srcdir=*)
68 srcdir=$arg 68 srcdir=$arg
69 ;; 69 ;;
70 --prefix=*) 70 --prefix=*)
71 prefix=$arg 71 prefix=$arg
72 ;; 72 ;;
73 --mkfsjffs2=*) 73 --mkfsjffs2=*)
74 mkfsjffs2=$arg 74 mkfsjffs2=$arg
75 ;; 75 ;;
76 --ipkgbuild=*) 76 --ipkgbuild=*)
77 ipkgbuild=$arg 77 ipkgbuild=$arg
78 ;; 78 ;;
79 --buildversion=*) 79 --buildversion=*)
80 buildversion=$arg 80 buildversion=$arg
81 ;; 81 ;;
82 --subst=*) 82 --subst=*)
83 subst=$arg 83 subst=$arg
84 ;; 84 ;;
85 --user=*) 85 --user=*)
86 user=$arg 86 user=$arg
87 ;; 87 ;;
88 --group=*) 88 --group=*)
89 group=$arg 89 group=$arg
90 ;; 90 ;;
91 --filesubst=*) 91 --filesubst=*)
92 filesubst=$arg 92 filesubst=$arg
93 ;; 93 ;;
94 --classic) 94 --classic)
95 classic=-c 95 classic=-c
96 ;; 96 ;;
97 -*) 97 -*)
98 usage 98 usage
99 ;; 99 ;;
100 *) 100 *)
101 destdir=$option 101 destdir=$option
102 ;; 102 ;;
103 esac 103 esac
104done 104done
105 105
106if [ -z "$control" ]; then 106if [ -z "$control" ]; then
107 control=$destdir/CONTROL/control 107 control=$destdir/CONTROL/control
108fi 108fi
109if [ -z "$prerm" ]; then 109if [ -z "$prerm" ]; then
110 prerm=$destdir/CONTROL/prerm 110 prerm=$destdir/CONTROL/prerm
111fi 111fi
112if [ -z "$postrm" ]; then 112if [ -z "$postrm" ]; then
113 postrm=$destdir/CONTROL/postrm 113 postrm=$destdir/CONTROL/postrm
114fi 114fi
115if [ -z "$preinst" ]; then 115if [ -z "$preinst" ]; then
116 preinst=$destdir/CONTROL/preinst 116 preinst=$destdir/CONTROL/preinst
117fi 117fi
118if [ -z "$postinst" ]; then 118if [ -z "$postinst" ]; then
119 postinst=$destdir/CONTROL/postinst 119 postinst=$destdir/CONTROL/postinst
120fi 120fi
121 121
122# remove leading slash from prefix (to fix globbing) 122# remove leading slash from prefix (to fix globbing)
123if [ -n "$prefix" ]; then 123if [ -n "$prefix" ]; then
124 prefix=`echo $prefix | sed -e "s,/\(.*\),\\1,"` 124 prefix=`echo $prefix | sed -e "s,/\(.*\),\\1,"`
125fi 125fi
126 126
127if [ -z "$destdir" ]; then 127if [ -z "$destdir" ]; then
128 usage 128 usage
129fi 129fi
130 130
131if [ ! -r $control ]; then 131if [ ! -r $control ]; then
132 echo "$self: cannot find $control, exiting..." 132 echo "$self: cannot find $control, exiting..."
133 exit 1 133 exit 1
134fi 134fi
135 135
136if [ -z "`which $ipkgbuild 2>/dev/null`" ]; then 136if [ -z "`which $ipkgbuild 2>/dev/null`" ]; then
137 echo "$self: cannot find ipkg-build, exiting..." 137 echo "$self: cannot find ipkg-build, exiting..."
138 exit 1 138 exit 1
139fi 139fi
140 140
141findFile() 141findFile()
142{ 142{
143 local path= 143 local path=
144 if [ $# = 1 ]; then 144 if [ $# = 1 ]; then
145 find $1 -type f -o -type b -o -type c -o -type l 145 find $1 -type f -o -type b -o -type c -o -type l
146 find $1 -type d -a -empty 146 find $1 -type d -a -empty
147 else 147 else
148 find . -type f -o -type b -o -type c -o -type l | \ 148 find . -type f -o -type b -o -type c -o -type l | \
149 sed -e "s,\./\(.*\),\\1,g" 149 sed -e "s,\./\(.*\),\\1,g"
150 find . -type d -a -empty 150 find . -type d -a -empty
151 fi 151 fi
152} 152}
153 153
154_pushd() { oldpwd=`pwd`; cd $1; } 154_pushd() { oldpwd=`pwd`; cd $1; }
155_popd() { cd $oldpwd; } 155_popd() { cd $oldpwd; }
156 156
157setVar() 157setVar()
158{ 158{
159 eval "$1='$2'" 159 eval "$1='$2'"
160} 160}
161 161
162expandMaskToList() 162expandMaskToList()
163{ 163{
164 local _list=`echo $1` 164 local _list=`echo $1`
165 local _tmpFileList= 165 local _tmpFileList=
166 for f in $_list; do 166 for f in $_list; do
167 if [ -d $f ]; then 167 if [ -d $f ]; then
168 f="`findFile $f`" 168 f="`findFile $f`"
169 fi 169 fi
170 _tmpFileList="`eval echo $f` $_tmpFileList" 170 _tmpFileList="`eval echo $f` $_tmpFileList"
171 done 171 done
172 setVar $2 "$_tmpFileList" 172 setVar $2 "$_tmpFileList"
173} 173}
174 174
175createFileList() 175createFileList()
176{ 176{
177 local excludeMask 177 local excludeMask
178 local includeMask 178 local includeMask
179 local includemaskpresent=0 179 local includemaskpresent=0
180 local excludemaskpresent=0 180 local excludemaskpresent=0
181 181
182 if (grep -q ^FileExcludeMask $1); then 182 if (grep -q ^FileExcludeMask $1); then
183 excludemaskpresent=1 183 excludemaskpresent=1
184 excludeMask=$(eval echo '"'$(sed -n -e "s,^FileExcludeMask: *,,p" $1)'"') 184 excludeMask=$(eval echo '"'$(sed -n -e "s,^FileExcludeMask: *,,p" $1)'"')
185 fi 185 fi
186 if (grep -q ^FileIncludeMask $1); then 186 if (grep -q ^FileIncludeMask $1); then
187 includemaskpresent=1 187 includemaskpresent=1
188 includeMask=$(eval echo '"'$(sed -n -e "s,^FileIncludeMask: *,,p" $1)'"') 188 includeMask=$(eval echo '"'$(sed -n -e "s,^FileIncludeMask: *,,p" $1)'"')
189 else 189 else
190 if (grep -q ^Files: $1); then 190 if (grep -q ^Files: $1); then
191 includemaskpresent=1 191 includemaskpresent=1
192 includeMask=$(eval echo '"'$(sed -n -e "s,^Files: *,,p" $1)'"') 192 includeMask=$(eval echo '"'$(sed -n -e "s,^Files: *,,p" $1)'"')
193 fi 193 fi
194 fi 194 fi
195 195
196 _pushd $destdir 196 _pushd $destdir
197 197
198 declare -a excludeMaskArray 198 declare -a excludeMaskArray
199 excludeMaskArray=( $excludeMask ) 199 excludeMaskArray=( $excludeMask )
200 excludeMaskArray=( "${excludeMaskArray[@]}" "CONTROL/*" "usr/share/*" ) 200 excludeMaskArray=( "${excludeMaskArray[@]}" "CONTROL/*" "usr/share/*" )
201 201
202 if [ $includemaskpresent != 1 ]; then 202 if [ $includemaskpresent != 1 ]; then
203 includeMask="." 203 includeMask="."
204 fi 204 fi
205 205
206 if [ -z "$includeMask" ]; then 206 if [ -z "$includeMask" ]; then
207 setVar $2 "" 207 setVar $2 ""
208 _popd 208 _popd
209 return 0 209 return 0
210 fi 210 fi
211 211
212 expandMaskToList "$includeMask" _fileList 212 expandMaskToList "$includeMask" _fileList
213 213
214 excludeMaskArray=( "${excludeMaskArray[@]}" "*/CVS*" "*/SCCS*" ) 214 excludeMaskArray=( "${excludeMaskArray[@]}" "*/CVS*" "*/SCCS*" )
215 215
216 local realFileList= 216 local realFileList=
217 local missing=0 217 local missing=0
218 for file in $_fileList; do 218 for file in $_fileList; do
219 local containedInList=0 219 local containedInList=0
220 for i in "${excludeMaskArray[@]}"; do 220 for i in "${excludeMaskArray[@]}"; do
221 if [[ $file == $i ]]; then 221 if [[ $file == $i ]]; then
222 containedInList=1 222 containedInList=1
223 break; 223 break;
224 fi 224 fi
225 done 225 done
226 226
227 if [ $containedInList = 0 ]; then 227 if [ $containedInList = 0 ]; then
228 if ! [ -e $file -o -L $file ]; then 228 if ! [ -e $file -o -L $file ]; then
229 echo "$self: $file not found" 229 echo "$self: $file not found"
230 missing=1 230 missing=1
231 fi 231 fi
232 realFileList=$file" $realFileList" 232 realFileList=$file" $realFileList"
233 fi 233 fi
234 done 234 done
235 235
236 _popd 236 _popd
237 237
238 if [ $missing = 1 ]; then 238 if [ $missing = 1 ]; then
239 return 1 239 return 1
240 fi 240 fi
241 241
242 setVar $2 "$realFileList" 242 setVar $2 "$realFileList"
243} 243}
244 244
245stripFile() 245stripFile()
246{ 246{
247 if [ -f $1 -a -x $1 ]; then 247 if [ ! -h $1 -a -f $1 -a -x $1 ]; then
248 $strip --strip-all $1 248 $strip -p --strip-all $1
249 fi 249 fi
250} 250}
251 251
252substFile() 252substFile()
253{ 253{
254 local oldfile=$1 254 local oldfile=$1
255 255
256 if [ ! -e $2 ]; then return 1; fi 256 if [ ! -e $2 ]; then return 1; fi
257 257
258 if [ -e $oldfile -o -L $oldfile ]; then 258 if [ -e $oldfile -o -L $oldfile ]; then
259 newfile=`echo $oldfile|sed -f $2|sed -e's,^/,,g'` 259 newfile=`echo $oldfile|sed -f $2|sed -e's,^/,,g'`
260 olddir=`dirname $oldfile` 260 olddir=`dirname $oldfile`
261 base=`basename $oldfile` 261 base=`basename $oldfile`
262 newdir=`dirname $newfile` 262 newdir=`dirname $newfile`
263 263
264# echo >&2 moving $oldfile to $newfile 264# echo >&2 moving $oldfile to $newfile
265 265
266 if [ "$newdir" = "$olddir" ]; then 266 if [ "$newdir" = "$olddir" ]; then
267 return 0 267 return 0
268 fi 268 fi
269 269
270 mkdir -p $newdir 270 mkdir -p $newdir
271 mv $olddir/$base $newfile 271 mv $olddir/$base $newfile
272 rmdir -p $olddir 2>/dev/null 272 rmdir -p $olddir 2>/dev/null
273 fi 273 fi
274} 274}
275 275
276stripFiles() 276stripFiles()
277{ 277{
278 for f in $1; do 278 for f in $1; do
279 stripFile ./$f 279 # do not strip links
280 if [ ! -h ./$f ]
281 then
282 stripFile ./$f
283 fi
280 done 284 done
281} 285}
282 286
283substFiles() 287substFiles()
284{ 288{
285 for f in $1; do 289 for f in $1; do
286 substFile ./$f 290 substFile ./$f
287 done 291 done
288} 292}
289 293
290substAndStripFiles() 294substAndStripFiles()
291{ 295{
292 for f in $1; do 296 for f in $1; do
293 stripFile ./$f 297 stripFile ./$f
294 substFile ./$f $2 298 substFile ./$f $2
295 done 299 done
296} 300}
297 301
298installScript() 302installScript()
299{ 303{
300 if [ -n "$1" -a -f "$1" ]; then 304 if [ -n "$1" -a -f "$1" ]; then
301 destfile=`basename $1` 305 destfile=`basename $1`
302 filetype=`echo $destfile|cut -d. -f2` 306 filetype=`echo $destfile|cut -d. -f2`
303 if [ -n "$filetype" ]; then destfile=$filetype; fi 307 if [ -n "$filetype" ]; then destfile=$filetype; fi
304 if [ -n "$subst" ]; then 308 if [ -n "$subst" ]; then
305 sed -f $subst < $1 > $ctrldir/$destfile 309 sed -f $subst < $1 > $ctrldir/$destfile
306 else 310 else
307 cat $1 > $ctrldir/$destfile 311 cat $1 > $ctrldir/$destfile
308 fi 312 fi
309 chmod +x $ctrldir/$destfile 313 chmod +x $ctrldir/$destfile
310 fi 314 fi
311} 315}
312 316
313tempDir=/tmp/`basename $self`.$$ 317tempDir=/tmp/`basename $self`.$$
314mkdir -p $tempDir 318mkdir -p $tempDir
315if [ $? != 0 ]; then 319if [ $? != 0 ]; then
316 echo "$self: cannot create $tempDir, exiting..." 320 echo "$self: cannot create $tempDir, exiting..."
317 rm -rf $tempDir 321 rm -rf $tempDir
318 exit 1 322 exit 1
319fi 323fi
320 324
321ctrldir=$tempDir/CONTROL 325ctrldir=$tempDir/CONTROL
322 326
323mkdir -p $ctrldir 327mkdir -p $ctrldir
324 328
325if [ ! -e $subst ] || [ -z "$subst" ]; then 329if [ ! -e $subst ] || [ -z "$subst" ]; then
326 cat $control > $ctrldir/control.new 330 cat $control > $ctrldir/control.new
327else 331else
328 sed -f $subst < $control > $ctrldir/control.new 332 sed -f $subst < $control > $ctrldir/control.new
329fi 333fi
330 334
331createFileList $ctrldir/control.new ipkgFileList 335createFileList $ctrldir/control.new ipkgFileList
332 336
333if [ "$?" != "0" ]; then 337if [ "$?" != "0" ]; then
334 echo "$self: ERROR: missing files, not building $control" 338 echo "$self: ERROR: missing files, not building $control"
335 rm -rf $tempDir 339 rm -rf $tempDir
336 exit 1 340 exit 1
337fi 341fi
338 342
339 343
340cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control 344cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control
341rm -f $ctrldir/control.new 345rm -f $ctrldir/control.new
342 346
343( cd $destdir && tar -cf - $ipkgFileList 2>/dev/null ) | ( cd $tempDir && tar -xf - 2>/dev/null ) 347( cd $destdir && tar -cf - $ipkgFileList 2>/dev/null ) | ( cd $tempDir && tar -xf - 2>/dev/null )
344 348
345if [ -z "$filesubst" ]; then 349if [ -z "$filesubst" ]; then
346 ( cd $tempDir && stripFiles "$ipkgFileList" ) 350 ( cd $tempDir && stripFiles "$ipkgFileList" )
347else 351else
348 if ! (echo $filesubst|grep -q '^/'); then 352 if ! (echo $filesubst|grep -q '^/'); then
349 filesubst="$oldpwd/$filesubst" 353 filesubst="$oldpwd/$filesubst"
350 fi 354 fi
351 ( cd $tempDir && substAndStripFiles "$ipkgFileList" $filesubst ) 355 ( cd $tempDir && substAndStripFiles "$ipkgFileList" $filesubst )
352fi 356fi
353 357
354# removing CVS directories 358# removing CVS directories
355find $tempDir -name CVS -a -type d -print0 | xargs -0 rm -rf 359find $tempDir -name CVS -a -type d -print0 | xargs -0 rm -rf
356 360
357path="`echo "$PATH" | sed -e "s/\:/ /g"`" 361path="`echo "$PATH" | sed -e "s/\:/ /g"`"
358if [ -z "$mkfsjffs2" ]; then 362if [ -z "$mkfsjffs2" ]; then
359 for i in $path; do 363 for i in $path; do
360 if [ -x "$i/mkfs.jffs2" ]; then 364 if [ -x "$i/mkfs.jffs2" ]; then
361 mkfsjffs2="$i/mkfs.jffs2" 365 mkfsjffs2="$i/mkfs.jffs2"
362 break 366 break
363 fi 367 fi
364 done 368 done
365fi 369fi
366 370
367if [ -z "$mkfsjffs2" ]; then 371if [ -z "$mkfsjffs2" ]; then
368 echo "$self: WARNING: no mkjfs.jffs2 found in path. Falling back to using du" 372 echo "$self: WARNING: no mkjfs.jffs2 found in path. Falling back to using du"
369 echo "for size calculation. mkfs.jffs2 is recommended for size calculation" 373 echo "for size calculation. mkfs.jffs2 is recommended for size calculation"
370 echo "as it calculates the real package size on the compressed file system," 374 echo "as it calculates the real package size on the compressed file system,"
371 echo "in contrast to du calculating the uncompressed size!" 375 echo "in contrast to du calculating the uncompressed size!"
372 buildsize=`du -h -s $tempDir | awk '{print $1}'` 376 buildsize=`du -h -s $tempDir | awk '{print $1}'`
373else 377else
374 buildsize=`$mkfsjffs2 -r $tempDir | wc -c` 378 buildsize=`$mkfsjffs2 -r $tempDir | wc -c`
375fi 379fi
376 380
377if [ "$buildsize" != "0" ]; then 381if [ "$buildsize" != "0" ]; then
378 echo "Installed-Size: $buildsize" >> $ctrldir/control 382 echo "Installed-Size: $buildsize" >> $ctrldir/control
379fi 383fi
380 384
381installScript $preinst 385installScript $preinst
382installScript $postinst 386installScript $postinst
383installScript $prerm 387installScript $prerm
384installScript $posrm 388installScript $posrm
385 389
386$ipkgbuild $classic -o $user -g $group $tempDir 390$ipkgbuild $classic -o $user -g $group $tempDir
387 391
388rm -rf $tempDir 392rm -rf $tempDir
diff --git a/scripts/tothreaded b/scripts/tothreaded
index 31ed31e..f916ad8 100755
--- a/scripts/tothreaded
+++ b/scripts/tothreaded
@@ -1,136 +1,136 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# PURPOSE : 3# PURPOSE :
4# 4#
5# this script converts a non-threaded control file to a threaded one 5# this script converts a non-threaded control file to a threaded one
6# by extending appropriate names with -mt as extension 6# by extending appropriate names with -mt as extension
7# 7#
8# eg abc.control becoms abc-mt.control 8# eg abc.control becoms abc-mt.control
9# 9#
10 10
11# 11#
12# make sure that the depends expression has enough spaces 12# make sure that the depends expression has enough spaces
13# expression can contian : , ( ) || && 13# expression can contian : , ( ) || &&
14# 14#
15tokenize() { 15tokenize() {
16 sed "s/,/ & /g" | sed "s/)/ & /g" | sed "s/(/ & /g" | sed "s/|/ & /g" | sed "s/&/ & /g" 16 sed "s/,/ & /g" | sed "s/)/ & /g" | sed "s/(/ & /g" | sed "s/|/ & /g" | sed "s/&/ & /g"
17} 17}
18 18
19# 19#
20# function converts package name to threaded equivalend IF the 20# function converts package name to threaded equivalend IF the
21# package file HAS a threaded version 21# package file HAS a threaded version
22# 22#
23findthreadedequiv() { 23findthreadedequiv() {
24 local isin i 24 local isin i
25 for i in $* 25 for i in $*
26 do 26 do
27 isin=`grep "^$i\$" "$ALLTHREADEDPKGSFILE"` 27 isin=`grep "^$i\$" "$ALLTHREADEDPKGSFILE"`
28 if [ -z "$isin" ] 28 if [ -z "$isin" ]
29 then 29 then
30 # no threaded package 30 # no threaded package
31 echo -n "$i " 31 echo -n "$i"
32 else 32 else
33 # threaded package 33 # threaded package
34 echo -n "${isin}-mt " 34 echo -n "${isin}-mt"
35 fi 35 fi
36 done 36 done
37 echo 37 echo
38} 38}
39 39
40# 40#
41# signature of binary files 41# signature of binary files
42# currently obsolete 42# currently obsolete
43# 43#
44# ISBINARY="*ELF*LSB*" 44# ISBINARY="*ELF*LSB*"
45 45
46usage() { 46usage() {
47 echo "Usage : tothreaded <controlfile> <ALLPackages file>" 47 echo "Usage : tothreaded <controlfile> <ALLPackages file>"
48 exit 2 48 exit 2
49} 49}
50 50
51. scripts/SpecialMTFiles 51. scripts/SpecialMTFiles
52 52
53# 53#
54# get the name of the controlfile to check for threading 54# get the name of the controlfile to check for threading
55# 55#
56if [ -z "$1" ] 56if [ -z "$1" ]
57then 57then
58 usage 58 usage
59fi 59fi
60controlfile=$1 60controlfile=$1
61shift 61shift
62 62
63case $controlfile in 63case $controlfile in
64 *-mt.control) 64 *-mt.control)
65 #already threaded 65 #already threaded
66 echo $controlfile 66 echo $controlfile
67 exit 0; 67 exit 0;
68 ;; 68 ;;
69esac 69esac
70 70
71# 71#
72# file containing list of all known threaded packages 72# file containing list of all known threaded packages
73# 73#
74if [ -z "$1" ] 74if [ -z "$1" ]
75then 75then
76 usage 76 usage
77fi 77fi
78ALLTHREADEDPKGSFILE=$1 78ALLTHREADEDPKGSFILE=$1
79shift 79shift
80 80
81# 81#
82# strip out the name of the package 82# strip out the name of the package
83# 83#
84packagename=${controlfile##*/} # path 84packagename=${controlfile##*/} # path
85packagename=${packagename%.control} # extension 85packagename=${packagename%.control} # extension
86 86
87# 87#
88# generate new control file 88# generate new control file
89# 89#
90newcontrolfile=${controlfile/\.control/-mt\.control} 90newcontrolfile=${controlfile/\.control/-mt\.control}
91 91
92# 92#
93# read all lines in original control file 93# read all lines in original control file
94# 94#
95while read line 95while read line
96do 96do
97 case $line in 97 case $line in
98 # convert some files to threaded equivalent 98 # convert some files to threaded equivalent
99 "Files:"*) 99 "Files:"*)
100 files=${line#Files:} 100 files=${line#Files:}
101 # thread-converted files 101 # thread-converted files
102 T_files=`ConvertSpecialFiles "$files"` 102 T_files=`ConvertSpecialFiles "$files"`
103 echo "Files: $T_files" 103 echo "Files: $T_files"
104 ;; 104 ;;
105 "Package: "*) 105 "Package: "*)
106 T_package=`findthreadedequiv ${line#Package: }` 106 T_package=`findthreadedequiv ${line#Package: }`
107 echo "Package: ${T_package}" 107 echo "Package: ${T_package}"
108 ;; 108 ;;
109 "Depends: "*) 109 "Depends: "*)
110 depends=`echo "${line#Depends: }" | tokenize` 110 depends=`echo "${line#Depends: }" | tokenize`
111 T_depends=`findthreadedequiv ${depends}` 111 T_depends=`findthreadedequiv ${depends}`
112 echo "Depends: $T_depends" 112 echo "Depends: $T_depends"
113 ;; 113 ;;
114 "Provides: "*) 114 "Provides: "*)
115 T_provides=`findthreadedequiv ${line#Provides: }` 115 T_provides=`findthreadedequiv ${line#Provides: }`
116 echo "Provides: $T_provides" 116 echo "Provides: $T_provides"
117 ;; 117 ;;
118 "Recommends: "*) 118 "Recommends: "*)
119 T_recommends=`findthreadedequiv ${line#Recommends: }` 119 T_recommends=`findthreadedequiv ${line#Recommends: }`
120 echo "Recommends: $T_recommends" 120 echo "Recommends: $T_recommends"
121 ;; 121 ;;
122 "Conflicts: "*) 122 "Conflicts: "*)
123 conflicts=`echo "${line#Conflicts: }" | tokenize` 123 conflicts=`echo "${line#Conflicts: }" | tokenize`
124 T_conflicts=`findthreadedequiv ${conflicts}` 124 T_conflicts=`findthreadedequiv ${conflicts}`
125 echo "Conflicts: $T_conflicts" 125 echo "Conflicts: $T_conflicts"
126 ;; 126 ;;
127 *":"*) 127 *":"*)
128 echo "$line" 128 echo "$line"
129 ;; 129 ;;
130 *) # al other lines 130 *) # al other lines
131 echo " $line" 131 echo " $line"
132 ;; 132 ;;
133 esac 133 esac
134done < $controlfile > $newcontrolfile 134done < $controlfile > $newcontrolfile
135 135
136echo $newcontrolfile 136echo $newcontrolfile