Accepting request 247706 from home:oertel:branches:hardware
- add systemd support (bnc#865857) OBS-URL: https://build.opensuse.org/request/show/247706 OBS-URL: https://build.opensuse.org/package/show/hardware/sbl?expand=0&rev=20
This commit is contained in:
parent
4e48ac7029
commit
7ce665a7e6
10
brld.service
Normal file
10
brld.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Braille Server
|
||||||
|
Wants=network.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/brld
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 5 14:46:52 CEST 2014 - ro@suse.de
|
||||||
|
|
||||||
|
- add systemd support (bnc#865857)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 14 08:24:34 UTC 2014 - tyang@suse.com
|
Thu Aug 14 08:24:34 UTC 2014 - tyang@suse.com
|
||||||
|
|
||||||
|
10
sbl.service
Normal file
10
sbl.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=suse-blinux
|
||||||
|
Wants=network.target brld.service
|
||||||
|
After=network.target brld.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/sbl
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
41
sbl.spec
41
sbl.spec
@ -22,9 +22,15 @@ BuildRequires: gcc-c++
|
|||||||
BuildRequires: libusb-devel
|
BuildRequires: libusb-devel
|
||||||
BuildRequires: orca
|
BuildRequires: orca
|
||||||
BuildRequires: speechd-devel
|
BuildRequires: speechd-devel
|
||||||
|
%if %{suse_version} > 1310
|
||||||
|
BuildRequires: pkgconfig(libsystemd-daemon)
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
Version: 3.5.0
|
Version: 3.5.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Source: sbl-3.5.0.tbz2
|
Source: sbl-3.5.0.tbz2
|
||||||
|
Source1: sbl.service
|
||||||
|
Source2: brld.service
|
||||||
Patch1: sbl-shared.patch
|
Patch1: sbl-shared.patch
|
||||||
Patch2: sbl-nostrip.patch
|
Patch2: sbl-nostrip.patch
|
||||||
Summary: SUSE blinux
|
Summary: SUSE blinux
|
||||||
@ -72,18 +78,48 @@ make CFLAGS="$RPM_OPT_FLAGS -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE" LIB_CFLAGS="$RPM_
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
make LIBINSTPATH=%{_libdir} DESTDIR=$RPM_BUILD_ROOT 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
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
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
|
%post
|
||||||
/sbin/ldconfig
|
/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/sbl }
|
||||||
%{insserv_force_if_yast etc/init.d/brld }
|
%{insserv_force_if_yast etc/init.d/brld }
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
%if %{suse_version} > 1310
|
||||||
|
%service_del_postun brld.service
|
||||||
|
%service_del_postun sbl.service
|
||||||
|
%else
|
||||||
%{insserv_cleanup}
|
%{insserv_cleanup}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr (-,root,root,755)
|
%defattr (-,root,root,755)
|
||||||
@ -102,8 +138,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/usr/sbin/brld
|
/usr/sbin/brld
|
||||||
/usr/sbin/rcbrld
|
/usr/sbin/rcbrld
|
||||||
%{_libdir}/libbrld.so.1
|
%{_libdir}/libbrld.so.1
|
||||||
|
%if %{suse_version} > 1310
|
||||||
|
%{_unitdir}/sbl.service
|
||||||
|
%{_unitdir}/brld.service
|
||||||
|
%else
|
||||||
/etc/init.d/sbl
|
/etc/init.d/sbl
|
||||||
/etc/init.d/brld
|
/etc/init.d/brld
|
||||||
|
%endif
|
||||||
/usr/share/man/man8/brld.8.gz
|
/usr/share/man/man8/brld.8.gz
|
||||||
/usr/share/man/man8/sbl.8.gz
|
/usr/share/man/man8/sbl.8.gz
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user