Make system-server start and run on tizen-common
[platform/core/system/system-server.git] / packaging / system-server.spec
1 %bcond_with x
2
3 #sbs-git:slp/pkgs/s/system-server system-server 0.1.51 56e16bca39f96d6c8aed9ed3df2fea9b393801be
4 Name:       system-server
5 Summary:    System server
6 Version:    2.0.0
7 Release:    0
8 Group:      System/Service
9 License:    Apache-2.0
10 Source0:    system-server-%{version}.tar.gz
11 Source1:    system-server.manifest
12 Source2:    deviced.manifest
13 Source3:    sysman.manifest
14 Source4:    libslp-pm.manifest
15 Source5:    haptic.manifest
16 Source6:    devman.manifest
17 Source8:    regpmon.service
18 Source9:    zbooting-done.service
19 BuildRequires:  cmake
20 BuildRequires:  libattr-devel
21 BuildRequires:  pkgconfig(ecore)
22 BuildRequires:  pkgconfig(heynoti)
23 BuildRequires:  pkgconfig(vconf)
24 BuildRequires:  pkgconfig(tapi)
25 BuildRequires:  pkgconfig(edbus)
26 BuildRequires:  pkgconfig(dlog)
27 BuildRequires:  pkgconfig(syspopup-caller)
28 %if %{with x}
29 BuildRequires:  pkgconfig(x11)
30 %endif
31 BuildRequires:  pkgconfig(notification)
32 BuildRequires:  pkgconfig(usbutils)
33 BuildRequires:  pkgconfig(udev)
34 BuildRequires:  pkgconfig(device-node)
35 BuildRequires:  pkgconfig(libsmack)
36 BuildRequires:  gettext
37 BuildRequires:  pkgconfig(sensor)
38 BuildRequires:  pkgconfig(libsystemd-daemon)
39 BuildRequires:  pkgconfig(capi-base-common)
40 BuildRequires:  pkgconfig(libtzplatform-config)
41
42 %{?systemd_requires}
43 Requires(post): /usr/bin/vconftool
44
45 %description
46 system server
47
48 %package -n sysman
49 Summary:    Sysman library
50 Group:      System/Libraries
51 Requires:   %{name} = %{version}-%{release}
52
53 %description -n sysman
54 System manager interface library.
55
56 %package -n sysman-devel
57 Summary:    Sysman devel library
58 Group:      System/Development
59 Requires:   sysman = %{version}-%{release}
60
61 %description -n sysman-devel
62 sysman devel library.
63
64 %package -n sysman-internal-devel
65 Summary:    Sysman internal devel library
66 Group:      System/Development
67 Requires:   sysman = %{version}-%{release}
68
69 %description -n sysman-internal-devel
70 sysman internal devel library.
71
72 %package -n libslp-pm
73 Summary:    Power manager client
74 Group:      System/Libraries
75 Requires:   %{name} = %{version}-%{release}
76
77 %description -n libslp-pm
78 power-manager library.
79
80 %package -n libslp-pm-devel
81 Summary:    Power manager client (devel)
82 Group:      System/Development
83 Requires:   libslp-pm = %{version}-%{release}
84
85 %description -n libslp-pm-devel
86 power-manager devel library.
87
88 %package -n libhaptic
89 Summary:    Haptic library
90 Group:      Development/Libraries
91 Requires:   %{name} = %{version}-%{release}
92
93 %description -n libhaptic
94 Haptic library for device control
95
96 %package -n libhaptic-devel
97 Summary:    Haptic library for (devel)
98 Group:      Development/Libraries
99 Requires:   libhaptic = %{version}-%{release}
100
101 %description -n libhaptic-devel
102 Haptic library for device control (devel)
103
104 %package -n libhaptic-plugin-devel
105 Summary:    Haptic plugin library for (devel)
106 Group:      Development/Libraries
107 Requires:   libhaptic = %{version}-%{release}
108
109 %description -n libhaptic-plugin-devel
110 Haptic plugin library for device control (devel)
111
112 %package -n libdevman
113 Summary:    Device manager library
114 Group:      Development/Libraries
115 Requires:   %{name} = %{version}-%{release}
116
117 %description -n libdevman
118 Device manager library for device control
119
120 %package -n libdevman-devel
121 Summary:    Device manager library for (devel)
122 Group:      Development/Libraries
123 Requires:   libdevman = %{version}-%{release}
124
125 %description -n libdevman-devel
126 Device manager library for device control (devel)
127
128 %package -n libdevman-haptic-devel
129 Summary:    Haptic Device manager library for (devel)
130 Group:      Development/Libraries
131 Requires:   libdevman-devel = %{version}-%{release}
132
133 %description -n libdevman-haptic-devel
134 Haptic Device manager library for device control (devel)
135
136 %package -n libdeviced
137 Summary:    Deviced library
138 Group:      System/Libraries
139 Requires:   %{name} = %{version}-%{release}
140
141 %description -n libdeviced
142 Deviced library for device control
143
144 %package -n libdeviced-devel
145 Summary:    Deviced library for (devel)
146 Group:      System/Development
147 Requires:   libdeviced = %{version}-%{release}
148
149 %description -n libdeviced-devel
150 Deviced library for device control (devel)
151
152 %prep
153 %setup -q
154
155 %cmake . \
156     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
157 %if %{with x}
158     -DX11_SUPPORT=On \
159 %else
160     -DX11_SUPPORT=Off \
161 %endif
162     #eol
163
164 %build
165 cp %{SOURCE1} .
166 cp %{SOURCE2} .
167 cp %{SOURCE3} .
168 cp %{SOURCE4} .
169 cp %{SOURCE5} .
170 cp %{SOURCE6} .
171 %cmake . -DTZ_SYS_ETC=%TZ_SYS_ETC
172
173 %install
174 %make_install
175
176 %install_service multi-user.target.wants system-server.service
177 %install_service sockets.target.wants system-server.socket
178
179 %install_service graphical.target.wants regpmon.service
180 install -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/regpmon.service
181
182 %install_service graphical.target.wants zbooting-done.service
183 install -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/zbooting-done.service
184
185 %if 0%{?simulator}
186 rm -f %{buildroot}%{_bindir}/restart
187 %endif
188
189 %post
190 #memory type vconf key init
191 users_gid=$(getent group $TZ_SYS_USER_GROUP | cut -f3 -d':')
192
193 vconftool set -t int memory/sysman/usbhost_status -1 -i
194 vconftool set -t int memory/sysman/mmc 0 -i
195 vconftool set -t int memory/sysman/earjack_key 0 -i
196 vconftool set -t int memory/sysman/added_usb_storage 0 -i
197 vconftool set -t int memory/sysman/removed_usb_storage 0 -i
198 vconftool set -t int memory/sysman/charger_status -1 -i
199 vconftool set -t int memory/sysman/charge_now -1 -i
200 vconftool set -t int memory/sysman/battery_status_low -1 -i
201 vconftool set -t int memory/sysman/battery_capacity -1 -i
202 vconftool set -t int memory/sysman/usb_status -1 -i
203 vconftool set -t int memory/sysman/earjack -1 -i
204 vconftool set -t int memory/sysman/low_memory 1 -i
205 vconftool set -t int memory/sysman/sliding_keyboard -1 -i
206 vconftool set -t int memory/sysman/mmc_mount -1 -i
207 vconftool set -t int memory/sysman/mmc_unmount -1 -i
208 vconftool set -t int memory/sysman/mmc_format -1 -i
209 vconftool set -t int memory/sysman/mmc_format_progress 0 -i
210 vconftool set -t int memory/sysman/mmc_err_status 0 -i
211 vconftool set -t int memory/sysman/power_off 0 -g $users_gid -i -f
212 vconftool set -t int memory/sysman/battery_level_status -1 -i
213 vconftool set -t string memory/private/sysman/added_storage_uevent "" -i
214 vconftool set -t string memory/private/sysman/removed_storage_uevent "" -g $users_gid -i
215
216 vconftool set -t int memory/sysman/hdmi 0 -i
217
218 vconftool set -t int memory/sysman/stime_changed 0 -i
219
220 #db type vconf key init
221 vconftool set -t int db/sysman/mmc_dev_changed 0 -i
222
223 vconftool set -t int memory/pm/state 0 -i -g $users_gid
224 vconftool set -t int memory/pm/battery_timetofull -1 -i
225 vconftool set -t int memory/pm/battery_timetoempty -1 -i
226 vconftool set -t int memory/pm/sip_status 0 -i -g $users_gid
227 vconftool set -t int memory/pm/custom_brightness_status 0 -i -g $users_gid
228 vconftool set -t bool memory/pm/brt_changed_lpm 0 -i
229 vconftool set -t int memory/pm/current_brt 60 -i -g $users_gid
230
231 heynotitool set system_wakeup
232 heynotitool set pm_event
233
234 heynotitool set power_off_start
235
236 heynotitool set mmcblk_add
237 heynotitool set mmcblk_remove
238 heynotitool set device_charge_chgdet
239 heynotitool set device_usb_host_add
240 heynotitool set device_usb_host_remove
241 heynotitool set device_pci_keyboard_add
242 heynotitool set device_pci_keyboard_remove
243
244 heynotitool set device_usb_chgdet
245 heynotitool set device_ta_chgdet
246 heynotitool set device_earjack_chgdet
247 heynotitool set device_earkey_chgdet
248 heynotitool set device_tvout_chgdet
249 heynotitool set device_hdmi_chgdet
250 heynotitool set device_keyboard_chgdet
251
252
253 systemctl daemon-reload
254 if [ "$1" = "1" ]; then
255     systemctl restart system-server.service
256     systemctl restart regpmon.service
257         systemctl restart zbooting-done.service
258 fi
259 /sbin/ldconfig
260
261 %preun
262 if [ "$1" = "0" ]; then
263     systemctl stop system-server.service
264     systemctl stop regpmon.service
265         systemctl stop zbooting-done.service
266 fi
267
268 %postun
269 systemctl daemon-reload
270 /sbin/ldconfig
271
272 %post -n sysman -p /sbin/ldconfig
273
274 %postun -n sysman -p /sbin/ldconfig
275
276 %post -n libslp-pm -p /sbin/ldconfig
277
278 %postun -n libslp-pm -p /sbin/ldconfig
279
280 %post -n libhaptic -p /sbin/ldconfig
281
282 %postun -n libhaptic -p /sbin/ldconfig
283
284 %post -n libdevman -p /sbin/ldconfig
285
286 %postun -n libdevman -p /sbin/ldconfig
287
288 %post -n libdeviced -p /sbin/ldconfig
289
290 %postun -n libdeviced -p /sbin/ldconfig
291
292 %files
293 %manifest %{name}.manifest
294 %license LICENSE.APLv2
295 %config %{_sysconfdir}/dbus-1/system.d/deviced.conf
296 %{_bindir}/system_server
297 %{_libdir}/system-server/shutdown.sh
298 %if %{undefined simulator}
299 %{_bindir}/restart
300 %endif
301 %{_bindir}/movi_format.sh
302 %{_bindir}/sys_event
303 %{_bindir}/pm_event
304 %{_bindir}/regpmon
305 %{_bindir}/set_pmon
306 %{_bindir}/sys_pci_noti
307 %{_bindir}/mmc-smack-label
308 %{_bindir}/device-daemon
309 %{_bindir}/fsck_msdosfs
310 %{_unitdir}/multi-user.target.wants/system-server.service
311 %{_unitdir}/graphical.target.wants/regpmon.service
312 %{_unitdir}/sockets.target.wants/system-server.socket
313 %{_unitdir}/system-server.service
314 %{_unitdir}/system-server.socket
315 %{_unitdir}/regpmon.service
316 %{_unitdir}/graphical.target.wants/zbooting-done.service
317 %{_unitdir}/zbooting-done.service
318 %{_datadir}/system-server/sys_pci_noti/res/locale/*/LC_MESSAGES/*.mo
319 %{_datadir}/license/fsck_msdosfs
320
321 %files -n sysman
322 %manifest sysman.manifest
323 %defattr(-,root,root,-)
324 %{_libdir}/libsysman.so.*
325
326 %files -n sysman-devel
327 %defattr(-,root,root,-)
328 %{_includedir}/sysman/sysman.h
329 %{_includedir}/sysman/sysman_managed.h
330 %{_includedir}/sysman/sysman_PG.h
331 %{_libdir}/pkgconfig/sysman.pc
332 %{_libdir}/libsysman.so
333
334 %files -n sysman-internal-devel
335 %defattr(-,root,root,-)
336 %{_includedir}/sysman/sysman-internal.h
337
338 %files -n libslp-pm
339 %defattr(-,root,root,-)
340 %manifest libslp-pm.manifest
341 %{_libdir}/libpmapi.so.*
342
343 %files -n libslp-pm-devel
344 %defattr(-,root,root,-)
345 %{_includedir}/pmapi/pmapi.h
346 %{_includedir}/pmapi/pmapi_managed.h
347 %{_includedir}/pmapi/pm_PG.h
348 %{_libdir}/pkgconfig/pmapi.pc
349 %{_libdir}/libpmapi.so
350
351 %files -n libhaptic
352 %defattr(-,root,root,-)
353 %{_libdir}/libhaptic.so.*
354 %manifest haptic.manifest
355
356 %files -n libhaptic-devel
357 %defattr(-,root,root,-)
358 %{_includedir}/haptic/haptic.h
359 %{_libdir}/libhaptic.so
360 %{_libdir}/pkgconfig/haptic.pc
361
362 %files -n libhaptic-plugin-devel
363 %defattr(-,root,root,-)
364 %{_includedir}/haptic/haptic_module.h
365 %{_includedir}/haptic/haptic_plugin_intf.h
366 %{_includedir}/haptic/haptic_PG.h
367 %{_libdir}/pkgconfig/haptic-plugin.pc
368
369 %files -n libdevman
370 %{_bindir}/display_wd
371 %{_libdir}/libdevman.so.*
372 %manifest devman.manifest
373
374 %files -n libdevman-devel
375 %{_includedir}/devman/devman.h
376 %{_includedir}/devman/devman_image.h
377 %{_includedir}/devman/devman_managed.h
378 %{_includedir}/devman/devman_haptic.h
379 %{_includedir}/devman/devman_PG.h
380 %{_libdir}/pkgconfig/devman.pc
381 %{_libdir}/libdevman.so
382
383 %files -n libdevman-haptic-devel
384 %{_includedir}/devman/devman_haptic_ext.h
385 %{_includedir}/devman/devman_haptic_ext_core.h
386 %{_libdir}/pkgconfig/devman_haptic.pc
387
388 %files -n libdeviced
389 %defattr(-,root,root,-)
390 %{_libdir}/libdeviced.so.*
391 %manifest deviced.manifest
392
393 %files -n libdeviced-devel
394 %defattr(-,root,root,-)
395 %{_includedir}/deviced/dd-battery.h
396 %{_includedir}/deviced/dd-control.h
397 %{_includedir}/deviced/dd-deviced.h
398 %{_includedir}/deviced/dd-deviced-managed.h
399 %{_includedir}/deviced/dd-display.h
400 %{_includedir}/deviced/dd-haptic.h
401 %{_includedir}/deviced/dd-led.h
402 %{_includedir}/deviced/haptic-module.h
403 %{_includedir}/deviced/haptic-plugin-intf.h
404 %{_libdir}/libdeviced.so
405 %{_libdir}/pkgconfig/deviced.pc
406