1 # By default we build with distro-default compilation flags which
2 # enables optimizations. If you want to build with full debugging
3 # ie. with optimization turned off and full debug info (-O0 -g3)
4 # pass '--with debug' to rpmbuild on the command line. Similary
5 # you can chose to compile with/without pulse, ecore, glib, qt,
6 # dbus, and telephony support. --without squashpkg will prevent
7 # squashing the -core and -plugins-base packages into the base
10 %{!?_with_debug:%{!?_without_debug:%define _without_debug 0}}
11 %{!?_with_lua:%{!?_without_lua:%define _with_lua 1}}
12 %{!?_with_pulse:%{!?_without_pulse:%define _with_pulse 1}}
13 %{!?_with_ecore:%{!?_without_ecore:%define _without_ecore 1}}
14 %{!?_with_glib:%{!?_without_glib:%define _with_glib 1}}
15 %{!?_with_qt:%{!?_without_qt:%define _without_qt 1}}
16 %{!?_with_dbus:%{!?_without_dbus:%define _with_dbus 1}}
17 %{!?_with_telephony:%{!?_without_telephony:%define _with_telephony 1}}
18 %{!?_with_audiosession:%{!?_without_audiosession:%define _with_audiosession 1}}
19 %{!?_with_squashpkg:%{!?_without_squashpkg:%define _with_squashpkg 1}}
21 Summary: Murphy policy framework
26 Group: System Environment/Daemons
27 URL: http://01.org/murphy/
28 Source0: %{name}-%{version}.tar.gz
30 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
31 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
32 Requires: %{name}-core = %{version}
37 BuildRequires: pkgconfig(lua)
39 %if %{?_with_pulse:1}%{!?_with_pulse:0}
40 BuildRequires: pkgconfig(libpulse)
42 %if %{?_with_ecore:1}%{!?_with_ecore:0}
43 BuildRequires: pkgconfig(ecore)
44 BuildRequires: mesa-libEGL
45 BuildRequires: mesa-libGLESv2
46 BuildRequires: mesa-libgbm
48 %if %{?_with_glib:1}%{!?_with_glib:0}
49 BuildRequires: pkgconfig(glib-2.0)
51 %if %{?_with_qt:1}%{!?_with_qt:0}
52 BuildRequires: pkgconfig(QtCore)
54 %if %{?_with_dbus:1}%{!?_with_dbus:0}
55 BuildRequires: pkgconfig(dbus-1)
57 %if %{?_with_telephony:1}%{!?_with_telephony:0}
58 BuildRequires: pkgconfig(ofono)
60 %if %{?_with_audiosession:1}%{!?_with_audiosession:0}
61 BuildRequires: pkgconfig(audio-session-mgr)
64 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
66 Summary: Murphy core runtime libraries
67 Group: System Environment/Libraries
70 Summary: The basic set of Murphy plugins.
71 Group: System Environment/Daemons
72 Requires: %{name} = %{version}
73 Requires: %{name}-core = %{version}
77 Summary: The header files and libraries needed for Murphy development
78 Group: Development/Libraries
79 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
80 Requires: %{name}-core = %{version}
82 Requires: %{name} = %{version}
86 Summary: Documentation for Murphy
89 %if %{?_with_pulse:1}%{!?_with_pulse:0}
91 Summary: Murphy PulseAudio mainloop integration.
92 Group: Development/Libraries
93 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
94 Requires: %{name}-core = %{version}
96 Requires: %{name} = %{version}
100 Summary: Murphy PulseAudio mainloop integration development files.
101 Group: Development/Libraries
102 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
103 Requires: %{name}-core = %{version}
105 Requires: %{name} = %{version}
109 %if %{?_with_ecore:1}%{!?_with_ecore:0}
111 Summary: Murphy EFL/ecore mainloop integration.
112 Group: Development/Libraries
113 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
114 Requires: %{name}-core = %{version}
116 Requires: %{name} = %{version}
120 Summary: Murphy EFL/ecore mainloop integration development files.
121 Group: Development/Libraries
122 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
123 Requires: %{name}-core = %{version}
125 Requires: %{name} = %{version}
129 %if %{?_with_glib:1}%{!?_with_glib:0}
131 Summary: Murphy glib mainloop integration.
132 Group: Development/Libraries
133 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
134 Requires: %{name}-core = %{version}
136 Requires: %{name} = %{version}
140 Summary: Murphy glib mainloop integration development files.
141 Group: Development/Libraries
142 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
143 Requires: %{name}-core = %{version}
145 Requires: %{name} = %{version}
149 %if %{?_with_qt:1}%{!?_with_qt:0}
151 Summary: Murphy Qt mainloop integration.
152 Group: Development/Libraries
153 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
154 Requires: %{name}-core = %{version}
156 Requires: %{name} = %{version}
160 Summary: Murphy Qt mainloop integration development files.
161 Group: Development/Libraries
162 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
163 Requires: %{name}-core = %{version}
165 Requires: %{name} = %{version}
170 Summary: Various test binaries for Murphy.
171 Group: Development/Debug
172 Requires: %{name} = %{version}
173 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
174 Requires: %{name}-core = %{version}
176 Requires: %{name} = %{version}
180 This package contains the basic daemon.
182 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
184 This package contains the core runtime libraries.
186 %description plugins-base
187 This package contains a basic set of plugins.
191 This package contains header files and libraries necessary for development.
194 This package contains documentation.
196 %if %{?_with_pulse:1}%{!?_with_pulse:0}
198 This package contains the Murphy PulseAudio mainloop integration runtime files.
200 %description pulse-devel
201 This package contains the Murphy PulseAudio mainloop integration development
205 %if %{?_with_ecore:1}%{!?_with_ecore:0}
207 This package contains the Murphy EFL/ecore mainloop integration runtime files.
209 %description ecore-devel
210 This package contains the Murphy EFL/ecore mainloop integration development
214 %if %{?_with_glib:1}%{!?_with_glib:0}
216 This package contains the Murphy glib mainloop integration runtime files.
218 %description glib-devel
219 This package contains the Murphy glib mainloop integration development
223 %if %{?_with_qt:1}%{!?_with_qt:0}
225 This package contains the Murphy Qt mainloop integration runtime files.
227 %description qt-devel
228 This package contains the Murphy Qt mainloop integration development
233 This package contains various test binaries for Murphy.
240 %if %{?_with_debug:1}%{!?_with_debug:0}
241 export CFLAGS="-O0 -g3"
246 DYNAMIC_PLUGINS="domain-control"
248 %if %{?_with_pulse:1}%{!?_with_pulse:0}
249 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-pulse"
251 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-pulse"
254 %if %{?_with_ecore:1}%{!?_with_ecore:0}
255 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-ecore"
257 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-ecore"
260 %if %{?_with_glib:1}%{!?_with_glib:0}
261 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-glib"
263 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-glib"
266 %if %{?_with_qt:1}%{!?_with_qt:0}
267 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-qt"
269 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-qt"
272 %if %{?_with_dbus:1}%{!?_with_dbus:0}
273 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-dbus"
275 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-dbus"
278 %if %{?_with_telephony:1}%{!?_with_telephony:0}
279 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-telephony"
281 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-telephony"
284 %if %{?_with_audiosession:1}%{!?_with_audiosession:0}
285 CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-resource-asm"
286 DYNAMIC_PLUGINS="$DYNAMIC_PLUGINS,resource-asm"
288 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-resource-asm"
291 NUM_CPUS="`cat /proc/cpuinfo | tr -s '\t' ' ' | \
292 grep '^processor *:' | wc -l`"
293 [ -z "$NUM_CPUS" ] && NUM_CPUS=1
296 %configure $CONFIG_OPTIONS --with-dynamic-plugins=$DYNAMIC_PLUGINS && \
298 make -j$(($NUM_CPUS + 1)) $V
301 rm -rf $RPM_BUILD_ROOT
304 # Make sure we have a plugin dir even if all the basic plugins
305 # are configured to be built in.
306 mkdir -p $RPM_BUILD_ROOT%{_libdir}/murphy/plugins
308 # Get rid of any *.la files installed by libtool.
309 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
311 # Clean up also the murphy DB installation.
312 rm -f $RPM_BUILD_ROOT%{_libdir}/murphy/*.la
314 # Generate list of linkedin plugins (depends on the configuration).
316 pushd $RPM_BUILD_ROOT >& /dev/null && \
317 find ./%{_libdir}/murphy/plugins -name libmurphy-plugin-*.so* | \
318 sed 's#^./*#/#g' > $outdir/filelist.plugins-base && \
321 # Generate list of header files, filtering ones that go to subpackages.
323 pushd $RPM_BUILD_ROOT >& /dev/null && \
324 find ./%{_includedir}/murphy | \
325 egrep -v '((pulse)|(ecore)|(glib)|(qt))-glue' | \
326 sed 's#^./*#/#g' > $outdir/filelist.devel-includes && \
329 # Replace the default sample/test config files with the packaging ones.
330 cp packaging.in/murphy-lua.conf $RPM_BUILD_ROOT%{_sysconfdir}/murphy/murphy.conf
331 cp packaging.in/murphy.lua $RPM_BUILD_ROOT%{_sysconfdir}/murphy/murphy.lua
333 # Copy plugin configuration files in place.
334 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/murphy/plugins/amb
335 cp packaging.in/amb-config.lua \
336 $RPM_BUILD_ROOT%{_sysconfdir}/murphy/plugins/amb/config.lua
338 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
339 cp packaging.in/murphyd.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/murphyd
340 chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/murphyd
342 %if %{?_with_dbus:1}%{!?_with_dbus:0}
343 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d
344 cp packaging.in/org.Murphy.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/org.Murphy.conf
348 rm -rf $RPM_BUILD_ROOT
351 ln -sf %{_sysconfdir}/rc.d/init.d/murphyd %{_sysconfdir}/rc.d/rc3.d/S21murphyd
353 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
359 if [ "$1" = "0" ]; then
360 rm -f %{_sysconfdir}/rc.d/rc3.d/S21murphyd
363 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
368 %if %{?_with_squashpkg:1}%{!?_with_squashpkg:0}
369 %files -f filelist.plugins-base
373 %defattr(-,root,root,-)
375 %{_sysconfdir}/murphy
376 %{_sysconfdir}/rc.d/init.d/murphyd
377 %if %{?_with_audiosession:1}%{!?_with_audiosession:0}
378 %{_sbindir}/asm-bridge
380 %if %{?_with_dbus:1}%{!?_with_dbus:0}
381 %{_sysconfdir}/dbus-1/system.d
382 %{_sysconfdir}/dbus-1/system.d/org.Murphy.conf
385 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
387 %defattr(-,root,root,-)
389 %{_libdir}/libmurphy-common.so.*
390 %{_libdir}/libmurphy-core.so.*
391 %{_libdir}/libmurphy-resolver.so.*
392 %{_libdir}/libmurphy-resource.so.*
393 %{_libdir}/libmurphy-resource-backend.so.*
394 %if %{?_with_lua:1}%{!?_with_lua:0}
395 %{_libdir}/libmurphy-lua-utils.so.*
396 %{_libdir}/libmurphy-lua-decision.so.*
398 %{_libdir}/libmurphy-domain-controller.so.*
399 %{_libdir}/murphy/*.so.*
400 %{_libdir}/libbreedline*.so.*
401 %if %{?_with_dbus:1}%{!?_with_dbus:0}
402 %{_libdir}/libmurphy-dbus.so.*
405 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
406 %files plugins-base -f filelist.plugins-base
407 %defattr(-,root,root,-)
409 %{_libdir}/murphy/plugins
411 %files devel -f filelist.devel-includes
412 %defattr(-,root,root,-)
413 # %{_includedir}/murphy/config.h
414 # %{_includedir}/murphy/common.h
415 # #%{_includedir}/murphy/core.h
416 # %{_includedir}/murphy/common
417 # %{_includedir}/murphy/core
418 # %{_includedir}/murphy/resolver
419 # %{_includedir}/murphy/resource
420 # # hmmm... should handle disabled plugins properly.
421 # %{_includedir}/murphy/domain-control
422 # %{_includedir}/murphy/plugins
423 %{_includedir}/murphy-db
424 %{_libdir}/libmurphy-common.so
425 %{_libdir}/libmurphy-core.so
426 %{_libdir}/libmurphy-resolver.so
427 %{_libdir}/libmurphy-resource.so
428 %{_libdir}/libmurphy-resource-backend.so
429 %if %{?_with_lua:1}%{!?_with_lua:0}
430 %{_libdir}/libmurphy-lua-utils.so
431 %{_libdir}/libmurphy-lua-decision.so
433 %{_libdir}/libmurphy-domain-controller.so
434 %{_libdir}/murphy/*.so
435 %{_libdir}/pkgconfig/murphy-common.pc
436 %{_libdir}/pkgconfig/murphy-core.pc
437 %{_libdir}/pkgconfig/murphy-resolver.pc
438 #%{_libdir}/pkgconfig/murphy-resource.pc
439 %if %{?_with_lua:1}%{!?_with_lua:0}
440 %{_libdir}/pkgconfig/murphy-lua-utils.pc
441 %{_libdir}/pkgconfig/murphy-lua-decision.pc
443 %{_libdir}/pkgconfig/murphy-domain-controller.pc
444 %{_libdir}/pkgconfig/murphy-db.pc
445 %{_includedir}/breedline
446 %{_libdir}/libbreedline*.so
447 %{_libdir}/pkgconfig/breedline*.pc
448 %if %{?_with_dbus:1}%{!?_with_dbus:0}
449 #%{_includedir}/murphy/dbus
450 %{_libdir}/libmurphy-dbus.so
451 %{_libdir}/pkgconfig/murphy-dbus.pc
455 %defattr(-,root,root,-)
456 %doc %{_docdir}/%{name}/*
458 %if %{?_with_pulse:1}%{!?_with_pulse:0}
460 %defattr(-,root,root,-)
461 %{_libdir}/libmurphy-pulse.so.*
464 %defattr(-,root,root,-)
465 %{_includedir}/murphy/common/pulse-glue.h
466 %{_libdir}/libmurphy-pulse.so
467 %{_libdir}/pkgconfig/murphy-pulse.pc
470 %if %{?_with_ecore:1}%{!?_with_ecore:0}
472 %defattr(-,root,root,-)
473 %{_libdir}/libmurphy-ecore.so.*
476 %defattr(-,root,root,-)
477 %{_includedir}/murphy/common/ecore-glue.h
478 %{_libdir}/libmurphy-ecore.so
479 %{_libdir}/pkgconfig/murphy-ecore.pc
482 %if %{?_with_glib:1}%{!?_with_glib:0}
484 %defattr(-,root,root,-)
485 %{_libdir}/libmurphy-glib.so.*
488 %defattr(-,root,root,-)
489 %{_includedir}/murphy/common/glib-glue.h
490 %{_libdir}/libmurphy-glib.so
491 %{_libdir}/pkgconfig/murphy-glib.pc
494 %if %{?_with_qt:1}%{!?_with_qt:0}
496 %defattr(-,root,root,-)
497 %{_libdir}/libmurphy-qt.so.*
500 %defattr(-,root,root,-)
501 %{_includedir}/murphy/common/qt-glue.h
502 %{_libdir}/libmurphy-qt.so
503 %{_libdir}/pkgconfig/murphy-qt.pc
507 %defattr(-,root,root,-)
508 %{_bindir}/resource-client
509 %{_bindir}/resource-api-test
510 %{_bindir}/test-domain-controller
511 %{_bindir}/murphy-console
514 * Tue Nov 27 2012 Krisztian Litkey <krisztian.litkey@intel.com> -
515 - Initial build for 2.0alpha.