Rebased dracut support to upstream version
Added requires to subpackages
This commit is contained in:
parent
cf9159da50
commit
a9ca3736dc
1279
brltty-5.6-add-dracut-support.patch
Normal file
1279
brltty-5.6-add-dracut-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
28
brltty.spec
28
brltty.spec
@ -33,16 +33,11 @@
|
|||||||
|
|
||||||
Name: brltty
|
Name: brltty
|
||||||
Version: %{pkg_version}
|
Version: %{pkg_version}
|
||||||
Release: 29%{?dist}
|
Release: 30%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://brltty.app/
|
URL: http://brltty.app/
|
||||||
Source0: http://brltty.app/archive/%{name}-%{version}.tar.xz
|
Source0: http://brltty.app/archive/%{name}-%{version}.tar.xz
|
||||||
Source1: brltty.service
|
Source1: brltty.service
|
||||||
Source2: dracut-module-setup.sh
|
|
||||||
Source3: dracut-brltty-start.sh
|
|
||||||
Source4: dracut-brltty-cleanup.sh
|
|
||||||
Source5: dracut-parse-brltty-opts.sh
|
|
||||||
Source6: dracut-README
|
|
||||||
Patch1: brltty-loadLibrary.patch
|
Patch1: brltty-loadLibrary.patch
|
||||||
# libspeechd.h moved in latest speech-dispatch (NOT sent upstream)
|
# libspeechd.h moved in latest speech-dispatch (NOT sent upstream)
|
||||||
Patch2: brltty-5.0-libspeechd.patch
|
Patch2: brltty-5.0-libspeechd.patch
|
||||||
@ -51,6 +46,7 @@ Patch3: 0001-Add-support-for-eSpeak-NG.patch
|
|||||||
# Upstreamed
|
# Upstreamed
|
||||||
Patch4: brltty-5.6-libs-add-ldflags.patch
|
Patch4: brltty-5.6-libs-add-ldflags.patch
|
||||||
Patch5: brltty-5.6-ocaml-add-flags.patch
|
Patch5: brltty-5.6-ocaml-add-flags.patch
|
||||||
|
Patch6: brltty-5.6-add-dracut-support.patch
|
||||||
Summary: Braille display driver for Linux/Unix
|
Summary: Braille display driver for Linux/Unix
|
||||||
BuildRequires: byacc, glibc-kernheaders, bluez-libs-devel, systemd
|
BuildRequires: byacc, glibc-kernheaders, bluez-libs-devel, systemd
|
||||||
BuildRequires: gettext, at-spi2-core-devel, alsa-lib-devel
|
BuildRequires: gettext, at-spi2-core-devel, alsa-lib-devel
|
||||||
@ -90,6 +86,7 @@ This package provides the Speech Dispatcher driver for BRLTTY.
|
|||||||
%package docs
|
%package docs
|
||||||
Summary: Documentation for BRLTTY
|
Summary: Documentation for BRLTTY
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
|
Requires: %{name} = %{pkg_version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%description docs
|
%description docs
|
||||||
This package provides the documentation for BRLTTY.
|
This package provides the documentation for BRLTTY.
|
||||||
@ -133,6 +130,7 @@ This package provides the eSpeak-NG driver for BRLTTY.
|
|||||||
Version: %{api_version}
|
Version: %{api_version}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Summary: Application Programming Interface for BRLTTY
|
Summary: Application Programming Interface for BRLTTY
|
||||||
|
Requires: %{name}%{?_isa} = %{pkg_version}-%{release}
|
||||||
Requires(pre): glibc-common, shadow-utils
|
Requires(pre): glibc-common, shadow-utils
|
||||||
Requires(post): coreutils, util-linux
|
Requires(post): coreutils, util-linux
|
||||||
%description -n brlapi
|
%description -n brlapi
|
||||||
@ -240,6 +238,7 @@ pushd python2
|
|||||||
%patch3 -p1 -b .espeak-ng
|
%patch3 -p1 -b .espeak-ng
|
||||||
%patch4 -p1 -b .libs-add-ldflags
|
%patch4 -p1 -b .libs-add-ldflags
|
||||||
%patch5 -p1 -b .ocaml-add-flags
|
%patch5 -p1 -b .ocaml-add-flags
|
||||||
|
%patch6 -p1 -b .add-dracut-support
|
||||||
|
|
||||||
# remove packaged binary file
|
# remove packaged binary file
|
||||||
rm -f Programs/brltty-ktb
|
rm -f Programs/brltty-ktb
|
||||||
@ -403,16 +402,11 @@ cp -p %{name}.lang ../
|
|||||||
#Use python 3 for latex-access, BZ 1465657.
|
#Use python 3 for latex-access, BZ 1465657.
|
||||||
/usr/bin/2to3 -wn ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
/usr/bin/2to3 -wn ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
||||||
sed -i 's|/usr/bin/python|%{__python3}|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
sed -i 's|/usr/bin/python|%{__python3}|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb
|
||||||
popd
|
|
||||||
|
|
||||||
#install dracut module
|
#install dracut module
|
||||||
|
make install-dracut
|
||||||
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/dracut/modules.d/99brltty
|
popd
|
||||||
install -p -m 755 %{SOURCE2} ${RPM_BUILD_ROOT}%{_prefix}/lib/dracut/modules.d/99brltty/module-setup.sh
|
|
||||||
install -p -m 755 %{SOURCE3} ${RPM_BUILD_ROOT}%{_prefix}/lib/dracut/modules.d/99brltty/brltty-start.sh
|
|
||||||
install -p -m 755 %{SOURCE4} ${RPM_BUILD_ROOT}%{_prefix}/lib/dracut/modules.d/99brltty/brltty-cleanup.sh
|
|
||||||
install -p -m 755 %{SOURCE5} ${RPM_BUILD_ROOT}%{_prefix}/lib/dracut/modules.d/99brltty/parse-brltty-opts.sh
|
|
||||||
install -p -m 644 %{SOURCE6} ${RPM_BUILD_ROOT}%{_prefix}/lib/dracut/modules.d/99brltty/README.sh
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post brltty.service
|
%systemd_post brltty.service
|
||||||
@ -439,6 +433,7 @@ fi
|
|||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%config(noreplace) %{_sysconfdir}/brltty.conf
|
%config(noreplace) %{_sysconfdir}/brltty.conf
|
||||||
%{_sysconfdir}/brltty/
|
%{_sysconfdir}/brltty/
|
||||||
|
%exclude %{_sysconfdir}/brltty/Initramfs
|
||||||
%{_unitdir}/brltty.service
|
%{_unitdir}/brltty.service
|
||||||
%{_bindir}/brltty
|
%{_bindir}/brltty
|
||||||
%{_bindir}/brltty-*
|
%{_bindir}/brltty-*
|
||||||
@ -532,8 +527,15 @@ fi
|
|||||||
|
|
||||||
%files dracut
|
%files dracut
|
||||||
%{_prefix}/lib/dracut/modules.d/99brltty/
|
%{_prefix}/lib/dracut/modules.d/99brltty/
|
||||||
|
%dir %{_sysconfdir}/brltty/Initramfs
|
||||||
|
%config(noreplace) %verify(not size md5 mtime) %{_sysconfdir}/brltty/Initramfs/dracut.conf
|
||||||
|
%config(noreplace) %verify(not size md5 mtime) %{_sysconfdir}/brltty/Initramfs/cmdline
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 11 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 5.6-30
|
||||||
|
- Rebased dracut support to upstream version
|
||||||
|
- Added requires to subpackages
|
||||||
|
|
||||||
* Wed Dec 5 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 5.6-29
|
* Wed Dec 5 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 5.6-29
|
||||||
- Improved CFLAGS handling when building Ocaml bindings
|
- Improved CFLAGS handling when building Ocaml bindings
|
||||||
|
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
Brltty support for dracut
|
|
||||||
|
|
||||||
This module provides brltty functionality in the initrd.
|
|
||||||
Module pickups user settings from system and install
|
|
||||||
necessary files like drivers and used text tables to initramfs.
|
|
||||||
|
|
||||||
For now the module is reliably functional from phase pre-mount
|
|
||||||
in earlier phases the module is not functional
|
|
||||||
|
|
||||||
TBD fix functionality from earlier phases than pre-mount
|
|
||||||
|
|
||||||
Module in instalation takes some options from environment variables.
|
|
||||||
|
|
||||||
BRLTTY_DRACUT_INCLUDE_DRIVERS forces include of screen or braille
|
|
||||||
driver
|
|
||||||
example:
|
|
||||||
BRLTTY_DRACUT_INCLUDE_DRIVERS=bpm beu
|
|
||||||
|
|
||||||
BRLTTY_DRACUT_INCLUDE_TEXT_FILES forces include of text tables
|
|
||||||
example:
|
|
||||||
BRLTTY_DRACUT_INCLUDE_TEXT_FILES=kok.ttb lv.tti
|
|
||||||
|
|
||||||
BRLTTY_LOCALE needs to be used when building initram image
|
|
||||||
to install used text table
|
|
||||||
see https://bugzilla.redhat.com/show_bug.cgi?id=1584036
|
|
||||||
example
|
|
||||||
BRLTTY_LOCALE=cs_CZ.UTF-8
|
|
||||||
|
|
||||||
|
|
||||||
Module adds boot command line parameters which are parsed
|
|
||||||
and exported as a coresponding environment variables. The following
|
|
||||||
is a list of supported boot command line parameters and their mapping
|
|
||||||
to the environment variables recognized by brltty (for details about
|
|
||||||
the variables see man brltty):
|
|
||||||
|
|
||||||
Boot command line parameter Environment variable
|
|
||||||
brltty.api_parameters BRLTTY_API_PARAMETERS
|
|
||||||
brltty.attributes_table BRLTTY_ATTRIBUTES_TABLE
|
|
||||||
brltty.braille_device BRLTTY_BRAILLE_DEVICE
|
|
||||||
brltty.braille_driver BRLTTY_BRAILLE_DRIVER
|
|
||||||
brltty.braille_parameters BRLTTY_BRAILLE_PARAMETERS
|
|
||||||
brltty.configuration_file BRLTTY_CONFIGURATION_FILE
|
|
||||||
brltty.contraction_table BRLTTY_CONTRACTION_TABLE
|
|
||||||
brltty.midi_device BRLTTY_MIDI_DEVICE
|
|
||||||
brltty.pcm_device BRLTTY_PCM_DEVICE
|
|
||||||
brltty.preferences_file BRLTTY_PREFERENCES_FILE
|
|
||||||
brltty.release_device BRLTTY_RELEASE_DEVICE
|
|
||||||
brltty.screen_driver BRLTTY_SCREEN_DRIVER
|
|
||||||
brltty.screen_parameters BRLTTY_SCREEN_PARAMETERS
|
|
||||||
brltty.speech_driver BRLTTY_SPEECH_DRIVER
|
|
||||||
brltty.speech_input BRLTTY_SPEECH_INPUT
|
|
||||||
brltty.speech_parameters BRLTTY_SPEECH_PARAMETERS
|
|
||||||
brltty.text_table BRLTTY_TEXT_TABLE
|
|
||||||
|
|
||||||
Example:
|
|
||||||
brltty.braile_driver="ba" brltty.braille_parameters="auth=none,host=IP:0"
|
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
read pid</var/run/brltty.pid
|
|
||||||
kill -0 $pid && kill -9 $pid
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
brltty -E -x lx -P /var/run/brltty.pid
|
|
@ -1,66 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# called by dracut
|
|
||||||
check() {
|
|
||||||
require_binaries brltty || return 1
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# called by dracut
|
|
||||||
depends() {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
#called by dracut
|
|
||||||
install() {
|
|
||||||
local required_libs="$(ldd /usr/bin/brltty | awk '{print $1}' | sed 's/\..*/.so\*/g')"
|
|
||||||
|
|
||||||
for word in $required_libs; do
|
|
||||||
if [ -e $word ]; then
|
|
||||||
inst_libdir_file "$word"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
inst_libdir_file "brltty/libbrlttyxlx.so*"
|
|
||||||
|
|
||||||
local brltty_report="$(LC_ALL="$BRLTTY_LOCALE" brltty -Evel7 2>&1)"
|
|
||||||
|
|
||||||
local checked_braille_drivers=$(echo "$brltty_report" | grep "checking for braille driver:" | awk '{print $NF}')
|
|
||||||
|
|
||||||
for word in $checked_braille_drivers; do
|
|
||||||
inst_libdir_file "brltty/libbrlttyb$word.so*"
|
|
||||||
done
|
|
||||||
|
|
||||||
local text_tables=$(echo "$brltty_report" | grep -E "compiling text table|including data file"| awk '{print $NF}')
|
|
||||||
|
|
||||||
for word in $text_tables; do
|
|
||||||
inst "$word"
|
|
||||||
done
|
|
||||||
|
|
||||||
local attributes=$(echo "$brltty_report" | grep "Attributes Table" | awk '{print $NF}')
|
|
||||||
|
|
||||||
for word in $attributes; do
|
|
||||||
inst "/etc/brltty/Attributes/$word.atb"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$BRLTTY_DRACUT_INCLUDE_DRIVERS" ]; then
|
|
||||||
for word in $BRLTTY_DRACUT_INCLUDE_DRIVERS; do
|
|
||||||
inst_libdir_file "brltty/libbrltty$word.so*"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BRLTTY_DRACUT_INCLUDE_TEXT_FILES" ]; then
|
|
||||||
for word in $BRLTTY_DRACUT_INCLUDE_TEXT_FILES; do
|
|
||||||
inst "/etc/brltty/Text/$word"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
inst_hook cmdline 99 "$moddir/parse-brltty-opts.sh"
|
|
||||||
inst_hook initqueue 99 "$moddir/brltty-start.sh"
|
|
||||||
inst_hook cleanup 99 "$moddir/brltty-cleanup.sh"
|
|
||||||
|
|
||||||
inst_simple "/etc/brltty.conf"
|
|
||||||
inst_simple "/usr/bin/brltty"
|
|
||||||
|
|
||||||
dracut_need_initqueue
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export BRLTTY_API_PARAMETERS=$(getarg brltty.api_parameters=)
|
|
||||||
export BRLTTY_ATTRIBUTES_TABLE=$(getarg brltty.attributes_table=)
|
|
||||||
export BRLTTY_BRAILLE_DEVICE=$(getarg brltty.braille_device=)
|
|
||||||
export BRLTTY_BRAILLE_DRIVER=$(getarg brltty.braille_driver=)
|
|
||||||
export BRLTTY_BRAILLE_PARAMETERS=$(getarg brltty.braille_parameters=)
|
|
||||||
export BRLTTY_CONFIGURATION_FILE=$(getarg brltty.configuration_file=)
|
|
||||||
export BRLTTY_CONTRACTION_TABLE=$(getarg brltty.contraction_table=)
|
|
||||||
export BRLTTY_MIDI_DEVICE=$(getarg brltty.midi_device=)
|
|
||||||
export BRLTTY_PCM_DEVICE=$(getarg brltty.pcm_device=)
|
|
||||||
export BRLTTY_PREFERENCES_FILE=$(getarg brltty.preferences_file=)
|
|
||||||
export BRLTTY_RELEASE_DEVICE=$(getarg brltty.release_device=)
|
|
||||||
export BRLTTY_SCREEN_DRIVER=$(getarg brltty.screen_driver=)
|
|
||||||
export BRLTTY_SCREEN_PARAMETERS=$(getarg brltty.screen_parameters=)
|
|
||||||
export BRLTTY_SPEECH_DRIVER=$(getarg brltty.speech_driver=)
|
|
||||||
export BRLTTY_SPEECH_INPUT=$(getarg brltty.speech_input=)
|
|
||||||
export BRLTTY_SPEECH_PARAMETERS=$(getarg brltty.speech_parameters=)
|
|
||||||
export BRLTTY_TEXT_TABLE=$(getarg brltty.text_table=)
|
|
Loading…
Reference in New Issue
Block a user