78c7d7d626ed9a2c45010149a26a40e8bfa79ffd
[platform/core/system/system-server.git] / packaging / system-server.spec
1 #sbs-git:slp/pkgs/s/system-server system-server 0.1.51 56e16bca39f96d6c8aed9ed3df2fea9b393801be
2 Name:       system-server
3 Summary:    System server
4 Version: 0.1.63
5 Release:    1
6 Group:      framework-system
7 License:    APLv2
8 Source0:    system-server-%{version}.tar.gz
9 Source1:    system-server.service
10 Source2:    system-server.manifest
11 BuildRequires:  cmake
12 BuildRequires:  libattr-devel
13 BuildRequires:  pkgconfig(ecore)
14 BuildRequires:  pkgconfig(heynoti)
15 BuildRequires:  pkgconfig(vconf)
16 BuildRequires:  pkgconfig(sysman)
17 BuildRequires:  pkgconfig(tapi)
18 BuildRequires:  pkgconfig(devman)
19 BuildRequires:  pkgconfig(pmapi)
20 BuildRequires:  pkgconfig(edbus)
21 BuildRequires:  pkgconfig(dlog)
22 BuildRequires:  pkgconfig(syspopup-caller)
23 BuildRequires:  pkgconfig(devman_plugin)
24 BuildRequires:  pkgconfig(x11)
25 BuildRequires:  pkgconfig(svi)
26 BuildRequires:  pkgconfig(notification)
27 BuildRequires:  pkgconfig(usbutils)
28 BuildRequires:  gettext
29 Requires: sys-assert
30 Requires(preun): /usr/bin/systemctl
31 Requires(post): /usr/bin/systemctl
32 Requires(post): /usr/bin/vconftool
33 Requires(postun): /usr/bin/systemctl
34
35 %description
36 Description: System server
37
38 %prep
39 %setup -q
40 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
41
42 %build
43 cp %{SOURCE2} .
44 make %{?jobs:-j%jobs}
45
46 %install
47 rm -rf %{buildroot}
48 %make_install
49
50 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/
51 ln -s %{_sysconfdir}/init.d/system_server.sh %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S35system-server
52 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
53 ln -s %{_sysconfdir}/init.d/system_server.sh %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S00system-server
54
55 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
56 install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/system-server.service
57 ln -s ../system-server.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/system-server.service
58
59 %post
60
61 vconftool set -t int memory/sysman/usbhost_status -1 -i
62 vconftool set -t int memory/sysman/mmc -1 -i
63 vconftool set -t int memory/sysman/earjack_key 0 -i
64 vconftool set -t int memory/sysman/added_usb_storage 0 -i
65 vconftool set -t int memory/sysman/removed_usb_storage 0 -i
66 vconftool set -t int memory/sysman/charger_status -1 -i
67 vconftool set -t int memory/sysman/charge_now -1 -i
68 vconftool set -t int memory/sysman/battery_status_low -1 -i
69 vconftool set -t int memory/sysman/battery_capacity -1 -i
70 vconftool set -t int memory/sysman/usb_status -1 -i
71 vconftool set -t int memory/sysman/earjack -1 -i
72 vconftool set -t int memory/sysman/low_memory 1 -i
73 vconftool set -t int memory/sysman/sliding_keyboard -1 -i
74 vconftool set -t int memory/sysman/mmc_mount -1 -i
75 vconftool set -t int memory/sysman/mmc_unmount -1 -i
76 vconftool set -t int memory/sysman/mmc_format -1 -i
77
78 vconftool set -t string memory/private/sysman/added_storage_uevent "" -i
79 vconftool set -t string memory/private/sysman/removed_storage_uevent "" -u 5000 -i
80
81 vconftool set -t int memory/sysman/hdmi 0 -i
82
83 heynotitool set power_off_start
84
85 heynotitool set mmcblk_add
86 heynotitool set mmcblk_remove
87
88 heynotitool set device_usb_chgdet
89 heynotitool set device_ta_chgdet
90 heynotitool set device_earjack_chgdet
91 heynotitool set device_earkey_chgdet
92 heynotitool set device_tvout_chgdet
93 heynotitool set device_hdmi_chgdet
94 heynotitool set device_charge_chgdet
95 heynotitool set device_keyboard_chgdet
96 heynotitool set device_usb_host_add
97 heynotitool set device_usb_host_remove
98 heynotitool set device_pci_keyboard_add
99 heynotitool set device_pci_keyboard_remove
100
101
102 mkdir -p /etc/udev/rules.d
103 if ! [ -L /etc/udev/rules.d/91-system-server.rules ]; then
104         ln -s %{_datadir}/system-server/udev-rules/91-system-server.rules /etc/udev/rules.d/91-system-server.rules
105 fi
106
107 systemctl daemon-reload
108 if [ $1 == 1 ]; then
109     systemctl restart system-server.service
110 fi
111
112 if [ -f %{_libdir}/rpm-plugins/msm.so ] ; then
113         find /opt/share/crash -print0 | xargs -0 chsmack -a 'sys-assert::core'
114         find /opt/share/crash -type d -print0 | xargs -0 chsmack -t
115 fi
116
117
118 %preun
119 if [ $1 == 0 ]; then
120     systemctl stop system-server.service
121 fi
122
123 %postun
124 systemctl daemon-reload
125
126
127 %files
128 %manifest system-server.manifest
129 %config %{_sysconfdir}/dbus-1/system.d/system-server.conf
130 %{_sysconfdir}/rc.d/init.d/system_server.sh
131 %{_sysconfdir}/rc.d/rc3.d/S35system-server
132 %{_sysconfdir}/rc.d/rc5.d/S00system-server
133 %{_bindir}/system_server
134 %if 0%{?simulator}
135 %exclude %{_bindir}/restart
136 %else
137 %{_bindir}/restart
138 %endif
139 %{_bindir}/movi_format.sh
140 %{_bindir}/sys_event
141 %{_bindir}/sys_device_noti
142 %{_bindir}/sys_pci_noti
143 %{_libdir}/systemd/system/multi-user.target.wants/system-server.service
144 %{_libdir}/systemd/system/system-server.service
145 %{_datadir}/system-server/sys_device_noti/batt_full_icon.png
146 %{_datadir}/system-server/udev-rules/91-system-server.rules
147 %{_datadir}/system-server/sys_device_noti/res/locale/*/LC_MESSAGES/*.mo
148 %{_datadir}/system-server/sys_pci_noti/res/locale/*/LC_MESSAGES/*.mo