58f2b958c1a774f1a835c7c27ee7bf375152a14b
[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:    samsung
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(devman_haptic)
16 BuildRequires:  pkgconfig(bluetooth-api)
17 BuildRequires:  pkgconfig(mm-sound)
18 BuildRequires:  pkgconfig(openssl)
19 BuildRequires:  pkgconfig(heynoti)
20 BuildRequires:  pkgconfig(ui-gadget-1)
21 BuildRequires:  pkgconfig(json-glib-1.0)
22 BuildRequires:  pkgconfig(libxml-2.0)
23 BuildRequires:  pkgconfig(dlog)
24 BuildRequires:  pkgconfig(aul)
25 BuildRequires:  pkgconfig(pmapi)
26 BuildRequires:  pkgconfig(ecore-input)
27 BuildRequires:  pkgconfig(eina)
28 BuildRequires:  pkgconfig(icu-i18n)
29 BuildRequires:  pkgconfig(ail)
30 BuildRequires:  pkgconfig(sysman)
31 BuildRequires:  pkgconfig(glib-2.0)
32 BuildRequires:  pkgconfig(gthread-2.0)
33 BuildRequires:  pkgconfig(dbus-glib-1)
34 BuildRequires:  pkgconfig(ecore-imf)
35 BuildRequires:  pkgconfig(ecore-x)
36 BuildRequires:  pkgconfig(ecore)
37 BuildRequires:  pkgconfig(ecore-file)
38 BuildRequires:  pkgconfig(icu-io)
39 BuildRequires:  pkgconfig(icu-le)
40 BuildRequires:  pkgconfig(icu-lx)
41 BuildRequires:  pkgconfig(icu-uc)
42 BuildRequires:  pkgconfig(ewebkit2)
43 BuildRequires:  pkgconfig(evas)
44 BuildRequires:  pkgconfig(edje)
45 BuildRequires:  pkgconfig(mm-player)
46 BuildRequires:  pkgconfig(network)
47 BuildRequires:  pkgconfig(security-server)
48 BuildRequires:  pkgconfig(svi)
49 BuildRequires:  pkgconfig(appsvc)
50 BuildRequires:  pkgconfig(libxml-2.0)
51 BuildRequires:  pkgconfig(notification)
52 BuildRequires:  pkgconfig(pango)
53 BuildRequires:  pkgconfig(capi-system-runtime-info)
54 BuildRequires:  pkgconfig(capi-media-player)
55 BuildRequires:  pkgconfig(capi-media-sound-manager)
56 BuildRequires:  pkgconfig(capi-content-media-content)
57 BuildRequires:  pkgconfig(capi-system-device)
58 BuildRequires:  pkgconfig(capi-appfw-application)
59 BuildRequires:  pkgconfig(capi-appfw-app-manager)
60 BuildRequires:  pkgconfig(capi-system-sensor)
61 BuildRequires:  pkgconfig(capi-system-haptic)
62 BuildRequires:  pkgconfig(capi-system-info)
63 BuildRequires:  pkgconfig(capi-system-system-settings)
64 BuildRequires:  pkgconfig(capi-network-bluetooth)
65 BuildRequires:  pkgconfig(pkgmgr)
66 BuildRequires:  sysman-internal-devel
67 BuildRequires:  cmake
68 BuildRequires:  edje-tools
69 BuildRequires:  gettext-tools
70 %description
71 Setting application
72  BEAT UI, Setting application.
73
74
75 %prep
76 %setup -q
77
78 %build
79
80 %define PREFIX    "/usr/apps/org.tizen.setting"
81 %define RESDIR    "/usr/apps/org.tizen.setting/res"
82 %define DATADIR    "/usr/apps/org.tizen.setting/data"
83 CFLAGS+=" -fPIC";export CFLAGS
84 CXXFLAGS+=" -fPIC";export CFLAGS
85 LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--hash-style=both -Wl,--as-needed";export LDFLAGS
86
87 %ifarch %{arm}
88         cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=arm
89 %else
90         cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DARCH=x86
91 %endif
92
93 make
94
95 %install
96 rm -rf %{buildroot}
97 %make_install
98
99 mkdir -p %{buildroot}/opt/data/setting
100
101 %clean
102
103 %post
104
105 # Set vconf values with -g/-u options
106 GOPTION="-g 6514"
107
108 #resetMenuscreen
109         # menuscreen app will take this vconf
110         #vconftool $GOPTION set -t string db/setting/menuscreen/package_name "com.samsung.cluster-home"
111
112
113 #resetFlightmode
114         vconftool $GOPTION set -t bool db/setting/flight_mode "0"
115
116 #resetNetwork
117         vconftool $GOPTION set -t int db/setting/select_network "0"
118         vconftool $GOPTION set -t int db/setting/select_network_act "0"
119         vconftool $GOPTION set -t int db/setting/network_mode "0"
120         vconftool $GOPTION set -t bool db/setting/3gEnabled "1"
121         vconftool $GOPTION set -t bool db/setting/data_roaming "1"
122
123 #resetUsbConnectivity
124         vconftool $GOPTION set -t int memory/setting/usb_mode "-1" -i -f
125         vconftool $GOPTION set -t int memory/setting/usb_sel_mode "0" -i -f
126         vconftool $GOPTION set -t int memory/setting/usb_in_mode_change "0" -i -f
127         vconftool $GOPTION set -t bool db/setting/debug_mode "0" -f
128
129 #resetSound
130         DEFAULT_CALL_TONE="/opt/share/settings/Ringtones/ringtone_sdk.mp3"
131         DEFAULT_NOTI_TONE="/opt/share/settings/Alerts/General notification_sdk.wav"
132
133         vconftool $GOPTION set -t bool db/setting/sound/sound_on "1"
134         vconftool $GOPTION set -t bool db/setting/sound/vibration_on "0"
135
136         vconftool $GOPTION set -t int db/setting/sound/call/ringtone_sound_volume "13"
137         vconftool $GOPTION set -t int db/setting/sound/noti/sound_volume "7"
138         vconftool $GOPTION set -t int db/setting/sound/media/sound_volume "7"
139         vconftool $GOPTION set -t int db/setting/sound/touch_feedback/sound_volume "5"
140
141         vconftool $GOPTION set -t int db/setting/sound/noti/vibration_level "5"
142         vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level "3"
143         vconftool $GOPTION set -t int db/setting/sound/touch_feedback/vibration_level_bak "3" ##private key
144
145         vconftool $GOPTION set -t string db/setting/sound/call/ringtone_path "${DEFAULT_CALL_TONE}"
146         vconftool $GOPTION set -t int db/setting/sound/call/vibration_type "2"
147
148         vconftool $GOPTION set -t string db/setting/sound/noti/msg_ringtone_path        "${DEFAULT_NOTI_TONE}"
149         vconftool $GOPTION set -t int db/setting/sound/noti/msg_alert_rep_type          "0"
150
151         vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path      "${DEFAULT_NOTI_TONE}"
152         vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type                "0"
153         vconftool $GOPTION set -t bool db/setting/sound/touch_sounds "1"
154         vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1"
155
156 #resetWallpaper
157         vconftool $GOPTION set -t string db/menu_widget/bgset "/opt/share/settings/Wallpapers/Home_default.jpg"
158         vconftool $GOPTION set -t string db/idle_lock/bgset "/opt/share/settings/Wallpapers/Home_default.jpg"
159
160 #resetTilt
161         vconftool $GOPTION set -t bool db/setting/use_tilt "1"
162         vconftool $GOPTION set -t int db/setting/tilt_sensitivity "3"
163         vconftool $GOPTION set -t bool db/setting/use_tilt_scroll "1"
164         vconftool $GOPTION set -t int db/setting/tilt_scroll_sensitivity "3"
165
166 #resetPanning
167         vconftool $GOPTION set -t bool db/setting/use_panning "0"
168         vconftool $GOPTION set -t int db/setting/panning_sensitivity "3"
169         vconftool $GOPTION set -t bool db/setting/use_panning_browser "1"
170         vconftool $GOPTION set -t int db/setting/panning_browser_sensitivity "3"
171
172 #resetDoubleTap
173         vconftool $GOPTION set -t bool db/setting/use_double_tap "1"
174
175 #resetShake
176         vconftool $GOPTION set -t bool db/setting/use_shake "1"
177
178 #resetPickup
179         vconftool $GOPTION set -t bool db/setting/use_pick_up "1"
180         vconftool $GOPTION set -t bool db/setting/use_pick_up_call "1"
181
182 #resetTurnOver
183         vconftool $GOPTION set -t bool db/setting/use_turn_over "1"
184
185 #resetMotions
186         vconftool $GOPTION set -t bool db/setting/motion_active "1"
187         vconftool $GOPTION set -t bool db/setting/motion/palm_swipe_capture "1"
188         vconftool $GOPTION set -t bool db/setting/motion/palm_touch_mute "1"
189         vconftool $GOPTION set -t bool db/setting/motion/tap_twist "1"
190
191 #resetDisplay
192         #backlight
193 %ifarch %{arm}
194         vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "30"
195 %else
196         vconftool $GOPTION set -t int db/setting/lcd_backlight_normal "0"
197 %endif
198         vconftool $GOPTION set -t int db/setting/lcd_timeout_normal_backup "30"
199
200         #brightness
201         vconftool $GOPTION set -t int db/setting/Brightness "-1"
202         vconftool $GOPTION set -t int db/setting/brightness_automatic "0"
203
204         #battery
205         vconftool $GOPTION set -t bool db/setting/battery_percentage "0"
206         #launch
207         #vconftool $GOPTION set -t string db/menu_widget/launch_effect "0"
208
209         #smart screen
210         vconftool $GOPTION set -t int db/pm/smartstay_status "0"
211         vconftool $GOPTION set -t bool db/setting/smartscreen/smart_rotation "0"
212         vconftool $GOPTION set -t bool db/setting/auto_adjust_screen_tone "1"
213         vconftool $GOPTION set -t bool db/setting/smartscreen/smart_stay_r "1"
214         vconftool $GOPTION set -t bool db/setting/smartscreen/smart_rotation_r "1"
215
216 #resetPowersaving
217         vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/status "0"
218         vconftool $GOPTION set -t bool db/setting/pwrsv/system_mode/reminder "1"
219         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/status "0"
220
221         vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/at "30"
222         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/wifi "1"
223         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bt "1"
224         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/gps "1"
225         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/data_sync "1"
226         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/hotspot "1"
227
228         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/status  "1"
229         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/brt/auto/status "0"
230         vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/brt/value "10"
231         vconftool $GOPTION set -t int db/setting/pwrsv/custom_mode/backlight/time "15"
232
233         #v0.4
234         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/cpu "0"
235         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/display "0"
236         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/bg_color "0"
237         vconftool $GOPTION set -t bool db/setting/pwrsv/custom_mode/screen_vib "0"
238
239 #resetFont
240         vconftool $GOPTION set -t int db/setting/font_size "1"
241         vconftool $GOPTION set -t int db/setting/font_type "0"
242
243 #resetRotationLock
244         vconftool $GOPTION set -t bool db/setting/rotate_lock "1"
245
246 #resetTimeAndData
247 %ifarch %{arm}
248         vconftool $GOPTION set -t bool db/setting/automatic_time_update "1"
249 %else
250         vconftool $GOPTION set -t bool db/setting/automatic_time_update "0"
251 %endif
252
253         vconftool $GOPTION set -t int db/menu_widget/regionformat_time1224 "1"
254         vconftool $GOPTION set -t int db/setting/date_format "0"
255         vconftool $GOPTION set -t int db/setting/weekofday_format  "0"
256
257         vconftool $GOPTION set -t string db/setting/timezone "+9"
258         # to be removed
259         vconftool $GOPTION set -t string db/setting/cityname_id "IDS_WCL_BODY_CITYNAME_SEOUL"
260
261         vconftool $GOPTION set -t string db/setting/timezone_id "Asia/Seoul"
262
263         #if [ -f /opt/etc/localtime ]
264         #then
265         rm -f /opt/etc/localtime
266         ln -s /usr/share/zoneinfo/Asia/Seoul /opt/etc/localtime
267         #fi
268
269
270 #resetAccessibility
271         vconftool $GOPTION set -t bool db/setting/accessibility/accessibility "0"
272         vconftool $GOPTION set -t bool db/setting/accessibility/high_contrast "0"
273         vconftool $GOPTION set -t bool db/setting/accessibility/screen_zoom "1"
274         vconftool $GOPTION set -t int db/setting/accessibility/font_size "1"
275         #vconftool $GOPTION set -t int db/setting/accessibility/font_style "0"
276         vconftool $GOPTION set -t string db/setting/accessibility/font_name "HelveticaNeue"
277         vconftool $GOPTION set -t bool db/setting/accessibility/tts "0"
278
279         vconftool $GOPTION set -t bool db/setting/accessibility/torch_light "0"
280         vconftool $GOPTION set -t bool db/setting/accessibility/mono_audio "0"
281         vconftool $GOPTION set -t int db/setting/accessibility/power_key_hold "1"
282         vconftool $GOPTION set -t bool db/setting/accessibility/led_notify "0"
283
284         vconftool $GOPTION set -t bool db/ciss/call_answering_key "0"
285         vconftool $GOPTION set -t bool db/ciss/call_power_key_ends_call "0"
286         vconftool $GOPTION set -t int db/ciss/answering_mode "0"
287         vconftool $GOPTION set -t int db/ciss/answering_mode_time "3"
288
289         vconftool $GOPTION set -t bool db/setting/accessibility/accept_call "0"
290         vconftool $GOPTION set -t bool db/setting/accessibility/enable_auto_answer "0"
291         vconftool $GOPTION set -t int db/setting/accessibility/auto_answer "1"
292         vconftool $GOPTION set -t bool db/setting/accessibility/powerkey_end_calls "0"
293
294 #Driving Mode
295         vconftool $GOPTION set -t bool db/setting/drivingmode/drivingmode "1"
296         vconftool $GOPTION set -t bool db/setting/drivingmode/incomingcall "1"
297         vconftool $GOPTION set -t bool db/setting/drivingmode/message "1"
298         vconftool $GOPTION set -t bool db/setting/drivingmode/newemails "1"
299         vconftool $GOPTION set -t bool db/setting/drivingmode/newvoicemails "1"
300         vconftool $GOPTION set -t bool db/setting/drivingmode/alarm "1"
301         vconftool $GOPTION set -t bool db/setting/drivingmode/schedule "1"
302         vconftool $GOPTION set -t bool db/setting/drivingmode/unlockscreen "1"
303
304 #resetLanguageAndRegion
305         vconftool $GOPTION set -t int db/setting/lang "10"
306         vconftool $GOPTION set -t string db/menu_widget/language "en_US.UTF-8"
307         vconftool $GOPTION set -t string db/menu_widget/regionformat "en_US.UTF-8"
308
309 #resetViewtype
310         #vconftool $GOPTION set -t int db/menuscreen/viewtype "0"
311         #vconftool $GOPTION set -t int db/taskswitcher/viewtype "0"
312
313 #resetTouch
314         #vconftool $GOPTION set -t int db/setting/vib_feedback "3"
315         #vconftool $GOPTION set -t bool db/setting/touch_panel_autolock "0"
316
317 #resetLicense
318         vconftool $GOPTION set -t bool db/setting/transaction_tracking "0"
319         vconftool $GOPTION set -t bool db/setting/expiry_reminder "0"
320         vconftool $GOPTION set -t int db/setting/roaming_network "0"
321
322 #resetNotification
323         vconftool $GOPTION set -t bool db/setting/ticker_noti/messages "1"
324         vconftool $GOPTION set -t bool db/setting/ticker_noti/email "1"
325         vconftool $GOPTION set -t bool db/setting/ticker_noti/im "1"
326         vconftool $GOPTION set -t bool db/setting/ticker_noti/twitter "1"
327         vconftool $GOPTION set -t bool db/setting/ticker_noti/facebook "1"
328
329         # display content
330         vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/messages "1"
331         vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/email "1"
332         vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/im "1"
333         vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/twitter "1"
334         vconftool $GOPTION set -t bool db/setting/ticker_noti/display_content/facebook "1"
335
336         vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/messages "1"
337         vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/email "1"
338         vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/im "1"
339         vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/twitter "1"
340         vconftool $GOPTION set -t bool db/setting/ticker_noti/badge/facebook "1"
341
342 #resetSecurity
343         rm -rf /opt/data/setting/set_info
344         #vconftool $GOPTION set -t string db/setting/privacy_passwd ""
345
346         vconftool $GOPTION set -t bool db/setting/power_on_lock "0"
347         vconftool $GOPTION set -t bool db/setting/simple_password "1"
348         vconftool $GOPTION set -t int db/setting/screen_lock_type "0"
349         vconftool $GOPTION set -t bool db/setting/fmm/sim_change_alert "0"
350         vconftool $GOPTION set -t string db/setting/fmm/recipients ""
351         vconftool $GOPTION set -t string db/setting/fmm/sender ""
352         vconftool $GOPTION set -t string db/setting/fmm/alert_message ""
353         vconftool $GOPTION set -t bool db/setting/fmm/remote_control "0"
354         vconftool $GOPTION set -t bool db/setting/fmm/location_consent "0"
355
356         # NOT USED NOW.
357         #vconftool $GOPTION set -t bool db/setting/rcs "0"
358
359         vconftool $GOPTION set -t int db/setting/phone_lock_attempts_left "5"
360         vconftool $GOPTION set -t string db/setting/phone_lock_timestamp ""
361         vconftool $GOPTION set -t int db/setting/sim_lock_attempts_left "5"
362         vconftool $GOPTION set -t string db/setting/sim_lock_timestamp ""
363         vconftool $GOPTION set -t bool db/setting/fixed_dialing_mode "0"
364 #resetMemory
365         vconftool $GOPTION set -t int db/setting/default_memory/wap "0"
366         vconftool $GOPTION set -t int db/setting/default_memory/bluetooth "0"
367         vconftool $GOPTION set -t int db/setting/default_memory/camera "0"
368         vconftool $GOPTION set -t int db/setting/default_memory/voice_recorder "0"
369         vconftool $GOPTION set -t int db/setting/default_memory/fm_radio "0"
370         vconftool $GOPTION set -t int db/setting/default_memory/all_share "0"
371         vconftool $GOPTION set -t int db/setting/default_memory/adobe_air "0"
372         vconftool $GOPTION set -t int db/setting/default_memory/dvb_h "0"
373
374         # format - system server
375         #vconftool $GOPTION -i set -t int memory/mmc/format "0"
376
377 #resetAbout
378         vconftool $GOPTION set -t string db/setting/device_name "Magnolia"
379         vconftool $GOPTION set -t string db/setting/selected_num ""
380 #resetMenuWidgets
381         vconftool $GOPTION -i set -t int memory/setting/font_changed "0"
382         #vconftool $GOPTION -i set -t int memory/mobile_hotspot/skin_changed "0"
383
384 #resetDevoptions
385         vconftool $GOPTION -i set -t int db/setting/devoption/bgprocess "0"
386
387 #resetDatausage
388         vconftool $GOPTION set -t bool db/setting/mobile_data "1"
389         vconftool $GOPTION set -t bool db/setting/disable_mobile_data_at_limit "0"
390         vconftool $GOPTION set -t bool db/setting/restrict_background_data "0"
391         vconftool $GOPTION set -t bool db/setting/show_wifi_usage "0"
392         vconftool $GOPTION set -t int db/setting/data_each_month "10"
393
394 #resetDisplay
395         vconftool $GOPTION set -t string db/setting/screenmode/selected_name "Dynamic"
396
397 #------------------------------------------
398 #create directory /opt/data/setting
399 if [ ! -d /opt/data/setting ]
400 then
401         mkdir -p /opt/data/setting
402 fi
403
404 # create setting.cfg at runtime right after installation
405 #/opt/apps/org.tizen.setting/bin/setting_conf_util
406 # After flashing, initialize timezone file
407 /usr/apps/org.tizen.setting/bin/setting_conf_util timezone_init
408 chown 5000:5000 /opt/data/setting -R
409 #------------------------------------------
410 heynotitool set setting_time_changed -a
411 sync
412
413 mkdir -p /usr/ug/bin/
414 ln -sf /usr/bin/ug-client /usr/ug/bin/setting-font-efl
415 # ln -sf /usr/bin/ug-client /opt/ug/bin/setting-accessibility-efl
416
417 %files -n org.tizen.setting
418 %manifest settings.manifest
419 %defattr(-,root,root,-)
420 #%attr(-,inhouse,inhouse) %dir /opt/data/setting
421 %attr(-,app,app) %dir /opt/data/setting
422 /usr/apps/org.tizen.setting/bin/setting
423 /usr/apps/org.tizen.setting/bin/setting_conf_util
424 /opt/data/setting/setting.cfg
425
426 /usr/share/packages/org.tizen.setting.xml
427 /usr/share/packages/ug-setting-accessibility-efl.xml
428 #/opt/share/packages/ug-setting-font-efl.xml
429
430 /usr/share/icons/default/small/org.tizen.setting.png
431 /opt/share/settings/*
432 /usr/apps/org.tizen.setting/res/*
433 /usr/apps/org.tizen.setting/lib/*
434 /usr/apps/org.tizen.setting/data/*
435 /usr/ug/lib/*
436 /opt/data/setting/langlist.xml
437 /opt/data/setting/plugin-cfg/*
438 /opt/data/setting/plugin-xml/*
439 /usr/apps/org.tizen.setting/bin/test_server