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