add vconf keys for the mock functions
[apps/core/preloaded/settings.git] / packaging / org.tizen.setting.spec
1 Name:       org.tizen.setting
2 Summary:    Setting application
3 Version:    0.1.87
4 Release:    99
5 Group:      misc
6 License:    Flora License, Version 1
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires:  pkgconfig(appcore-common)
9 BuildRequires:  pkgconfig(appcore-efl)
10 BuildRequires:  pkgconfig(elementary)
11 BuildRequires:  pkgconfig(vconf)
12 BuildRequires:  pkgconfig(tapi)
13 BuildRequires:  pkgconfig(utilX)
14 BuildRequires:  pkgconfig(devman)
15 BuildRequires:  pkgconfig(haptic)
16 BuildRequires:  pkgconfig(bluetooth-api)
17 BuildRequires:  pkgconfig(mm-sound)
18 BuildRequires:  pkgconfig(openssl)
19 BuildRequires:  pkgconfig(ui-gadget-1)
20 BuildRequires:  pkgconfig(json-glib-1.0)
21 BuildRequires:  pkgconfig(libxml-2.0)
22 BuildRequires:  pkgconfig(dlog)
23 BuildRequires:  pkgconfig(aul)
24 BuildRequires:  pkgconfig(pmapi)
25 BuildRequires:  pkgconfig(ecore-input)
26 BuildRequires:  pkgconfig(eina)
27 BuildRequires:  pkgconfig(icu-i18n)
28 BuildRequires:  pkgconfig(ail)
29 BuildRequires:  pkgconfig(sysman)
30 BuildRequires:  pkgconfig(glib-2.0)
31 BuildRequires:  pkgconfig(gthread-2.0)
32 BuildRequires:  pkgconfig(dbus-glib-1)
33 BuildRequires:  pkgconfig(ecore-imf)
34 BuildRequires:  pkgconfig(ecore-x)
35 BuildRequires:  pkgconfig(ecore)
36 BuildRequires:  pkgconfig(ecore-file)
37 BuildRequires:  pkgconfig(icu-io)
38 BuildRequires:  pkgconfig(icu-le)
39 BuildRequires:  pkgconfig(icu-lx)
40 BuildRequires:  pkgconfig(icu-uc)
41 BuildRequires:  pkgconfig(ewebkit2)
42 BuildRequires:  pkgconfig(evas)
43 BuildRequires:  pkgconfig(edje)
44 BuildRequires:  pkgconfig(mm-player)
45 BuildRequires:  pkgconfig(capi-network-connection)
46 #BuildRequires:  pkgconfig(network)
47 #BuildRequires:  pkgconfig(security-server)
48 BuildRequires:  pkgconfig(svi)
49 BuildRequires:  pkgconfig(appsvc)
50 BuildRequires:  pkgconfig(notification)
51 BuildRequires:  pkgconfig(pango)
52 BuildRequires:  pkgconfig(capi-system-runtime-info)
53 BuildRequires:  pkgconfig(capi-media-player)
54 BuildRequires:  pkgconfig(capi-media-sound-manager)
55 BuildRequires:  pkgconfig(capi-content-media-content)
56 BuildRequires:  pkgconfig(capi-system-device)
57 BuildRequires:  pkgconfig(capi-appfw-application)
58 BuildRequires:  pkgconfig(capi-appfw-app-manager)
59 BuildRequires:  pkgconfig(capi-system-sensor)
60 BuildRequires:  pkgconfig(capi-system-info)
61 BuildRequires:  pkgconfig(capi-system-system-settings)
62 BuildRequires:  pkgconfig(capi-network-wifi)
63 BuildRequires:  pkgconfig(capi-network-bluetooth)
64 BuildRequires:  pkgconfig(capi-network-tethering)
65 BuildRequires:  pkgconfig(capi-network-nfc)
66 BuildRequires:  pkgconfig(capi-security-privacy-manager)
67 BuildRequires:  pkgconfig(privacy-manager-client)
68 BuildRequires:  pkgconfig(privacy-manager-server)
69 BuildRequires:  pkgconfig(ecore-evas)
70 BuildRequires:  pkgconfig(pkgmgr)
71 BuildRequires:  pkgconfig(pkgmgr-info)
72 BuildRequires:  sysman-internal-devel
73 BuildRequires:  cmake
74 BuildRequires:  edje-tools
75 BuildRequires:  gettext-tools
76 #Requires: org.tizen.phone
77 Requires: ug-bluetooth-efl
78 %description
79 Setting application
80  BEAT UI, Setting application.
81
82
83 %prep
84 %setup -q
85
86 %build
87
88 %define PREFIX    "/usr/apps/org.tizen.setting"
89 %define RESDIR    "/usr/apps/org.tizen.setting/res"
90 %define DATADIR    "/usr/apps/org.tizen.setting/data"
91 CFLAGS+=" -fPIC";export CFLAGS
92 CXXFLAGS+=" -fPIC";export CFLAGS
93 LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--hash-style=both -Wl,--as-needed";export LDFLAGS
94
95 %ifarch %{arm}
96         cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=arm
97 %else
98         cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=x86
99 %endif
100
101 make
102
103 %install
104 rm -rf %{buildroot}
105 %make_install
106
107 mkdir -p %{buildroot}/opt/data/setting
108
109 %clean
110
111 %post
112
113 # Set vconf values with -g/-u options
114 GOPTION="-g 6514"
115
116 #resetMenuscreen
117         # menuscreen app will take this vconf
118         #vconftool $GOPTION set -t string db/setting/menuscreen/package_name "com.samsung.cluster-home"
119
120
121 #resetFlightmode
122         vconftool $GOPTION set -t bool db/telephony/flight_mode "0" -f
123
124 #resetNetwork
125         vconftool $GOPTION set -t int db/setting/select_network "0"
126         vconftool $GOPTION set -t int db/setting/select_network_act "0"
127         vconftool $GOPTION set -t int db/setting/network_mode "0"
128         vconftool $GOPTION set -t bool db/setting/3gEnabled "1"
129         vconftool $GOPTION set -t bool db/setting/data_roaming "0"
130
131 #resetUsbConnectivity
132         vconftool $GOPTION set -t int memory/setting/usb_mode "-1" -i -f
133         vconftool $GOPTION set -t int memory/setting/usb_sel_mode "0" -i -f
134         vconftool $GOPTION set -t int memory/setting/usb_in_mode_change "0" -i -f
135         vconftool $GOPTION set -t bool db/setting/debug_mode "1" -f
136
137 #resetSound
138         DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/ringtone_sdk.mp3"
139         DEFAULT_NOTI_TONE="/opt/share/settings/Alerts/General notification_sdk.wav"
140
141         vconftool $GOPTION set -t bool db/setting/sound/sound_on "1"
142         vconftool $GOPTION set -t bool db/setting/sound/vibration_on "0"
143
144         vconftool $GOPTION set -t int db/setting/sound/call/ringtone_sound_volume "13"
145         vconftool $GOPTION set -t int db/setting/sound/noti/sound_volume "7"
146         vconftool $GOPTION set -t int db/setting/sound/media/sound_volume "7"
147         vconftool $GOPTION set -t int db/setting/sound/touch_feedback/sound_volume "5"
148
149         vconftool $GOPTION set -t int db/setting/sound/noti/vibration_level "5"
150         vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level "3"
151         vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level_bak "3" ##private key
152
153         vconftool $GOPTION set -t string db/setting/sound/call/ringtone_path "${DEFAULT_CALL_TONE}"
154         vconftool $GOPTION set -t int db/setting/sound/call/vibration_type "2"
155
156         vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path        "${DEFAULT_NOTI_TONE}"
157         vconftool $GOPTION set -t int db/setting/sound/noti/msg_alert_rep_type          "0"
158
159         vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path      "${DEFAULT_NOTI_TONE}"
160         vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type                "0"
161         vconftool $GOPTION set -t bool db/setting/sound/touch_sounds "1"
162         vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1"
163
164 #resetWallpaper
165         vconftool $GOPTION set -t string db/menu_widget/bgset "/opt/share/settings/Wallpapers/Home_default.jpg"
166         vconftool $GOPTION set -t string db/idle_lock/bgset "/opt/share/settings/Wallpapers/Home_default.jpg"
167
168 #resetDisplay
169         #backlight
170 # Set backlight timeout to dim display on all platforms except emulator
171 # 0 sec : unlimited time
172 # 600 sec : 10 min
173 %if 0%{?simulator}
174         vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "600"
175 %else
176         vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "30"
177 %endif
178
179         vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30"
180
181         #brightness
182         vconftool $GOPTION set -t int db/setting/Brightness "-1"
183         vconftool $GOPTION set -t int db/setting/brightness_automatic "0"
184
185         #battery
186         vconftool $GOPTION set -t bool db/setting/battery_percentage "0"
187         #launch
188         #vconftool $GOPTION set -t string db/menu_widget/launch_effect "0"
189
190 #resetPowersaving
191         vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/status "0"
192         vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/reminder "1"
193
194         #v0.4
195         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/cpu "0"
196         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/screen_vib "0"
197
198 #resetFont
199         vconftool $GOPTION set -t int db/setting/font_type "0"
200
201 #resetRotationLock
202         vconftool $GOPTION set -t bool db/setting/rotate_lock "1"
203         vconftool $GOPTION set -t bool db/setting/auto_rotate_screen "0"
204         #vconftool $GOPTION set -t bool memory/setting/rotate_hold "0" -i -f
205 #resetTimeAndData
206 %ifarch %{arm}
207         vconftool $GOPTION set -t bool db/setting/automatic_time_update "1"
208 %else
209         vconftool $GOPTION set -t bool db/setting/automatic_time_update "0"
210 %endif
211
212         vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1"
213         vconftool $GOPTION set -t int db/setting/date_format "0"
214
215         #-----------------------------------------------------------------
216         # MOCK FUNCTION
217         # MOCK IMPLEMENTATION FOR API COMPATIBILITY
218         # NEED TO CHECK THE KEY WITH THE CALENDAR APP
219         #-----------------------------------------------------------------
220         vconftool $GOPTION set -t int db/setting/weekofday_format  "0"
221
222         vconftool $GOPTION set -t string db/setting/timezone "+9"
223         # to be removed
224         vconftool $GOPTION set -t string db/setting/cityname_id "IDS_WCL_BODY_CITYNAME_SEOUL"
225
226         vconftool $GOPTION set -t string db/setting/timezone_id "Asia/Seoul"
227
228         #if [ -f /opt/etc/localtime ]
229         #then
230         rm -f /opt/etc/localtime
231         ln -s /usr/share/zoneinfo/Asia/Seoul /opt/etc/localtime
232         #fi
233
234
235 #resetAccessibility
236         vconftool $GOPTION set -t int db/setting/accessibility/font_size "1"
237         #vconftool $GOPTION set -t int db/setting/accessibility/font_style "0"
238         vconftool $GOPTION set -t string db/setting/accessibility/font_name "HelveticaNeue"
239
240         #-----------------------------------------------------------------
241         # MOCK FUNCTION
242         # NOT SUPPORTED BUT ADDED FOR API COMPATIBILITY
243         # temp key for screen reader & speech rate
244         #-----------------------------------------------------------------
245         vconftool $GOPTION set -t bool db/setting/accessibility/tts "0"
246         vconftool $GOPTION set -t int db/setting/accessibility/speech_rate "2"
247
248 #resetLanguageAndRegion
249         vconftool $GOPTION set -t int db/setting/lang "10"
250         vconftool $GOPTION set -t string db/menu_widget/language "en_GB.UTF-8"
251         vconftool $GOPTION set -t string db/menu_widget/regionformat "en_GB.UTF-8"
252
253 #resetViewtype
254         #vconftool $GOPTION set -t int db/menuscreen/viewtype "0"
255         #vconftool $GOPTION set -t int db/taskswitcher/viewtype "0"
256
257 #resetTouch
258         #vconftool $GOPTION set -t int db/setting/vib_feedback "3"
259         #vconftool $GOPTION set -t bool db/setting/touch_panel_autolock "0"
260
261 #resetLicense
262         vconftool $GOPTION set -t bool db/setting/transaction_tracking "0"
263         vconftool $GOPTION set -t bool db/setting/expiry_reminder "0"
264         vconftool $GOPTION set -t int db/setting/roaming_network "0"
265
266 #resetSecurity
267         rm -rf /opt/data/setting/set_info
268         #vconftool $GOPTION set -t string db/setting/privacy_passwd ""
269         vconftool $GOPTION set -t int db/setting/screen_lock_type "5" -f
270         vconftool $GOPTION set -t string db/setting/3rd_lock_pkg_name "org.tizen.lockscreen"
271         # NOT USED NOW.
272         #vconftool $GOPTION set -t bool db/setting/rcs "0"
273
274 #resetMemory
275         vconftool $GOPTION set -t int db/setting/default_memory/bluetooth "0"
276         vconftool $GOPTION set -t int db/setting/default_memory/camera "0"
277         vconftool $GOPTION set -t int db/setting/default_memory/voice_recorder "0"
278
279         # format - system server
280         #vconftool $GOPTION -i set -t int memory/mmc/format "0"
281
282 #resetAbout
283         vconftool $GOPTION set -t string db/setting/device_name "Magnolia"
284         vconftool $GOPTION set -t string db/setting/selected_num ""
285 #resetMenuWidgets
286         vconftool $GOPTION -i set -t int memory/setting/font_changed "0"
287         #vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0"
288
289 #resetDevoptions
290         vconftool $GOPTION -i set -t int db/setting/devoption/bgprocess "0"
291
292 #resetDisplay
293         vconftool $GOPTION set -t string db/setting/screenmode/selected_name "Dynamic"
294
295 #------------------------------------------
296 #create directory /opt/data/setting
297 if [ ! -d /opt/data/setting ]
298 then
299         mkdir -p /opt/data/setting
300 fi
301
302 # create setting.cfg at runtime right after installation
303 #/opt/apps/org.tizen.setting/bin/setting_conf_util
304 # After flashing, initialize timezone file
305 /usr/apps/org.tizen.setting/bin/setting_conf_util timezone_init
306 chown 5000:5000 /opt/data/setting -R
307 #------------------------------------------
308 sync
309
310 mkdir -p /usr/ug/bin/
311 ln -sf /usr/bin/ug-client /usr/ug/bin/setting-font-efl
312 ln -sf /usr/bin/ug-client /usr/ug/bin/setting-profile-efl
313 ln -sf /usr/bin/ug-client /usr/ug/bin/setting-plugin-efl
314 ln -sf /usr/bin/ug-client /usr/ug/bin/setting-privacy-efl
315
316 %files -n org.tizen.setting
317 %manifest settings.manifest
318 %defattr(-,root,root,-)
319 #%attr(-,inhouse,inhouse) %dir /opt/data/setting
320 %attr(-,app,app) %dir /opt/data/setting
321 /usr/apps/org.tizen.setting/bin/setting
322 /usr/apps/org.tizen.setting/bin/setting_conf_util
323 /opt/data/setting/setting.cfg
324
325 /usr/share/packages/org.tizen.setting.xml
326
327 /usr/share/icons/default/small/org.tizen.setting.png
328 /opt/share/settings/*
329 /usr/apps/org.tizen.setting/res/*
330 /usr/apps/org.tizen.setting/lib/*
331 /usr/apps/org.tizen.setting/data/*
332 /usr/ug/lib/*
333 /opt/data/setting/langlist.xml
334 /opt/data/setting/plugin-cfg/*
335 /opt/data/setting/plugin-xml/*
336 #/usr/apps/org.tizen.setting/bin/test_server