fix: libslp-pm-devel depends on libslp-pm
[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 %{?systemd_requires}
41 Requires(preun): /usr/bin/systemctl
42 Requires(post): /usr/bin/systemctl
43 Requires(post): /usr/bin/vconftool
44 Requires(postun): /usr/bin/systemctl
45
46 %description
47 system server
48
49 %package system-server
50 Summary:    System-server daemon
51 Group:      System/Service
52 Requires:   %{name} = %{version}-%{release}
53
54 %description system-server
55 system server daemon.
56
57 %package -n sysman
58 Summary:    Sysman library
59 License:    Apache-2.0
60 Group:      System/Libraries
61 Requires:   %{name} = %{version}-%{release}
62
63 %description -n sysman
64 sysman library.
65
66 %package -n sysman-devel
67 Summary:    Sysman devel library
68 License:    Apache-2.0
69 Group:      System/Development
70 Requires:   %{name} = %{version}-%{release}
71
72 %description -n sysman-devel
73 sysman devel library.
74
75 %package -n sysman-internal-devel
76 Summary:    Sysman internal devel library
77 License:    Apache-2.0
78 Group:      System/Development
79 Requires:   %{name} = %{version}-%{release}
80
81 %description -n sysman-internal-devel
82 sysman internal devel library.
83
84 %package -n libslp-pm
85 Summary:    Power manager client
86 Group:      System/Libraries
87 Requires:   %{name} = %{version}-%{release}
88
89 %description -n libslp-pm
90 power-manager library.
91
92 %package -n libslp-pm-devel
93 Summary:    Power manager client (devel)
94 Group:      System/Development
95 Requires:   libslp-pm = %{version}-%{release}
96
97 %description -n libslp-pm-devel
98 power-manager devel library.
99
100 %package -n libhaptic
101 Summary:    Haptic library
102 Group:      Development/Libraries
103 Requires:   %{name} = %{version}-%{release}
104
105 %description -n libhaptic
106 Haptic library for device control
107
108 %package -n libhaptic-devel
109 Summary:    Haptic library for (devel)
110 Group:      Development/Libraries
111 Requires:   libhaptic = %{version}-%{release}
112
113 %description -n libhaptic-devel
114 Haptic library for device control (devel)
115
116 %package -n libhaptic-plugin-devel
117 Summary:    Haptic plugin library for (devel)
118 Group:      Development/Libraries
119
120 %description -n libhaptic-plugin-devel
121 Haptic plugin library for device control (devel)
122
123 %package -n libdevman
124 Summary:    Device manager library
125 Group:      Development/Libraries
126 Requires:   %{name} = %{version}-%{release}
127
128 %description -n libdevman
129 Device manager library for device control
130
131 %package -n libdevman-devel
132 Summary:    Device manager library for (devel)
133 Group:      Development/Libraries
134 Requires:   libdevman = %{version}-%{release}
135
136 %description -n libdevman-devel
137 Device manager library for device control (devel)
138
139 %package -n libdevman-haptic-devel
140 Summary:    Haptic Device manager library for (devel)
141 Group:      Development/Libraries
142 Requires:   libdevman-devel = %{version}-%{release}
143
144 %description -n libdevman-haptic-devel
145 Haptic Device manager library for device control (devel)
146
147 %package -n libdeviced
148 Summary:    Deviced library
149 Group:      System/Libraries
150
151 %description -n libdeviced
152 Deviced library for device control
153
154 %package -n libdeviced-devel
155 Summary:    Deviced library for (devel)
156 Group:      System/Development
157 Requires:   libdeviced = %{version}-%{release}
158
159 %description -n libdeviced-devel
160 Deviced library for device control (devel)
161
162 %prep
163 %setup -q
164
165 %cmake . \
166     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
167 %if %{with x}
168     -DX11_SUPPORT=On \
169 %else
170     -DX11_SUPPORT=Off \
171 %endif
172     #eol
173
174 %build
175 cp %{SOURCE1} .
176 cp %{SOURCE2} .
177 cp %{SOURCE3} .
178 cp %{SOURCE4} .
179 cp %{SOURCE5} .
180 cp %{SOURCE6} .
181 %cmake .
182
183 %install
184 rm -rf %{buildroot}
185 %make_install
186
187 %install_service multi-user.target.wants system-server.service
188 %install_service sockets.target.wants system-server.service
189
190 %install_service graphical.target.wants regpmon.service
191 install -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/regpmon.service
192
193 %install_service graphical.target.wants zbooting-done.service
194 install -m 0644 %{SOURCE9} %{buildroot}%{_unitdir}/zbooting-done.service
195
196 %post
197 #memory type vconf key init
198 vconftool set -t int memory/sysman/usbhost_status -1 -i
199 vconftool set -t int memory/sysman/mmc 0 -i
200 vconftool set -t int memory/sysman/earjack_key 0 -i
201 vconftool set -t int memory/sysman/added_usb_storage 0 -i
202 vconftool set -t int memory/sysman/removed_usb_storage 0 -i
203 vconftool set -t int memory/sysman/charger_status -1 -i
204 vconftool set -t int memory/sysman/charge_now -1 -i
205 vconftool set -t int memory/sysman/battery_status_low -1 -i
206 vconftool set -t int memory/sysman/battery_capacity -1 -i
207 vconftool set -t int memory/sysman/usb_status -1 -i
208 vconftool set -t int memory/sysman/earjack -1 -i
209 vconftool set -t int memory/sysman/low_memory 1 -i
210 vconftool set -t int memory/sysman/sliding_keyboard -1 -i
211 vconftool set -t int memory/sysman/mmc_mount -1 -i
212 vconftool set -t int memory/sysman/mmc_unmount -1 -i
213 vconftool set -t int memory/sysman/mmc_format -1 -i
214 vconftool set -t int memory/sysman/mmc_format_progress 0 -i
215 vconftool set -t int memory/sysman/mmc_err_status 0 -i
216 vconftool set -t int memory/sysman/power_off 0 -u 5000 -i -f
217 vconftool set -t int memory/sysman/battery_level_status -1 -i
218 vconftool set -t string memory/private/sysman/added_storage_uevent "" -i
219 vconftool set -t string memory/private/sysman/removed_storage_uevent "" -u 5000 -i
220
221 vconftool set -t int memory/sysman/hdmi 0 -i
222
223 vconftool set -t int memory/sysman/stime_changed 0 -i
224
225 #db type vconf key init
226 vconftool set -t int db/sysman/mmc_dev_changed 0 -i
227
228 vconftool set -t int memory/pm/state 0 -i -g 5000
229 vconftool set -t int memory/pm/battery_timetofull -1 -i
230 vconftool set -t int memory/pm/battery_timetoempty -1 -i
231 vconftool set -t int memory/pm/sip_status 0 -i -g 5000
232 vconftool set -t int memory/pm/custom_brightness_status 0 -i -g 5000
233 vconftool set -t bool memory/pm/brt_changed_lpm 0 -i
234 vconftool set -t int memory/pm/current_brt 60 -i -g 5000
235
236 heynotitool set system_wakeup
237 heynotitool set pm_event
238
239 heynotitool set power_off_start
240
241 heynotitool set mmcblk_add
242 heynotitool set mmcblk_remove
243 heynotitool set device_charge_chgdet
244 heynotitool set device_usb_host_add
245 heynotitool set device_usb_host_remove
246 heynotitool set device_pci_keyboard_add
247 heynotitool set device_pci_keyboard_remove
248
249 heynotitool set device_usb_chgdet
250 heynotitool set device_ta_chgdet
251 heynotitool set device_earjack_chgdet
252 heynotitool set device_earkey_chgdet
253 heynotitool set device_tvout_chgdet
254 heynotitool set device_hdmi_chgdet
255 heynotitool set device_keyboard_chgdet
256
257
258 systemctl daemon-reload
259 if [ "$1" = "1" ]; then
260     systemctl restart system-server.service
261     systemctl restart regpmon.service
262         systemctl restart zbooting-done.service
263 fi
264 /sbin/ldconfig
265
266 %preun
267 if [ "$1" = "0" ]; then
268     systemctl stop system-server.service
269     systemctl stop regpmon.service
270         systemctl stop zbooting-done.service
271 fi
272
273 %postun
274 systemctl daemon-reload
275 /sbin/ldconfig
276
277 %files -n system-server
278 %manifest %{name}.manifest
279 %license LICENSE.APLv2
280 %config %{_sysconfdir}/dbus-1/system.d/system-server.conf
281 %{_bindir}/system_server
282 /opt/etc/smack/accesses.d/system-server.rule
283 %{_libdir}/system-server/shutdown.sh
284 %if 0%{?simulator}
285 %exclude %{_bindir}/restart
286 %else
287 %{_bindir}/restart
288 %endif
289 %{_bindir}/movi_format.sh
290 %{_bindir}/sys_event
291 %{_bindir}/pm_event
292 %{_bindir}/regpmon
293 %{_bindir}/set_pmon
294 %{_bindir}/pmon
295 %{_bindir}/sys_pci_noti
296 %{_bindir}/mmc-smack-label
297 %{_bindir}/device-daemon
298 %{_bindir}/fsck_msdosfs
299 %{_unitdir}/multi-user.target.wants/system-server.service
300 %{_unitdir}/graphical.target.wants/regpmon.service
301 %{_unitdir}/sockets.target.wants/system-server.service
302 %{_unitdir}/system-server.service
303 %{_unitdir}/system-server.socket
304 %{_unitdir}/regpmon.service
305 %{_unitdir}/graphical.target.wants/zbooting-done.service
306 %{_unitdir}/zbooting-done.service
307 %{_datadir}/system-server/sys_pci_noti/res/locale/*/LC_MESSAGES/*.mo
308 %config %{_sysconfdir}/dbus-1/system.d/system-server.conf
309 %{_datadir}/license/fsck_msdosfs
310
311 %files -n sysman
312 %manifest sysman.manifest
313 %defattr(-,root,root,-)
314 %{_libdir}/libsysman.so.*
315 %{_bindir}/regpmon
316 %{_bindir}/set_pmon
317
318 %post -n sysman
319 /sbin/ldconfig
320
321 %postun -n sysman
322 /sbin/ldconfig
323
324 %files -n sysman-devel
325 %defattr(-,root,root,-)
326 %{_includedir}/sysman/sysman.h
327 %{_includedir}/sysman/sysman_managed.h
328 %{_includedir}/sysman/sysman_PG.h
329 %{_libdir}/pkgconfig/sysman.pc
330 %{_libdir}/libsysman.so
331
332 %files -n sysman-internal-devel
333 %defattr(-,root,root,-)
334 %{_includedir}/sysman/sysman-internal.h
335
336 %files -n libslp-pm
337 %defattr(-,root,root,-)
338 %manifest libslp-pm.manifest
339 %{_libdir}/libpmapi.so.*
340
341 %post -n libslp-pm
342 /sbin/ldconfig
343
344 %postun -n libslp-pm
345 /sbin/ldconfig
346
347 %files -n libslp-pm-devel
348 %defattr(-,root,root,-)
349 %{_includedir}/pmapi/pmapi.h
350 %{_includedir}/pmapi/pmapi_managed.h
351 %{_includedir}/pmapi/pm_PG.h
352 %{_libdir}/pkgconfig/pmapi.pc
353 %{_libdir}/libpmapi.so
354
355 %post -n libslp-pm-devel
356 /sbin/ldconfig
357
358 %postun -n libslp-pm-devel
359 /sbin/ldconfig
360
361 %files -n libhaptic
362 %defattr(-,root,root,-)
363 %{_libdir}/libhaptic.so.*
364 %manifest haptic.manifest
365
366 %post -n libhaptic
367 /sbin/ldconfig
368
369 %postun -n libhaptic
370 /sbin/ldconfig
371
372
373 %files -n libhaptic-devel
374 %defattr(-,root,root,-)
375 %{_includedir}/haptic/haptic.h
376 %{_libdir}/libhaptic.so
377 %{_libdir}/pkgconfig/haptic.pc
378
379 %post -n libhaptic-devel
380 /sbin/ldconfig
381
382 %postun -n libhaptic-devel
383 /sbin/ldconfig
384
385 %files -n libhaptic-plugin-devel
386 %defattr(-,root,root,-)
387 %{_includedir}/haptic/haptic_module.h
388 %{_includedir}/haptic/haptic_plugin_intf.h
389 %{_includedir}/haptic/haptic_PG.h
390 %{_libdir}/pkgconfig/haptic-plugin.pc
391
392 %files -n libdevman
393 %{_bindir}/display_wd
394 %{_libdir}/libdevman.so.*
395 %manifest devman.manifest
396
397
398 %post -n libdevman
399 /sbin/ldconfig
400
401 %postun -n libdevman
402 /sbin/ldconfig
403
404 %files -n libdevman-devel
405 %{_includedir}/devman/devman.h
406 %{_includedir}/devman/devman_image.h
407 %{_includedir}/devman/devman_managed.h
408 %{_includedir}/devman/devman_haptic.h
409 %{_includedir}/devman/devman_PG.h
410 %{_libdir}/pkgconfig/devman.pc
411 %{_libdir}/libdevman.so
412
413 %post -n libdevman-devel
414 /sbin/ldconfig
415
416 %postun -n libdevman-devel
417 /sbin/ldconfig
418
419 %files -n libdevman-haptic-devel
420 %{_includedir}/devman/devman_haptic_ext.h
421 %{_includedir}/devman/devman_haptic_ext_core.h
422 %{_libdir}/pkgconfig/devman_haptic.pc
423
424 %files -n libdeviced
425 %defattr(-,root,root,-)
426 %{_libdir}/libdeviced.so.*
427 %manifest deviced.manifest
428
429 %post -n libdeviced
430 /sbin/ldconfig
431
432 %postun -n libdeviced
433 /sbin/ldconfig
434
435 %files -n libdeviced-devel
436 %defattr(-,root,root,-)
437 %{_includedir}/deviced/dd-battery.h
438 %{_includedir}/deviced/dd-control.h
439 %{_includedir}/deviced/dd-deviced.h
440 %{_includedir}/deviced/dd-deviced-managed.h
441 %{_includedir}/deviced/dd-display.h
442 %{_includedir}/deviced/dd-haptic.h
443 %{_includedir}/deviced/dd-led.h
444 %{_includedir}/deviced/haptic-module.h
445 %{_includedir}/deviced/haptic-plugin-intf.h
446 %{_libdir}/libdeviced.so
447 %{_libdir}/pkgconfig/deviced.pc
448
449 %post -n libdeviced-devel
450 /sbin/ldconfig
451
452 %postun -n libdeviced-devel
453 /sbin/ldconfig