sbl/sbl.spec
Stefan Seyfried c7f79869c0 Accepting request 307373 from home:lmuelle:el80c
Credits to Tim Ehlers and Michael Binder of GWDG for reporting,
testing, and enhancement of the fix.

Thanks to Dr. Werner Fink for the hints in bsc#931036 and pointing
to the misspelled sppkdev in the dpcumentation.

The package changes are:

- Use sppkdev instead of spkdev in the documentation too.
  + sbl-sppkdev.patch
- Add --nodaemon option to ExecStart of the brld.service and set Type=forking
  of the sbl.service both in the service section; (bsc#931036).

- Install missing brld init script and rc sym link.
  + sbl-init-scripts.patch
- Conditionally patch LIBDIR location to satisfy bi-arch requirements.
  + sbl-libdir.patch
- Create git7a75bc29 snaptshot tar ball.

OBS-URL: https://build.opensuse.org/request/show/307373
OBS-URL: https://build.opensuse.org/package/show/hardware/sbl?expand=0&rev=23
2015-05-30 13:37:59 +00:00

155 lines
3.8 KiB
RPMSpec

#
# spec file for package sbl
#
# Copyright (c) 2015 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
# 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/
#
Name: sbl
BuildRequires: bluez-devel
BuildRequires: gcc-c++
BuildRequires: libusb-devel
BuildRequires: orca
BuildRequires: speechd-devel
%if %{suse_version} > 1310
BuildRequires: pkgconfig(libsystemd-daemon)
%{?systemd_requires}
%endif
Version: 3.5.0.20130317.git7a75bc29
Release: 0
Source: sbl-%{version}.tar.bz2
Source1: sbl.service
Source2: brld.service
Patch1: sbl-shared.patch
Patch2: sbl-nostrip.patch
Patch3: sbl-install_perms.patch
Patch4: sbl-libdir.patch
Patch5: sbl-init-scripts.patch
Summary: SUSE blinux
License: GPL-2.0+
Group: Hardware/Other
PreReq: %insserv_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
SUSE blinux is a screen reader for the Linux console. It supports
braille displays.
%package orca
Summary: brld-orca brlapi
License: GPL-2.0 and GPL-2.0+
Group: Productivity/Multimedia/Sound/Utilities
Requires: orca
%py_requires
%if %suse_version <= 1110
%define python_sitearch %{py_sitedir}
%endif
%description orca
this python module enables orca to use brld for braille output
%prep
%setup -q
%patch1 -p0
%patch2 -p0
%patch3
%if "%{_libdir}" == "/usr/lib64"
%patch4 -p1
%endif
%patch5 -p1
%build
make CFLAGS="$RPM_OPT_FLAGS -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE" LIB_CFLAGS="$RPM_OPT_FLAGS -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -fPIC -I%_includedir/speech-dispatcher"
%install
make LIBINSTPATH=%{_libdir} DESTDIR=$RPM_BUILD_ROOT install
%if %{suse_version} > 1310
rm -f $RPM_BUILD_ROOT/etc/init.d/sbl
rm -f $RPM_BUILD_ROOT/etc/init.d/brld
install -D -m 644 %SOURCE1 %{buildroot}%{_unitdir}/sbl.service
install -D -m 644 %SOURCE2 %{buildroot}%{_unitdir}/brld.service
rm -f $RPM_BUILD_ROOT/usr/sbin/rcsbl
rm -f $RPM_BUILD_ROOT/usr/sbin/rcbrld
ln -sf /sbin/service $RPM_BUILD_ROOT/usr/sbin/rcsbl
ln -sf /sbin/service $RPM_BUILD_ROOT/usr/sbin/rcbrld
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if %{suse_version} > 1310
%pre
%service_add_pre sbl.service
%service_add_pre brld.service
%preun
%service_del_preun brld.service
%service_del_preun sbl.service
%endif
%post
/sbin/ldconfig
%if %{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
%postun
/sbin/ldconfig
%if %{suse_version} > 1310
%service_del_postun brld.service
%service_del_postun sbl.service
%else
%{insserv_cleanup}
%endif
%files
%defattr (-,root,root,755)
%doc doc/* Changelog
%dir /etc/sbl
%config /etc/sbl/keymap
%config /etc/sbl/profile
%config /etc/sbl/spkfilter
%config /etc/sbl.conf
%dir /usr/lib/sbl
/usr/lib/sbl/lib
/etc/sbl/brltbl
/etc/sbl/spk
/usr/sbin/sbl
/usr/sbin/rcsbl
/usr/sbin/brld
/usr/sbin/rcbrld
%{_libdir}/libbrld.so*
%if %{suse_version} > 1310
%{_unitdir}/sbl.service
%{_unitdir}/brld.service
%else
/etc/init.d/sbl
/etc/init.d/brld
%endif
/usr/share/man/man8/brld.8.gz
/usr/share/man/man8/sbl.8.gz
%files orca
%defattr (-,root,root,755)
%dir %{python_sitearch}/orca
%{python_sitearch}/orca/brlapi.py*
%changelog