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