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