%bcond_without websockets
%bcond_without smack
%bcond_without sysmon
-%bcond_without squashpkg
# These are off by default, unless explicitly enabled.
#
# ie. with optimization turned off and full debug info (-O0 -g3)
# pass '--with debug' to rpmbuild on the command line. Similary
# you can chose to compile with/without pulse, ecore, glib, qt,
-# dbus, and telephony support. --without squashpkg will prevent
+# dbus, and telephony support. --with subpkgs will prevent
# squashing the -core and -plugins-base packages into the base
# murphy package.
#
# in Tizen any more. qt5 is the corrsponding macro for controlling
# Qt5 support.
#
+%bcond_with subpkgs
%bcond_with icosyscon
%bcond_with qt
%bcond_with debug
+
Summary: Resource policy framework
Name: murphy
Version: 0.0.67
Source0: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%endif
%description
This package contains the basic Murphy daemon.
-%if %{with squashpkg}
+%if %{with subpkgs}
%package core
Summary: Murphy core runtime libraries
Group: System/Libraries
%package devel
Summary: The header files and libraries needed for Murphy development
Group: System/Libraries
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
%package pulse
Summary: Murphy PulseAudio mainloop integration
Group: System/Libraries
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
Summary: Murphy PulseAudio mainloop integration development files
Group: System/Libraries
Requires: %{name}-pulse = %{version}
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
%package ecore
Summary: Murphy EFL/ecore mainloop integration
Group: System/Libraries
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
Summary: Murphy EFL/ecore mainloop integration development files
Group: System/Libraries
Requires: %{name}-ecore = %{version}
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
%package glib
Summary: Murphy glib mainloop integration
Group: System/Libraries
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
Summary: Murphy glib mainloop integration development files
Group: System/Libraries
Requires: %{name}-glib = %{version}
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
%package qt
Summary: Murphy Qt mainloop integration
Group: System/Libraries
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
Summary: Murphy Qt mainloop integration development files
Group: System/Libraries
Requires: %{name}-qt = %{version}
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
Summary: Various test binaries for Murphy
Group: System/Testing
Requires: %{name} = %{version}
-%if %{with squashpkg}
+%if %{with subpkgs}
Requires: %{name}-core = %{version}
%else
Requires: %{name} = %{version}
# Generate list of linkedin plugins (depends on the configuration).
outdir="`pwd`"
-cd %{buildroot}
+pushd %{buildroot}
find ./%{_libdir} -name libmurphy-plugin-*.so* | \
sed 's#^./*#/#g' > $outdir/filelist.plugins-base
-cd $(outdir)
+popd
echo "Found the following linked-in plugin files:"
cat $outdir/filelist.plugins-base | sed 's/^/ /g'
# Generate list of header files, filtering ones that go to subpackages.
outdir="`pwd`"
-cd %{buildroot}
+pushd %{buildroot}
find ./%{_includedir}/murphy | \
grep -E -v '((pulse)|(ecore)|(glib)|(qt))-glue' | \
sed 's#^./*#/#g' > $outdir/filelist.devel-includes
-cd $(outdir)
+popd
# Replace the default sample/test config files with the packaging ones.
rm -f %{buildroot}%{_sysconfdir}/murphy/*
fi
ldconfig
-%if %{with squashpkg}
+%if %{with subpkgs}
%post core
ldconfig
%postun gam
ldconfig
-%if %{with squashpkg}
-%files -f filelist.plugins-base
-%else
+%if %{with subpkgs}
%files
+%else
+%files -f filelist.plugins-base
%endif
%defattr(-,root,root,-)
%manifest murphy.manifest
%{_datadir}/murphy
%endif
-%if %{with squashpkg}
+%if %{with subpkgs}
%files core
%defattr(-,root,root,-)
%endif
%{_libdir}/libmurphy-libdbus.so.*
%{_libdir}/libmurphy-dbus-libdbus.so.*
%endif
+%if %{with sysmon}
+%{_libdir}/libmurphy-libdbus.so.*
+%endif
-%if %{with squashpkg}
+%if %{with subpkgs}
%files plugins-base -f filelist.plugins-base
%defattr(-,root,root,-)
%endif