Accepting request 689752 from home:jengelh:branches:hardware

- Drop pre-openSUSE 13.1 support.

- Reduce scriptlet's hard dependency on systemd.
- Combine %service_* calls to reduce generated boilerplate.
- Request cflags from speech-dispatcher.pc.
- Use a better Summary field.

OBS-URL: https://build.opensuse.org/request/show/689752
OBS-URL: https://build.opensuse.org/package/show/hardware/sbl?expand=0&rev=31
This commit is contained in:
Tomáš Chvátal 2019-03-29 09:23:02 +00:00 committed by Git OBS Bridge
parent 47dea93159
commit f60833c26d
2 changed files with 27 additions and 43 deletions

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Mar 29 09:07:59 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Drop pre-openSUSE 13.1 support.
-------------------------------------------------------------------
Wed Mar 27 17:35:19 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Reduce scriptlet's hard dependency on systemd.
- Combine %service_* calls to reduce generated boilerplate.
- Request cflags from speech-dispatcher.pc.
- Use a better Summary field.
-------------------------------------------------------------------
Sat Dec 2 10:41:38 UTC 2017 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package sbl
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,15 +12,15 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: sbl
Version: 3.5.0.20130317.git7a75bc29
Release: 0
Summary: SUSE blinux
License: GPL-2.0+
Summary: Screen reader for the Linux console
License: GPL-2.0-or-later
Group: Hardware/Other
Source: sbl-%{version}.tar.bz2
Source1: sbl.service
@ -37,26 +37,18 @@ BuildRequires: gcc-c++
BuildRequires: libusb-devel
BuildRequires: orca
BuildRequires: python3-base
BuildRequires: speechd-devel
BuildRequires: pkgconfig(speech-dispatcher)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1310
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%else
Requires(post): %insserv_prereq
Requires(postun): %insserv_prereq
%endif
%{?systemd_ordering}
%description
SUSE blinux is a screen reader for the Linux console. It supports
braille displays.
%package orca
%if 0%{?suse_version} <= 1110
%define python_sitearch %{py_sitedir}
%endif
Summary: brld-orca brlapi
License: GPL-2.0 and GPL-2.0+
License: GPL-2.0-only AND GPL-2.0-or-later
Group: Productivity/Multimedia/Sound/Utilities
Requires: orca
@ -76,11 +68,11 @@ this python module enables orca to use brld for braille output
%patch7 -p1
%build
make %{?_smp_mflags} CFLAGS="%{optflags} -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE" LIB_CFLAGS="%{optflags} -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -fPIC -I%{_includedir}/speech-dispatcher"
make %{?_smp_mflags} CFLAGS="%{optflags} -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE" \
LIB_CFLAGS="%{optflags} -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -fPIC $(pkg-config speech-dispatcher --cflags)"
%install
make LIBINSTPATH=%{_libdir} DESTDIR=%{buildroot} install
%if 0%{?suse_version} > 1310
%make_install LIBINSTPATH=%{_libdir}
rm -f %{buildroot}%{_initddir}/sbl
rm -f %{buildroot}%{_initddir}/brld
install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/sbl.service
@ -89,36 +81,20 @@ rm -f %{buildroot}%{_sbindir}/rcsbl
rm -f %{buildroot}%{_sbindir}/rcbrld
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcsbl
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcbrld
%endif
%if 0%{?suse_version} > 1310
%pre
%service_add_pre sbl.service
%service_add_pre brld.service
%service_add_pre sbl.service brld.service
%preun
%service_del_preun brld.service
%service_del_preun sbl.service
%endif
%service_del_preun brld.service sbl.service
%post
/sbin/ldconfig
%if 0%{?suse_version} > 1310
%service_add_post sbl.service
%service_add_post brld.service
%else
%{insserv_force_if_yast etc/init.d/sbl }
%{insserv_force_if_yast etc/init.d/brld }
%endif
%service_add_post sbl.service brld.service
%postun
/sbin/ldconfig
%if 0%{?suse_version} > 1310
%service_del_postun brld.service
%service_del_postun sbl.service
%else
%insserv_cleanup
%endif
%service_del_postun brld.service sbl.service
%files
%defattr (-,root,root,755)
@ -137,13 +113,8 @@ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcbrld
%{_sbindir}/brld
%{_sbindir}/rcbrld
%{_libdir}/libbrld.so*
%if 0%{?suse_version} > 1310
%{_unitdir}/sbl.service
%{_unitdir}/brld.service
%else
%{_initddir}/sbl
%{_initddir}/brld
%endif
%{_mandir}/man8/brld.8.gz
%{_mandir}/man8/sbl.8.gz