File yast2-dbus-server.spec of Package yast2-dbus-server
#
# spec file for package yast2-dbus-server
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: yast2-dbus-server
Version: 3.0.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-dbus-server-%{version}.tar.bz2
Url: http://en.opensuse.org/Portal:YaST
# obviously
BuildRequires: gcc-c++
BuildRequires: libtool
# needed for all yast packages
BuildRequires: yast2-core-devel
BuildRequires: yast2-devtools
# testsuite
BuildRequires: dejagnu
# autodocs
BuildRequires: doxygen
# docbook docs
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
# catalog: convert URIs to local filenames
BuildRequires: sgml-skel
# for SCR DBus service
BuildRequires: dbus-1-devel
BuildRequires: dbus-1-x11
BuildRequires: polkit-devel
# its tests
BuildRequires: dbus-1-python
BuildRequires: python-devel
# its tests
BuildRequires: dbus-1-python
BuildRequires: python-devel
# to run the tests
BuildRequires: yast2-ruby-bindings >= 1.0.0
Summary: YaST2 - DBus Server
License: GPL-2.0+
Group: System/YaST
%description
This package contains YaST DBus service, it provides DBus access
to YaST components.
%prep
%setup -n yast2-dbus-server-%{version}
%build
%{_prefix}/bin/y2tool y2autoconf
%{_prefix}/bin/y2tool y2automake
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
./configure --libdir=%{_libdir} --prefix=%{_prefix} --mandir=%{_mandir}
# V=1: verbose build in case we used AM_SILENT_RULES(yes)
# so that RPM_OPT_FLAGS check works
make %{?jobs:-j%jobs} V=1
%install
make install DESTDIR="$RPM_BUILD_ROOT"
[ -e "%{_prefix}/share/YaST2/data/devtools/NO_MAKE_CHECK" ] || Y2DIR="$RPM_BUILD_ROOT/usr/share/YaST2" make check DESTDIR="$RPM_BUILD_ROOT"
for f in `find $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/ -name "*.desktop"` ; do
d=${f##*/}
%suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop}
done
# remove not needed development files
rm %{buildroot}/%{_libdir}/YaST2/plugin/liby2dbus.la
rm %{buildroot}/%{_libdir}/YaST2/plugin/liby2dbus.so
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
/sbin/ldconfig
# This is a workaround for dbus reloading too soon. (bnc#502719#c4).
# In oS 11.2 there exists rcdbus reload, so this is for a SLE backport.
# The /dev/null is a workaround for http://bugs.freedesktop.org/show_bug.cgi?id=896#c23
# But if there is nothing to reload, don't fail.
dbus-send --print-reply --system --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null || true
%postun
/sbin/ldconfig
dbus-send --print-reply --system --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null || true
%files
%defattr(-,root,root)
%{_libdir}/YaST2/plugin/lib*.so.*
# DBus service
%{_prefix}/lib/YaST2/bin/SCR_dbus_server
# DBus service config
/usr/share/dbus-1/system-services/org.opensuse.yast.SCR.service
%config /etc/dbus-1/system.d/org.opensuse.yast.SCR.conf
# PolicyKit default policies
/usr/share/polkit-1/actions/org.opensuse.yast.scr.policy
# DBus namespace service
%{_prefix}/lib/YaST2/bin/yast_modules_dbus_server
/usr/share/dbus-1/system-services/org.opensuse.YaST.modules.service
%config /etc/dbus-1/system.d/org.opensuse.YaST.modules.conf
/usr/share/polkit-1/actions/org.opensuse.yast.module-manager.policy
%doc %{_prefix}/share/doc/packages/yast2-dbus-server
%changelog