diff --git a/bluez-gstreamer.spec b/bluez-gstreamer.spec index 3afb904..0046de5 100644 --- a/bluez-gstreamer.spec +++ b/bluez-gstreamer.spec @@ -38,7 +38,7 @@ Version: 4.96 Release: 1 Summary: Bluetooth Sound Support Group: Productivity/Multimedia/Sound/Utilities -License: GPLv2+ +License: GPL-2.0+ Group: Productivity/Multimedia/Sound/Utilities AutoReqProv: on Source: http://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.bz2 diff --git a/bluez.changes b/bluez.changes index 085e8d4..a613532 100644 --- a/bluez.changes +++ b/bluez.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 16 03:22:40 UTC 2011 - crrodriguez@opensuse.org + +- Fix systemd units installation. + ------------------------------------------------------------------- Fri Sep 16 12:02:37 UTC 2011 - jengelh@medozas.de diff --git a/bluez.spec b/bluez.spec index 7ed7e19..211fc1f 100644 --- a/bluez.spec +++ b/bluez.spec @@ -25,8 +25,10 @@ BuildRequires: dbus-1-devel flex BuildRequires: libcap-ng-devel %define with_libcapng --enable-capng %endif -%if 0%{?suse_version} > 1130 -BuildRequires: pkgconfig(systemd) +%if 0%{?suse_version} > 1140 +BuildRequires: systemd +%{?systemd_requires} +%define has_systemd 1 %endif BuildRequires: glib2-devel >= 2.16 BuildRequires: libnl-1_1-devel libusb-devel @@ -38,7 +40,7 @@ Version: 4.96 Release: 1 Summary: Bluetooth Stack for Linux Group: Hardware/Mobile -License: GPLv2+ +License: GPL-2.0+ Group: Hardware/Mobile AutoReqProv: on Source: http://www.kernel.org/pub/linux/bluetooth/bluez-%{version}.tar.bz2 @@ -83,7 +85,7 @@ Authors: and others, see AUTHORS %package devel -License: GPLv2+ +License: GPL-2.0+ Summary: Files needed for BlueZ development Group: Development/Sources Requires: libbluetooth3 = %{version} @@ -100,7 +102,7 @@ Authors: and others, see AUTHORS %package -n libbluetooth3 -License: GPLv2+ +License: GPL-2.0+ Summary: Bluetooth Libraries Group: Hardware/Mobile Provides: bluez-libs = 3.36 @@ -118,7 +120,7 @@ Authors: %package cups Group: Hardware/Printing -License: GPLv2+ +License: GPL-2.0+ Summary: CUPS Driver for Bluetooth Printers Requires: libbluetooth3 = %{version} @@ -135,7 +137,7 @@ Authors: %package test Group: Development/Tools/Debuggers -License: GPLv2+ ; MIT License (or similar) +License: GPL-2.0+ ; MIT Summary: Tools for testing of various Bluetooth-functions Requires: libbluetooth3 = %{version} python-gobject2 dbus-1-python @@ -152,7 +154,7 @@ Authors: %package alsa Group: Productivity/Multimedia/Sound/Utilities -License: GPLv2+ +License: GPL-2.0+ Summary: Bluetooth Sound Support Requires: libbluetooth3 = %{version} Provides: bluez-audio:%_libdir/alsa-lib/libasound_module_pcm_bluetooth.so @@ -171,7 +173,7 @@ Authors: %package compat Group: Hardware/Mobile -License: GPLv2+ +License: GPL-2.0+ Summary: Bluetooth Stack for Linux Requires: libbluetooth3 = %{version} @@ -222,6 +224,9 @@ CFLAGS="$RPM_OPT_FLAGS -g" \ --enable-thermometer \ --enable-datafiles \ --enable-pcmcia \ + %if 0%{?has_systemd} + --with-systemdunitdir=%{_unitdir} \ + %endif %{?with_libcapng} make %{?_smp_mflags} all V=1 @@ -266,15 +271,29 @@ fi %clean rm -rf $RPM_BUILD_ROOT +%pre +%if 0%{?has_systemd} +%service_add_pre bluetooth.service +%endif + %post %{fillup_only -n bluetooth} %{insserv_force_if_yast bluez-coldplug} +%if 0%{?has_systemd} +%service_add_post bluetooth.service +%endif %preun %stop_on_removal bluez-coldplug +%if 0%{?has_systemd} +%service_del_preun bluetooth.service +%endif %postun %{insserv_cleanup} +%if 0%{?has_systemd} +%service_del_postun bluetooth.service +%endif %post -n libbluetooth3 -p /sbin/ldconfig @@ -323,8 +342,8 @@ rm -rf $RPM_BUILD_ROOT %dir /var/lib/bluetooth %dir %{_sysconfdir}/modprobe.d %config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf -%if 0%{suse_version} > 1130 -/lib/systemd/system/bluetooth.service +%if 0%{?has_systemd} +%{_unitdir}/bluetooth.service %endif %files devel