Systemd changes.

This commit is contained in:
Jon Ciesla 2013-05-10 08:03:35 -05:00
parent 3f153e743f
commit f1f8f1e32e

View File

@ -1,8 +1,8 @@
%define pkg_version 4.5 %define pkg_version 4.5
%define api_version 0.6.0 %define api_version 0.6.0
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)} %{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %define tcl_sitearch %{_prefix}/%{_lib}/tcl%{tcl_version}} %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
# with speech dispatcher iff on Fedora: # with speech dispatcher iff on Fedora:
%define with_speech_dispatcher 0%{?fedora} %define with_speech_dispatcher 0%{?fedora}
@ -13,16 +13,21 @@
Name: brltty Name: brltty
Version: %{pkg_version} Version: %{pkg_version}
Release: 3%{?dist} Release: 5%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://mielke.cc/brltty/ URL: http://mielke.cc/brltty/
Source: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
Source1: brltty.service
Patch4: brltty-loadLibrary.patch Patch4: brltty-loadLibrary.patch
Summary: Braille display driver for Linux/Unix Summary: Braille display driver for Linux/Unix
BuildRequires: byacc glibc-kernheaders bluez-libs-devel BuildRequires: byacc glibc-kernheaders bluez-libs-devel
BuildRequires: systemd
# work around a bug in the install process: # work around a bug in the install process:
Requires(post): coreutils Requires(post): coreutils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description %description
BRLTTY is a background process (daemon) which provides BRLTTY is a background process (daemon) which provides
@ -232,6 +237,8 @@ install -d -m 755 "${RPM_BUILD_ROOT}%{_sysconfdir}" "$RPM_BUILD_ROOT%{_mandir}/m
install -m 644 Documents/brltty.conf "${RPM_BUILD_ROOT}%{_sysconfdir}" install -m 644 Documents/brltty.conf "${RPM_BUILD_ROOT}%{_sysconfdir}"
echo ".so man1/brltty.1" > $RPM_BUILD_ROOT%{_mandir}/man5/brltty.conf.5 echo ".so man1/brltty.1" > $RPM_BUILD_ROOT%{_mandir}/man5/brltty.conf.5
install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/brltty.service
# clean up the manuals: # clean up the manuals:
rm Documents/Manual-*/*/{*.mk,*.made,Makefile*} rm Documents/Manual-*/*/{*.mk,*.made,Makefile*}
mv Documents/BrlAPIref/{html,BrlAPIref} mv Documents/BrlAPIref/{html,BrlAPIref}
@ -240,6 +247,7 @@ mv Documents/BrlAPIref/{html,BrlAPIref}
rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a
%post %post
%systemd_post brltty.service
devices="/dev/vcsa /dev/vcsa0 /dev/vcc/a" devices="/dev/vcsa /dev/vcsa0 /dev/vcc/a"
install=true install=true
for device in ${devices} for device in ${devices}
@ -260,12 +268,20 @@ then
fi fi
exit 0 exit 0
%preun
%systemd_preun brltty.service
%postun
%systemd_postun_with_restart brltty.service
%post -n brlapi -p /sbin/ldconfig %post -n brlapi -p /sbin/ldconfig
%postun -n brlapi -p /sbin/ldconfig %postun -n brlapi -p /sbin/ldconfig
%files %files
%config(noreplace) %{_sysconfdir}/brltty.conf %config(noreplace) %{_sysconfdir}/brltty.conf
%{_sysconfdir}/brltty/ %{_sysconfdir}/brltty/
%{_unitdir}/brltty.service
%{_bindir}/brltty %{_bindir}/brltty
%{_bindir}/brltty-* %{_bindir}/brltty-*
%{_libdir}/brltty/ %{_libdir}/brltty/
@ -334,6 +350,9 @@ exit 0
%endif %endif
%changelog %changelog
* Tue Apr 30 2013 Jon Ciesla <limburgher@gmail.com> - 4.5-5
- Add systemd unit file, BZ 916628.
* Tue Apr 30 2013 Jon Ciesla <limburgher@gmail.com> - 4.5-3 * Tue Apr 30 2013 Jon Ciesla <limburgher@gmail.com> - 4.5-3
- Add bluetooth support, BZ 916628. - Add bluetooth support, BZ 916628.