tizen 2.4 release
[framework/appfw/aul-1.git] / packaging / aul.spec
1 Name:       aul
2 Summary:    App utility library
3 Version:    0.2.3.0
4 Release:    7
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source101:  ac.service
9
10 Requires(post): /sbin/ldconfig
11 Requires(post): /usr/bin/systemctl
12 Requires(postun): /sbin/ldconfig
13 Requires(postun): /usr/bin/systemctl
14 Requires(preun): /usr/bin/systemctl
15
16 BuildRequires:  cmake
17 BuildRequires:  pkgconfig(dbus-glib-1)
18 BuildRequires:  pkgconfig(sqlite3)
19 BuildRequires:  pkgconfig(x11)
20 BuildRequires:  pkgconfig(ecore)
21 BuildRequires:  pkgconfig(bundle)
22 BuildRequires:  pkgconfig(dlog)
23 BuildRequires:  xdgmime-devel, pkgconfig(xdgmime)
24 BuildRequires:  pkgconfig(libprivilege-control)
25 BuildRequires:  pkgconfig(rua)
26 BuildRequires:  pkgconfig(ecore-x)
27 BuildRequires:  pkgconfig(ecore-evas)
28 BuildRequires:  pkgconfig(ecore-input)
29 BuildRequires:  pkgconfig(utilX)
30 BuildRequires:  pkgconfig(vconf)
31 BuildRequires:  pkgconfig(pkgmgr-info)
32 BuildRequires:  pkgconfig(libsmack)
33 BuildRequires:  pkgconfig(libresourced)
34 BuildRequires:  pkgconfig(security-server)
35 BuildRequires:  pkgconfig(iniparser)
36 BuildRequires:  pkgconfig(ttrace)
37 BuildRequires:  pkgconfig(vasum)
38 BuildRequires:  pkgconfig(appfw-env)
39 BuildRequires:  pkgconfig(capi-system-info)
40 BuildRequires: pkgconfig(cert-svc)
41
42 %define keepstatic 1
43
44 %define appfw_feature_process_pool 1
45 %define appfw_feature_multi_instance 1
46 %define appfw_feature_hw_rendering 0
47 %define appfw_feature_priority_change 1
48 %define appfw_feature_default_fake_image 0
49 %define appfw_feature_data_control 1
50 %define appfw_feature_debug_launchpad 1
51 %define appfw_feature_app_control_lite 0
52 %define appfw_feature_terminate_unmanageable_app 0
53 %if "%{?tizen_profile_name}" == "wearable"
54 %define appfw_feature_bg_process_limit 0
55 %define appfw_feature_app_checker 0
56 %define appfw_feature_tts_mode 0
57 %define appfw_feature_cpu_boost 1
58 %define appfw_feature_amd_key 1
59 %define appfw_feature_mmc_support 1
60 %define appfw_feature_send_home_launch_signal 1
61 %define appfw_feature_fake_effect 1
62 %define appfw_feature_effective_appid 0
63 %define appfw_feature_private_service 1
64 %define appfw_feature_background_management 1
65 %else
66 %if "%{?tizen_profile_name}" == "mobile"
67 BuildRequires:  pkgconfig(app-checker)
68 BuildRequires:  pkgconfig(app-checker-server)
69
70 %define appfw_feature_bg_process_limit 0
71 %define appfw_feature_app_checker 1
72 %define appfw_feature_tts_mode 0
73 %define appfw_feature_cpu_boost 1
74 %define appfw_feature_amd_key 1
75 %define appfw_feature_mmc_support 1
76 %define appfw_feature_send_home_launch_signal 1
77 %define appfw_feature_fake_effect 1
78 %define appfw_feature_effective_appid 1
79 %define appfw_feature_private_service 1
80 %define appfw_feature_background_management 1
81 %else
82 %if "%{?tizen_profile_name}" == "tv"
83 %define appfw_feature_bg_process_limit 0
84 %define appfw_feature_app_checker 0
85 %define appfw_feature_tts_mode 0
86 %define appfw_feature_cpu_boost 0
87 %define appfw_feature_amd_key 0
88 %define appfw_feature_mmc_support 0
89 %define appfw_feature_send_home_launch_signal 0
90 %define appfw_feature_fake_effect 0
91 %define appfw_feature_effective_appid 0
92 %define appfw_feature_private_service 0
93 %define appfw_feature_background_management 0
94 %endif
95 %endif
96 %endif
97 %define appfw_feature_ultra_power_saving_mode 0
98 %define appfw_feature_cooldown_mode_support 0
99 %if "%{?tizen_profile_name}" == "wearable"
100 %define appfw_feature_visibility_check_by_lcd_status 1
101 %else
102 %if "%{?tizen_profile_name}" == "mobile"
103 %define appfw_feature_visibility_check_by_lcd_status 0
104 %else
105 %if "%{?tizen_profile_name}" == "tv"
106 %define appfw_feature_visibility_check_by_lcd_status 0
107 %endif
108 %endif
109 %endif
110 %define appfw_feature_amd_module_log 1
111 %define appfw_feature_expansion_pkg_install 1
112
113 %description
114 Application utility library
115
116 %package devel
117 Summary:    App utility library (devel)
118 Group:      Development/Libraries
119 Requires:   %{name} = %{version}-%{release}
120
121 %description devel
122 Application utility library (devel)
123
124
125 %prep
126 %setup -q
127
128 %build
129 %if 0%{?sec_build_binary_debug_enable}
130 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
131 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
132 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
133 %endif
134 %if 0%{?appfw_feature_process_pool}
135 _APPFW_FEATURE_PROCESS_POOL=ON
136 %endif
137 %if 0%{?appfw_feature_multi_instance}
138 _APPFW_FEATURE_MULTI_INSTANCE=ON
139 %endif
140 %if 0%{?appfw_feature_priority_change}
141 _APPFW_FEATURE_PRIORITY_CHANGE=ON
142 %endif
143 %if 0%{?appfw_feature_default_fake_image}
144 _APPFW_FEATURE_DEFAULT_FAKE_IMAGE=ON
145 %endif
146 %if 0%{?appfw_feature_data_control}
147 _APPFW_FEATURE_DATA_CONTROL=ON
148 %endif
149 %if 0%{?appfw_feature_debug_launchpad}
150 _APPFW_FEATURE_DEBUG_LAUNCHPAD=ON
151 %endif
152 %if 0%{?appfw_feature_app_control_lite}
153 _APPFW_FEATURE_APP_CONTROL_LITE=ON
154 %endif
155 %if 0%{?appfw_feature_bg_process_limit}
156 _APPFW_FEATURE_BG_PROCESS_LIMIT=ON
157 %endif
158 %if 0%{?appfw_feature_app_checker}
159 _APPFW_FEATURE_APP_CHECKER=ON
160 %endif
161 %if 0%{?appfw_feature_tts_mode}
162 _APPFW_FEATURE_TTS_MODE=ON
163 %endif
164 %if 0%{?appfw_feature_ultra_power_saving_mode}
165 _APPFW_FEATURE_ULTRA_POWER_SAVING_MODE=ON
166 %endif
167 %if 0%{?appfw_feature_cooldown_mode_support}
168 _APPFW_FEATURE_COOLDOWN_MODE_SUPPORT=ON
169 %endif
170 %if 0%{?appfw_feature_amd_module_log}
171 _APPFW_FEATURE_AMD_MODULE_LOG=ON
172 %endif
173 %if 0%{?appfw_feature_expansion_pkg_install}
174 _APPFW_FEATURE_EXPANSION_PKG_INSTALL=ON
175 %endif
176 %if 0%{?appfw_feature_cpu_boost}
177 _APPFW_FEATURE_CPU_BOOST=ON
178 %endif
179 %if 0%{?appfw_feature_background_management}
180 _APPFW_FEATURE_BACKGROUND_MANAGEMENT=ON
181 %endif
182 %if 0%{?appfw_feature_amd_key}
183 _APPFW_FEATURE_AMD_KEY=ON
184 %endif
185 %if 0%{?appfw_feature_mmc_support}
186 _APPFW_FEATURE_MMC_SUPPORT=ON
187 %endif
188 %if 0%{?appfw_feature_send_home_launch_signal}
189 _APPFW_FEATURE_SEND_HOME_LAUNCH_SIGNAL=ON
190 %endif
191 %if 0%{?appfw_feature_fake_effect}
192 _APPFW_FEATURE_FAKE_EFFECT=ON
193 %endif
194 %if 0%{?appfw_feature_effective_appid}
195 _APPFW_FEATURE_EFFECTIVE_APPID=ON
196 %endif
197 %if 0%{?appfw_feature_private_service}
198 _APPFW_FEATURE_PRIVATE_SERVICE=ON
199 %endif
200 %if 0%{?appfw_feature_terminate_unmanageable_app}
201 _APPFW_FEATURE_TERMINATE_UNMANAGEABLE_APP=ON
202 %endif
203
204 cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
205         -D_APPFW_FEATURE_PROCESS_POOL:BOOL=${_APPFW_FEATURE_PROCESS_POOL} \
206         -D_APPFW_FEATURE_MULTI_INSTANCE:BOOL=${_APPFW_FEATURE_MULTI_INSTANCE} \
207         -D_APPFW_FEATURE_CHANGEABLE_COLOR:BOOL=${_APPFW_FEATURE_CHANGEABLE_COLOR} \
208         -D_APPFW_FEATURE_CPU_BOOST:BOOL=${_APPFW_FEATURE_CPU_BOOST} \
209         -D_APPFW_FEATURE_PRIORITY_CHANGE:BOOL=${_APPFW_FEATURE_PRIORITY_CHANGE} \
210         -D_APPFW_FEATURE_DEFAULT_FAKE_IMAGE:BOOL=${_APPFW_FEATURE_DEFAULT_FAKE_IMAGE} \
211         -D_APPFW_FEATURE_DATA_CONTROL:BOOL=${_APPFW_FEATURE_DATA_CONTROL} \
212         -D_APPFW_FEATURE_DEBUG_LAUNCHPAD:BOOL=${_APPFW_FEATURE_DEBUG_LAUNCHPAD} \
213         -D_APPFW_FEATURE_APP_CONTROL_LITE:BOOL=${_APPFW_FEATURE_APP_CONTROL_LITE} \
214         -D_APPFW_FEATURE_WMS_CONNECTION_CHECK:BOOL=${_APPFW_FEATURE_WMS_CONNECTION_CHECK} \
215         -D_APPFW_FEATURE_BG_PROCESS_LIMIT:BOOL=${_APPFW_FEATURE_BG_PROCESS_LIMIT} \
216         -D_APPFW_FEATURE_APP_CHECKER:BOOL=${_APPFW_FEATURE_APP_CHECKER} \
217         -D_APPFW_FEATURE_TTS_MODE:BOOL=${_APPFW_FEATURE_TTS_MODE} \
218         -D_APPFW_FEATURE_ULTRA_POWER_SAVING_MODE:BOOL=${_APPFW_FEATURE_ULTRA_POWER_SAVING_MODE} \
219         -D_APPFW_FEATURE_COOLDOWN_MODE_SUPPORT:BOOL=${_APPFW_FEATURE_COOLDOWN_MODE_SUPPORT} \
220         -D_APPFW_FEATURE_VISIBILITY_CHECK_BY_LCD_STATUS:BOOL=${_APPFW_FEATURE_VISIBILITY_CHECK_BY_LCD_STATUS} \
221         -D_APPFW_FEATURE_AMD_MODULE_LOG:BOOL=${_APPFW_FEATURE_AMD_MODULE_LOG} \
222         -D_APPFW_FEATURE_EXPANSION_PKG_INSTALL:BOOL=${_APPFW_FEATURE_EXPANSION_PKG_INSTALL} \
223         -D_APPFW_FEATURE_BACKGROUND_MANAGEMENT:BOOL=${_APPFW_FEATURE_BACKGROUND_MANAGEMENT} \
224         -D_APPFW_FEATURE_AMD_KEY:BOOL=${_APPFW_FEATURE_AMD_KEY} \
225         -D_APPFW_FEATURE_MMC_SUPPORT:BOOL=${_APPFW_FEATURE_MMC_SUPPORT} \
226         -D_APPFW_FEATURE_SEND_HOME_LAUNCH_SIGNAL:BOOL=${_APPFW_FEATURE_SEND_HOME_LAUNCH_SIGNAL} \
227         -D_APPFW_FEATURE_FAKE_EFFECT:BOOL=${_APPFW_FEATURE_FAKE_EFFECT} \
228         -D_APPFW_FEATURE_EFFECTIVE_APPID:BOOL=${_APPFW_FEATURE_EFFECTIVE_APPID} \
229         -D_APPFW_FEATURE_PRIVATE_SERVICE:BOOL=${_APPFW_FEATURE_PRIVATE_SERVICE} \
230         -D_APPFW_FEATURE_TERMINATE_UNMANAGEABLE_APP:BOOL=${_APPFW_FEATURE_TERMINATE_UNMANAGEABLE_APP} \
231         .
232
233 make %{?jobs:-j%jobs}
234
235 %install
236 rm -rf %{buildroot}
237 %make_install
238
239 mkdir -p %{buildroot}/opt/dbspace
240 %if 0%{?appfw_feature_default_fake_image}
241 mkdir -p %{buildroot}/usr/share/splash_images
242 cp -raf effect_img/* %{buildroot}/usr/share/splash_images
243 %endif
244 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
245 install -m0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/ac.service
246 ln -s ../ac.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/ac.service
247 mkdir -p %{buildroot}/usr/share/license
248 cp LICENSE %{buildroot}/usr/share/license/%{name}
249
250 mkdir -p %{buildroot}/usr/share/appsvc
251 cp -R %{_builddir}/%{name}-%{version}/res/arm/usr/share/appsvc/* %{buildroot}/usr/share/appsvc
252
253
254 %post
255 /sbin/ldconfig
256 mkdir -p /opt/dbspace
257 sqlite3 /opt/dbspace/.appsvc.db < /opt/share/appsvc_db.sql
258 rm -rf /opt/share/appsvc_db.sql
259
260 chown 0:5000 /opt/dbspace/.appsvc.db
261 chown 0:5000 /opt/dbspace/.appsvc.db-journal
262 chmod 664 /opt/dbspace/.appsvc.db
263 chmod 664 /opt/dbspace/.appsvc.db-journal
264 chsmack -a 'app-svc::db' /opt/dbspace/.appsvc.db
265 chsmack -a 'app-svc::db' /opt/dbspace/.appsvc.db-journal
266
267 %postun -p /sbin/ldconfig
268
269
270 %files
271 %manifest aul.manifest
272 /opt/share/appsvc_db.sql
273 %attr(0644,root,root) %{_libdir}/libaul.so.0
274 %attr(0644,root,root) %{_libdir}/libaul.so.0.1.0
275 %if 0%{?appfw_feature_default_fake_image}
276 %attr(0755,root,root) %{_bindir}/config_splash.sh
277 %endif
278 %{_bindir}/aul_test
279 %{_bindir}/launch_app
280 %{_bindir}/open_app
281 %{_bindir}/appgroup_info
282 /usr/share/appsvc/*
283 /usr/share/aul/miregex/*
284 /usr/share/aul/preexec_list.txt
285 %if 0%{?appfw_feature_default_fake_image}
286 /usr/share/splash_images/*
287 %endif
288 %if 0%{?appfw_feature_amd_module_log}
289 %attr(0755,root,root) /opt/etc/dump.d/module.d/amd_log_dump.sh
290 %endif
291 %{_bindir}/amd
292 %{_libdir}/systemd/system/ac.service
293 %{_libdir}/systemd/system/multi-user.target.wants/ac.service
294 /usr/share/license/%{name}
295
296 %{_datadir}/dbus-1/system-services/org.tizen.aul.delegator.service
297 %{_libdir}/systemd/system/aul-delegator-server.service
298 %{_bindir}/aul-delegator-server
299
300 %files devel
301 %{_includedir}/aul/*.h
302 %{_includedir}/aul/launch/*.h
303 %{_includedir}/aul/launchpad/*.h
304 %{_libdir}/*.so
305 %{_libdir}/*.a
306 %{_libdir}/pkgconfig/*.pc