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