Use systemd rpm macros
Also drop the migration triggerun scriptlet.
This commit is contained in:
parent
c1c7b72202
commit
4a28461fe1
37
bluez.spec
37
bluez.spec
@ -35,11 +35,12 @@ BuildRequires: libusbx-devel
|
|||||||
BuildRequires: libtool autoconf automake
|
BuildRequires: libtool autoconf automake
|
||||||
|
|
||||||
Requires: bluez-libs = %{version}-%{release}
|
Requires: bluez-libs = %{version}-%{release}
|
||||||
Requires: systemd
|
|
||||||
Requires: dbus >= 0.60
|
Requires: dbus >= 0.60
|
||||||
Requires: hwdata >= 0.215
|
Requires: hwdata >= 0.215
|
||||||
Requires(preun): /bin/systemctl
|
|
||||||
Requires(post): /bin/systemctl
|
Requires(post): systemd
|
||||||
|
Requires(preun): systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
|
||||||
# Dropped in Fedora 20:
|
# Dropped in Fedora 20:
|
||||||
Obsoletes: bluez-alsa < 5.0
|
Obsoletes: bluez-alsa < 5.0
|
||||||
@ -135,8 +136,8 @@ git am -p1 %{patches} < /dev/null
|
|||||||
libtoolize -f -c
|
libtoolize -f -c
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
%configure --enable-cups --enable-tools --enable-library \
|
%configure --enable-cups --enable-tools --enable-library \
|
||||||
--with-systemdsystemunitdir=/lib/systemd/system \
|
--with-systemdsystemunitdir=%{_unitdir} \
|
||||||
--with-systemduserunitdir=/lib/systemd/user
|
--with-systemduserunitdir=%{_userunitdir}
|
||||||
make V=1
|
make V=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -160,27 +161,16 @@ mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/
|
|||||||
|
|
||||||
%post libs -p /sbin/ldconfig
|
%post libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%post
|
|
||||||
if [ $1 -eq 1 ]; then
|
|
||||||
/bin/systemctl enable bluetooth.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post
|
||||||
|
%systemd_post bluetooth.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ]; then
|
%systemd_preun bluetooth.service
|
||||||
/bin/systemctl --no-reload disable bluetooth.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop bluetooth.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%systemd_postun_with_restart bluetooth.service
|
||||||
if [ $1 -ge 1 ] ; then
|
|
||||||
/bin/systemctl try-restart bluetooth.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%triggerun -- bluez < 4.94-4
|
|
||||||
/bin/systemctl --no-reload enable bluetooth.service >/dev/null 2>&1 || :
|
|
||||||
|
|
||||||
%post hid2hci
|
%post hid2hci
|
||||||
/sbin/udevadm trigger --subsystem-match=usb
|
/sbin/udevadm trigger --subsystem-match=usb
|
||||||
@ -219,8 +209,8 @@ fi
|
|||||||
%{_localstatedir}/lib/bluetooth
|
%{_localstatedir}/lib/bluetooth
|
||||||
%{_datadir}/dbus-1/system-services/org.bluez.service
|
%{_datadir}/dbus-1/system-services/org.bluez.service
|
||||||
%{_datadir}/dbus-1/services/org.bluez.obex.service
|
%{_datadir}/dbus-1/services/org.bluez.obex.service
|
||||||
/lib/systemd/system/bluetooth.service
|
%{_unitdir}/bluetooth.service
|
||||||
/lib/systemd/user/obex.service
|
%{_userunitdir}/obex.service
|
||||||
|
|
||||||
%files libs
|
%files libs
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -248,6 +238,7 @@ fi
|
|||||||
* Sat Aug 10 2013 Kalev Lember <kalevlember@gmail.com> - 5.8-1
|
* Sat Aug 10 2013 Kalev Lember <kalevlember@gmail.com> - 5.8-1
|
||||||
- Update to 5.8
|
- Update to 5.8
|
||||||
- Hardened build
|
- Hardened build
|
||||||
|
- Use systemd rpm macros
|
||||||
|
|
||||||
* Sat Aug 10 2013 Kalev Lember <kalevlember@gmail.com> - 5.5-1
|
* Sat Aug 10 2013 Kalev Lember <kalevlember@gmail.com> - 5.5-1
|
||||||
- Update to 5.5, based on earlier work from
|
- Update to 5.5, based on earlier work from
|
||||||
|
Loading…
Reference in New Issue
Block a user