]> git.pld-linux.org Git - packages/dbus.git/blobdiff - dbus.spec
- rel 5
[packages/dbus.git] / dbus.spec
index f0ef72aba53a2ca0cdcfd0c693d16c74c263d033..b2d389603291f414e3735a272780258999034880 100644 (file)
--- a/dbus.spec
+++ b/dbus.spec
@@ -8,7 +8,7 @@ Summary:        D-BUS message bus
 Summary(pl.UTF-8):     Magistrala przesyłania komunikatów D-BUS
 Name:          dbus
 Version:       1.4.16
-Release:       2
+Release:       5
 License:       AFL v2.1 or GPL v2
 Group:         Libraries
 Source0:       http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
@@ -18,6 +18,7 @@ Source2:      %{name}-daemon-1-profile.d-sh
 Source3:       %{name}-sysconfig
 Source4:       %{name}-xinitrc.sh
 Source5:       messagebus.upstart
+Source6:       %{name}.tmpfiles
 Patch0:                %{name}-nolibs.patch
 Patch1:                %{name}-config.patch
 Patch2:                %{name}-no_fatal_checks.patch
@@ -33,7 +34,7 @@ BuildRequires:        libcap-ng-devel
 BuildRequires: libtool >= 2:2.0
 BuildRequires: libxslt-progs
 BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.561
+BuildRequires: rpmbuild(macros) >= 1.626
 BuildRequires: sed >= 4.0
 BuildRequires: xmlto
 %{?with_X11:BuildRequires:     xorg-lib-libX11-devel}
@@ -49,6 +50,7 @@ Requires:     %{name}-dirs = %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      expat >= %{expat_version}
 Requires:      rc-scripts >= 0.4.3.0
+Requires:      systemd-units >= 37-0.10
 Provides:      group(messagebus)
 Provides:      user(messagebus)
 Obsoletes:     dbus-glib-tools
@@ -67,14 +69,6 @@ D-BUS to system przesyłania komunikatów pomiędzy aplikacjami. Jest
 używany zarówno jako ogólnosystemowa usługa magistrali komunikatów jak
 i możliwość przesyłania komunikatów w ramach jednej sesji użytkownika.
 
-%package systemd
-Summary:       systemd units for system message bus
-Group:         Daemons
-Requires:      %{name} = %{version}-%{release}
-
-%description systemd
-systemd units for system message bus.
-
 %package upstart
 Summary:       Upstart job description for system message bus
 Summary(pl.UTF-8):     Opis zadania Upstart dla magistrali systemowej DBus
@@ -173,7 +167,7 @@ D-BUS wraz z sesją X11 użytkownika.
        --with-session-socket-dir=/tmp \
        --with-system-pid-file=%{_localstatedir}/run/dbus.pid \
        --with-xml=expat \
-       --with-systemdsystemunitdir=/lib/systemd/system \
+       --with-systemdsystemunitdir=%{systemdunitdir} \
        %{!?with_X11:--without-x}
 %{__make}
 
@@ -182,7 +176,8 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{init,profile.d,rc.d/init.d,sysconfig,X11/xinit/xinitrc.d} \
        $RPM_BUILD_ROOT%{_datadir}/dbus-1/{services,interfaces} \
        $RPM_BUILD_ROOT%{_localstatedir}/run/dbus \
-       $RPM_BUILD_ROOT/%{_lib}
+       $RPM_BUILD_ROOT/%{_lib} \
+       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -193,14 +188,16 @@ cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus
 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d
 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/init/messagebus.conf
 
+install %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+
 # upstart (/sbin/init) requires libdbus so it must be in /lib(64)
 mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib}
 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \
        $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so
 
-ln -s dbus.service $RPM_BUILD_ROOT/lib/systemd/system/messagebus.service
+ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service
 
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/dbus/api
+%{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/dbus/api
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -212,6 +209,8 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add messagebus
 %service messagebus restart "D-Bus daemon"
+export NORESTART="yes"
+%systemd_post messagebus.service
 
 %preun
 if [ "$1" = "0" ];then
@@ -224,6 +223,17 @@ if [ "$1" = "0" ]; then
        %userremove messagebus
        %groupremove messagebus
 fi
+%systemd_reload
+
+%triggerpostun -- dbus < 1.4.16-5
+%systemd_trigger messagebus.service
+if [ -f /etc/sysconfig/dbus ]; then
+       mv -f /etc/sysconfig/messagebus{,.rpmnew}
+       mv -f /etc/sysconfig/{dbus,messagebus}
+elif [ -f /etc/sysconfig/dbus.rpmsave ]; then
+       mv -f /etc/sysconfig/messagebus{,.rpmnew}
+       mv -f /etc/sysconfig/{dbus.rpmsave,messagebus}
+fi
 
 %if 0
 %post upstart
@@ -236,20 +246,6 @@ fi
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
-%triggerpostun -- %{name} < 0.92
-%banner %{name} << EOF
-WARNING!!!
-configuration file /etc/sysconfig/dbus has been moved to /etc/sysconfig/messagebus!
-EOF
-
-if [ -f /etc/sysconfig/dbus ]; then
-       mv -f /etc/sysconfig/messagebus{,.rpmnew}
-       mv -f /etc/sysconfig/{dbus,messagebus}
-elif [ -f /etc/sysconfig/dbus.rpmsave ]; then
-       mv -f /etc/sysconfig/messagebus{,.rpmnew}
-       mv -f /etc/sysconfig/{dbus.rpmsave,messagebus}
-fi
-
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/dbus-cleanup-sockets
@@ -266,6 +262,7 @@ fi
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus
 %attr(754,root,root) /etc/rc.d/init.d/*
 %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh
+/usr/lib/tmpfiles.d/%{name}.conf
 %dir %{_localstatedir}/run/dbus
 %dir /var/lib/dbus
 %{_mandir}/man1/dbus-cleanup-sockets.1*
@@ -274,14 +271,12 @@ fi
 %{_mandir}/man1/dbus-monitor.1*
 %{_mandir}/man1/dbus-send.1*
 
-%files systemd
-%defattr(644,root,root,755)
-/lib/systemd/system/dbus.service
-/lib/systemd/system/dbus.socket
-/lib/systemd/system/dbus.target.wants/dbus.socket
-/lib/systemd/system/messagebus.service
-/lib/systemd/system/multi-user.target.wants/dbus.service
-/lib/systemd/system/sockets.target.wants/dbus.socket
+%{systemdunitdir}/dbus.service
+%{systemdunitdir}/dbus.socket
+%{systemdunitdir}/dbus.target.wants/dbus.socket
+%{systemdunitdir}/messagebus.service
+%{systemdunitdir}/multi-user.target.wants/dbus.service
+%{systemdunitdir}/sockets.target.wants/dbus.socket
 
 %if "%{pld_release}" != "ti"
 %files upstart
This page took 0.027616 seconds and 4 git commands to generate.