1 Summary: Braille display driver for Linux/Unix
2 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
8 URL: http://mielke.cc/brltty/
9 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
10 # Source0-md5: 0ae3da8252783a4d20e1ed4e55cede5b
11 Patch0: %{name}-slash.patch
12 BuildRequires: autoconf >= 2.53
13 BuildRequires: automake
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 BRLTTY is a background process (daemon) which provides access to the
19 Linux/Unix console (when in text mode) for a blind person using a
20 refreshable Braille display. It drives the Braille display, and
21 provides complete screen review functionality. Some speech capability
22 has also been incorporated.
24 %description -l pl.UTF-8
25 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
26 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
27 odświeżaniem (refreshable Braille display). BRLTTY steruje
28 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
29 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
33 Summary: Application Programming Interface for BRLTTY
34 Summary(pl.UTF-8): API do BRLTTY
35 Group: Applications/System
37 %description -n brlapi
38 This package provides the run-time support for the Application
39 Programming Interface to BRLTTY.
41 Install this package if you have an application which directly
42 accesses a refreshable Braille display.
44 %description -n brlapi -l pl.UTF-8
45 Ten pakiet zawiera środowisko uruchomieniowe dla programów
46 korzystających z API BRLTTY.
48 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
49 wyświetlacza Braille'a z odświeżaniem.
51 %package -n brlapi-devel
52 Summary: Headers and documentation for BrlAPI
53 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
54 Group: Development/Libraries
55 Requires: brlapi = %{version}-%{release}
57 %description -n brlapi-devel
58 This package provides the header files, shared object linker
59 reference, and reference documentation for BrlAPI (the Application
60 Programming Interface to BRLTTY). It enables the implementation of
61 applications which take direct advantage of a refreshable Braille
62 display in order to present information in ways which are more
63 appropriate for blind users and/or to provide user interfaces which
64 are more specifically atuned to their needs.
66 Install this package if you're developing or maintaining an
67 application which directly accesses a refreshable Braille display.
69 %description -n brlapi-devel -l pl.UTF-8
70 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
71 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
72 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
73 bardziej przystosowany dla osób niewidomych.
75 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
76 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
78 %package -n brlapi-static
79 Summary: Static BrlAPI library
80 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
81 Group: Development/Libraries
82 Requires: brlapi-devel = %{version}-%{release}
84 %description -n brlapi-static
85 This is package with static BrlAPI library.
87 %description -n brlapi-static -l pl.UTF-8
88 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
97 cp -f /usr/share/automake/config.sub acdir
99 --with-install-root="$RPM_BUILD_ROOT" \
100 --disable-tainted-components \
105 mkdir -p "$directory"
106 for file in `find . \( -path "./$directory" -o -path ./Documents \) -prune -o \( -name 'README*' -o -name '*.txt' -o -name '*.html' -o -name '*.sgml' -o \( -path "./Bootdisks/*" -type f -perm +ugo=x \) \) -print`
108 mkdir -p "$directory/${file%/*}"
109 cp -rp "$file" "$directory/$file"
113 rm -rf $RPM_BUILD_ROOT
115 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
118 rm -rf $RPM_BUILD_ROOT
121 # The pre-install scriptlet.
123 # If a configuration file already exists then rpm installs the new one as
124 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
127 # There's no explicit way to tell if a configuration file has been installed
128 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
129 # erasing the .rpmnew file now so that we can see if it gets created later.
130 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
133 # The post-install scriptlet.
135 # If BRLTTY's boot parameter has been specified then update the just installed
136 # configuration file template to reflect the options supplied thereby.
138 # First, we need to determine which file to update. If there's a .rpmnew file
139 # then update it since a previous configuration file must already have existed.
140 file="%{_sysconfdir}/brltty.conf"
142 [ -f "${new}" ] && file="${new}"
144 # Update the configuration file template via the Bootdisks/bp2cf script.
145 # Include it right within this scriptlet so that it needn't be installed.
146 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
148 # First, set bp2cf's command line arguments.
149 set -- -u -f "${file}"
152 ###############################################################################
153 # BRLTTY - A background process providing access to the Linux console (when in
154 # text mode) for a blind person using a refreshable Braille display.
156 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
158 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
160 # This is free software, placed under the terms of the
161 # GNU General Public License, as published by the Free Software
162 # Foundation. Please see the file COPYING for details.
164 # Web Page: http://mielke.cc/brltty/
166 # This software is maintained by Dave Mielke <dave@mielke.cc>.
167 ###############################################################################
169 # Convert the boot parameter to configuration file directives.
170 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
171 # If /proc is not mounted then use the brltty environment variable.
172 # Invoke with -h for usage information.
174 programName="${0##*/}"
177 echo 2>&1 "${programName}: ${1}"
181 programMessage "${1}"
186 programMessage "${1}"
191 requestedAction=create
192 deviceTranslation=none
193 requestedParameter=""
195 while getopts ":f:cundop:h" option
198 f) configurationFile="${OPTARG}";;
199 c) requestedAction=create;;
200 u) requestedAction=update;;
201 n) deviceTranslation=none;;
202 d) deviceTranslation=devfs;;
203 o) deviceTranslation=old;;
204 p) requestedParameter="${OPTARG}";;
207 Usage: ${programName} [option ...]
208 -f file The configuration file to create/update.
209 -c Create the configuration file (write to stdout if no -f).
210 -u Update the configuration file (copying from stdin to stdout if no -f).
211 -n Do not translate device paths.
212 -d Do old-style to devfs device path translation.
213 -o Do devfs to old-style device path translation.
214 -p [driver][,[device][,[table]]]
215 Explicitly specify the boot parameter.
216 -h Display this usage summary.
220 \?) syntaxError "unknown option: -${OPTARG}";;
221 :) syntaxError "missing value: -${OPTARG}";;
222 *) internalError "unimplemented option: -${option}";;
225 shift "`expr $OPTIND - 1`"
226 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
228 case "${requestedAction}" in
230 putConfigurationLine()
232 echo "${1}" || exit 4
234 startConfigurationFile()
236 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
237 putConfigurationLine "`makeHeaderLine Created`"
238 putConfigurationLine "`makeParameterLine`"
239 putConfigurationLine ""
241 putConfigurationDirective()
243 putConfigurationLine "${1} ${2}"
245 finalizeConfigurationFile()
253 sedScript="${sedScript}
256 startConfigurationFile()
258 if [ -n "${configurationFile}" ]; then
259 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
260 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
261 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
262 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
263 outputFile="${configurationFile}.new"
264 exec <"${configurationFile}" >"${outputFile}"
268 `makeHeaderLine Updated`\\
269 `makeParameterLine`\\
272 putConfigurationDirective()
274 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
275 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
276 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
278 finalizeConfigurationFile()
280 sed -e "${sedScript}"
281 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
284 *) internalError "unimplemented action: ${requestedAction}";;
287 translateDevice_none()
291 translateDevice_devfs()
293 minor="${device#ttyS}"
294 if [ "${minor}" != "${device}" ]; then
295 device="tts/${minor}"
299 if [ "${minor}" != "${device}" ]; then
300 device="printers/${minor}"
303 programMessage "unsupported old-style device: ${device}"
305 translateDevice_old()
307 major="${device%%/*}"
308 if [ "${major}" != "${device}" ]; then
311 tts) devfs="ttyS${minor}";;
312 printers) devfs="lp${minor}";;
315 if [ -n "${devfs}" ]; then
318 programMessage "unsupported devfs device: ${device}"
324 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
328 echo "# Boot Parameter:${bootParameter}"
330 putConfigurationFile()
332 startConfigurationFile
333 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
334 [ -n "${brailleDevice}" ] && {
335 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
336 if [ "${device#/}" = "${device}" ]; then
337 translateDevice_${deviceTranslation}
339 putConfigurationDirective "braille-device" "${device}"
341 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
342 finalizeConfigurationFile
346 bootParameter="${bootParameter} ${1}"
348 while [ "${number}" -le 3 ]; do
349 cut="cut -d, -f${number}"
350 [ "${number}" -gt 1 ] && cut="${cut} -s"
351 operand="`echo ${1} | ${cut}`"
352 if [ -n "${operand}" ]; then
354 1) brailleDriver="${operand}";;
355 2) brailleDevice="${operand}";;
356 3) textTable="${operand}";;
359 number="`expr ${number} + 1`"
364 parseBootParameter "${1}"
370 while [ "${#}" -gt 0 ]; do
374 parseBootParameter "${1#*=}"
379 "${found}" && putConfigurationFile
385 bootCommandFile="/proc/cmdline"
386 if [ -n "${requestedParameter}" ]; then
387 putBootParameter "${requestedParameter}"
388 elif [ -f "${bootCommandFile}" ]; then
389 parseBootCommand `cat "${bootCommandFile}"`
390 elif [ -n "${brltty}" ]; then
391 putBootParameter "${brltty}"
396 %post -n brlapi -p /sbin/ldconfig
397 %postun -n brlapi -p /sbin/ldconfig
400 %defattr(644,root,root,755)
401 %doc Documents/{Manual.sgml,Manual.txt,Manual-HTML,ChangeLog,TODO} doc/*
402 %attr(755,root,root) %{_bindir}/brltty
403 %attr(755,root,root) %{_bindir}/brltty-*
404 %attr(755,root,root) %{_bindir}/xbrlapi
405 %dir %{_libdir}/brltty
406 %dir %{_sysconfdir}/brltty
407 %attr(755,root,root) %{_libdir}/brltty/*.so
408 %dir %{_libdir}/brltty
409 %{_sysconfdir}/brltty
410 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/libbrlapi.so.*
416 %doc Documents/BrlAPI.sgml Documents/BrlAPI.txt Documents/BrlAPI-HTML
418 %files -n brlapi-devel
419 %defattr(644,root,root,755)
420 %doc Documents/BrlAPIref-HTML Documents/README.Gnopernicus
421 %attr(755,root,root) %{_libdir}/libbrlapi.so
422 %{_includedir}/brltty
425 %files -n brlapi-static
426 %defattr(644,root,root,755)
427 %{_libdir}/libbrlapi.a