d79aca934f
- changes license to GPL2+ or AFL 2.1 OBS-URL: https://build.opensuse.org/package/show/Base:System/dbus-1?expand=0&rev=43
248 lines
8.0 KiB
RPMSpec
248 lines
8.0 KiB
RPMSpec
#
|
|
# spec file for package dbus-1
|
|
#
|
|
# Copyright (c) 2011 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: dbus-1
|
|
Url: http://dbus.freedesktop.org/
|
|
License: GPL2+ or AFL 2.1
|
|
Group: System/Daemons
|
|
Summary: D-Bus Message Bus System
|
|
# COMMON1-BEGIN
|
|
BuildRequires: doxygen libexpat-devel libzio pkgconfig
|
|
BuildRequires: audit-devel
|
|
Version: 1.5.0
|
|
Release: 1
|
|
AutoReqProv: on
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: dbus-1-64bit
|
|
%endif
|
|
#
|
|
Source0: dbus-%{version}.tar.bz2
|
|
Source1: rc.boot.dbus
|
|
Source2: dbus-1.desktop
|
|
Source3: dbus_at_console.ck
|
|
Source4: baselibs.conf
|
|
Patch0: dbus-log-deny.patch
|
|
%if 0%{?suse_version} > 1100
|
|
%bcond_without selinux
|
|
%else
|
|
%bcond_with selinux
|
|
%endif
|
|
%if %{with selinux}
|
|
BuildRequires: libselinux-devel
|
|
%endif
|
|
BuildRequires: libcap-ng-devel
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
# COMMON1-END
|
|
PreReq: permissions /usr/sbin/groupadd /usr/sbin/useradd /sbin/insserv /etc/init.d/boot.localfs
|
|
|
|
%package -n dbus-1-devel
|
|
License: Other uncritical OpenSource License
|
|
Summary: Developer package for D-Bus
|
|
Requires: %{name} = %{version} glibc-devel
|
|
AutoReqProv: on
|
|
Group: Development/Libraries/Other
|
|
|
|
%package -n dbus-1-devel-doc
|
|
License: Other uncritical OpenSource License
|
|
Summary: Developer documentation package for D-Bus
|
|
Requires: %{name} = %{version}
|
|
Group: Development/Libraries/Other
|
|
AutoReqProv: on
|
|
%if 0%{?suse_version} >= 1120
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description
|
|
D-Bus is a message bus system, a simple way for applications to talk to
|
|
one another. D-Bus supplies both a system daemon and a
|
|
per-user-login-session daemon. Also, the message bus is built on top of
|
|
a general one-to-one message passing framework, which can be used by
|
|
any two apps to communicate directly (without going through the message
|
|
bus daemon).
|
|
|
|
%description -n dbus-1-devel
|
|
D-Bus is a message bus system, a simple way for applications to talk to
|
|
one another. D-Bus supplies both a system daemon and a
|
|
per-user-login-session daemon. Also, the message bus is built on top of
|
|
a general one-to-one message passing framework, which can be used by
|
|
any two apps to communicate directly (without going through the message
|
|
bus daemon).
|
|
|
|
%description -n dbus-1-devel-doc
|
|
D-Bus is a message bus system, a simple way for applications to talk to
|
|
one another. D-BUS supplies both a system daemon and a
|
|
per-user-login-session daemon. Also, the message bus is built on top of
|
|
a general one-to-one message passing framework, which can be used by
|
|
any two apps to communicate directly (without going through the message
|
|
bus daemon).
|
|
|
|
%prep
|
|
# COMMON2-BEGIN
|
|
%setup -n dbus-%{version} -q
|
|
%patch0 -p1
|
|
|
|
%build
|
|
autoreconf -fi
|
|
export CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing -fPIC"
|
|
export CXXFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
|
|
%if 0%{?suse_version} > 1000
|
|
export CFLAGS="$CFLAGS -fstack-protector"
|
|
export CXXFLAGS="$CXXFLAGS -fstack-protector"
|
|
export V=1
|
|
%endif
|
|
%configure \
|
|
--disable-static \
|
|
--with-pic \
|
|
--bindir=/bin \
|
|
--libexecdir=/lib/%{name} \
|
|
--libdir=/%{_lib} \
|
|
--with-init-scripts=suse \
|
|
--enable-inotify \
|
|
--enable-doxygen-docs \
|
|
%if %{with selinux}
|
|
--enable-selinux \
|
|
%endif
|
|
--enable-libaudit \
|
|
--with-console-auth-dir=/var/run/dbus/at_console/ \
|
|
--with-systemdsystemunitdir=/lib/systemd/system
|
|
make %{?_smp_mflags}
|
|
doxygen -u && doxygen
|
|
./cleanup-man-pages.sh
|
|
|
|
%install
|
|
# COMMON2-END
|
|
make DESTDIR=%{buildroot} install
|
|
mkdir -p %{buildroot}/etc/init.d
|
|
mkdir -p %{buildroot}/usr/sbin
|
|
install -m 755 %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/dbus
|
|
ln -sf %{_sysconfdir}/init.d/dbus %{buildroot}/%{_sbindir}/rcdbus
|
|
install -d %{buildroot}/%{_localstatedir}/run/dbus
|
|
mkdir -p %{buildroot}/%{_datadir}/susehelp/meta/Development/Libraries/
|
|
install -m 0644 %SOURCE2 \
|
|
%{buildroot}/%{_datadir}/susehelp/meta/Development/Libraries/dbus-1.desktop
|
|
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
|
|
mkdir -p %{buildroot}/%{_datadir}/dbus-1/system-services
|
|
mkdir -p %{buildroot}/%{_datadir}/dbus-1/interfaces
|
|
mkdir -p %{buildroot}/%{_libdir}/dbus-1.0/include/
|
|
mv -f %{buildroot}/%{_lib}/dbus-1.0/include/* %{buildroot}/%{_libdir}/dbus-1.0/include/
|
|
rm -f %{buildroot}/%{_lib}/*.la
|
|
# devel stuff must not be in /lib
|
|
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/lib%{name}.so) %{buildroot}%{_libdir}/lib%{name}.so
|
|
%{__rm} -v %{buildroot}/%{_lib}/lib%{name}.so
|
|
# fix up pkgconfig file
|
|
sed -e 's@^\(libdir=\).*@\1%{_libdir}@' %{buildroot}/%{_lib}/pkgconfig/dbus-1.pc > %{buildroot}/%{_libdir}/pkgconfig/dbus-1.pc
|
|
rm -f %{buildroot}/%{_lib}/pkgconfig/dbus-1.pc
|
|
#
|
|
rm -f %{buildroot}/bin/dbus-launch
|
|
rm -f %{buildroot}/%{_mandir}/man1/dbus-launch.1*
|
|
chmod a-x AUTHORS COPYING HACKING NEWS README doc/*.txt doc/file-boilerplate.c doc/TODO
|
|
#
|
|
install -d %{buildroot}%{_sysconfdir}/ConsoleKit/run-session.d
|
|
install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/ConsoleKit/run-session.d
|
|
mkdir -p %{buildroot}%{_localstatedir}/lib/dbus
|
|
touch %{buildroot}/%{_localstatedir}/lib/dbus/machine-id
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%pre
|
|
/usr/sbin/groupadd -r messagebus 2> /dev/null || :
|
|
/usr/sbin/useradd -r -o -s /bin/false -c "User for D-Bus" -d /var/run/dbus -g messagebus messagebus 2> /dev/null || :
|
|
%if 0%{?suse_version:1}
|
|
|
|
%preun
|
|
%{stop_on_removal dbus}
|
|
|
|
%post
|
|
/bin/dbus-uuidgen --ensure
|
|
%{insserv_force_if_yast dbus}
|
|
/sbin/ldconfig
|
|
%{run_permissions}
|
|
%verifyscript
|
|
%verify_permissions -e /lib/dbus-1/dbus-daemon-launch-helper
|
|
|
|
%postun
|
|
%{insserv_cleanup}
|
|
/sbin/ldconfig
|
|
%endif
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%dir %{_datadir}/dbus-1
|
|
%dir %{_datadir}/dbus-1/services
|
|
%dir %{_datadir}/dbus-1/system-services
|
|
%dir %{_datadir}/dbus-1/interfaces
|
|
%dir %{_localstatedir}/lib/dbus
|
|
%dir /lib/dbus-1
|
|
%doc AUTHORS COPYING HACKING NEWS README
|
|
%dir %{_sysconfdir}/dbus-1
|
|
%dir %{_sysconfdir}/dbus-1/session.d
|
|
%dir %{_sysconfdir}/dbus-1/system.d
|
|
%config(noreplace) %{_sysconfdir}/dbus-1/session.conf
|
|
%config(noreplace) %{_sysconfdir}/dbus-1/system.conf
|
|
%{_sysconfdir}/init.d/dbus
|
|
%{_sysconfdir}/ConsoleKit
|
|
/bin/dbus-cleanup-sockets
|
|
/bin/dbus-daemon
|
|
/bin/dbus-monitor
|
|
/bin/dbus-send
|
|
/bin/dbus-uuidgen
|
|
/%{_lib}/libdbus-1.so.*
|
|
%{_mandir}/man1/dbus-cleanup-sockets.1.*
|
|
%{_mandir}/man1/dbus-daemon.1.*
|
|
%{_mandir}/man1/dbus-monitor.1.*
|
|
%{_mandir}/man1/dbus-send.1.*
|
|
%{_mandir}/man1/dbus-uuidgen.1.*
|
|
%{_sbindir}/rcdbus
|
|
# See doc/system-activation.txt in source tarball for the rationale
|
|
# behind these permissions
|
|
%attr(4750,root,messagebus) %verify(not mode) /lib/%{name}/dbus-daemon-launch-helper
|
|
%ghost %{_localstatedir}/run/dbus
|
|
%ghost %{_localstatedir}/lib/dbus/machine-id
|
|
%dir /lib/systemd
|
|
%dir /lib/systemd/system
|
|
/lib/systemd/system/dbus.service
|
|
/lib/systemd/system/dbus.socket
|
|
%dir /lib/systemd/system/dbus.target.wants
|
|
/lib/systemd/system/dbus.target.wants/dbus.socket
|
|
%dir /lib/systemd/system/multi-user.target.wants
|
|
/lib/systemd/system/multi-user.target.wants/dbus.service
|
|
%dir /lib/systemd/system/sockets.target.wants
|
|
/lib/systemd/system/sockets.target.wants/dbus.socket
|
|
|
|
%files -n dbus-1-devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/*
|
|
%{_libdir}/libdbus-1.so
|
|
%dir %{_libdir}/dbus-1.0
|
|
%{_libdir}/dbus-1.0/include
|
|
%{_libdir}/pkgconfig/dbus-1.pc
|
|
|
|
%files -n dbus-1-devel-doc
|
|
%defattr(-,root,root)
|
|
/usr/share/doc/dbus/api
|
|
%doc doc/api/html
|
|
%doc doc/*.txt doc/file-boilerplate.c doc/TODO
|
|
%{_datadir}/susehelp
|
|
|
|
|
|
%changelog
|