1 Summary: Braille display driver for Linux/Unix
2 Summary(pl): 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 BuildRequires: autoconf >= 2.53
12 BuildRequires: automake
13 BuildRequires: libtool
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.
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): 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
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): Pliki nag³ówkowe i dokumentacja do BrlAPI
54 Group: Development/Libraries
55 Requires: brlapi = %{version}
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
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): Statyczna biblioteka BrlAPI
81 Group: Development/Libraries
82 Requires: brlapi-devel = %{version}
84 %description -n brlapi-static
85 This is package with static BrlAPI library.
87 %description -n brlapi-static -l pl
88 Ten pakiet zawiera statyczn± wersjê biblioteki BrlAPI.
100 --with-install-root="$RPM_BUILD_ROOT" \
101 --disable-tainted-components \
106 mkdir -p "$directory"
107 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`
109 mkdir -p "$directory/${file%/*}"
110 cp -rp "$file" "$directory/$file"
114 rm -rf $RPM_BUILD_ROOT
116 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
119 rm -rf $RPM_BUILD_ROOT
122 # The pre-install scriptlet.
124 # If a configuration file already exists then rpm installs the new one as
125 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
128 # There's no explicit way to tell if a configuration file has been installed
129 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
130 # erasing the .rpmnew file now so that we can see if it gets created later.
131 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
134 # The post-install scriptlet.
136 # If BRLTTY's boot parameter has been specified then update the just installed
137 # configuration file template to reflect the options supplied thereby.
139 # First, we need to determine which file to update. If there's a .rpmnew file
140 # then update it since a previous configuration file must already have existed.
141 file="%{_sysconfdir}/brltty.conf"
143 [ -f "${new}" ] && file="${new}"
145 # Update the configuration file template via the Bootdisks/bp2cf script.
146 # Include it right within this scriptlet so that it needn't be installed.
147 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
149 # First, set bp2cf's command line arguments.
150 set -- -u -f "${file}"
153 ###############################################################################
154 # BRLTTY - A background process providing access to the Linux console (when in
155 # text mode) for a blind person using a refreshable Braille display.
157 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
159 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
161 # This is free software, placed under the terms of the
162 # GNU General Public License, as published by the Free Software
163 # Foundation. Please see the file COPYING for details.
165 # Web Page: http://mielke.cc/brltty/
167 # This software is maintained by Dave Mielke <dave@mielke.cc>.
168 ###############################################################################
170 # Convert the boot parameter to configuration file directives.
171 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
172 # If /proc is not mounted then use the brltty environment variable.
173 # Invoke with -h for usage information.
175 programName="${0##*/}"
178 echo 2>&1 "${programName}: ${1}"
182 programMessage "${1}"
187 programMessage "${1}"
192 requestedAction=create
193 deviceTranslation=none
194 requestedParameter=""
196 while getopts ":f:cundop:h" option
200 f) configurationFile="${OPTARG}";;
201 c) requestedAction=create;;
202 u) requestedAction=update;;
203 n) deviceTranslation=none;;
204 d) deviceTranslation=devfs;;
205 o) deviceTranslation=old;;
206 p) requestedParameter="${OPTARG}";;
209 Usage: ${programName} [option ...]
210 -f file The configuration file to create/update.
211 -c Create the configuration file (write to stdout if no -f).
212 -u Update the configuration file (copying from stdin to stdout if no -f).
213 -n Do not translate device paths.
214 -d Do old-style to devfs device path translation.
215 -o Do devfs to old-style device path translation.
216 -p [driver][,[device][,[table]]]
217 Explicitly specify the boot parameter.
218 -h Display this usage summary.
222 \?) syntaxError "unknown option: -${OPTARG}";;
223 :) syntaxError "missing value: -${OPTARG}";;
224 *) internalError "unimplemented option: -${option}";;
227 shift "`expr $OPTIND - 1`"
228 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
230 case "${requestedAction}"
233 putConfigurationLine()
235 echo "${1}" || exit 4
237 startConfigurationFile()
239 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
240 putConfigurationLine "`makeHeaderLine Created`"
241 putConfigurationLine "`makeParameterLine`"
242 putConfigurationLine ""
244 putConfigurationDirective()
246 putConfigurationLine "${1} ${2}"
248 finalizeConfigurationFile()
256 sedScript="${sedScript}
259 startConfigurationFile()
261 if [ -n "${configurationFile}" ]
263 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
264 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
265 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
266 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
267 outputFile="${configurationFile}.new"
268 exec <"${configurationFile}" >"${outputFile}"
272 `makeHeaderLine Updated`\\
273 `makeParameterLine`\\
276 putConfigurationDirective()
278 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
279 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
280 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
282 finalizeConfigurationFile()
284 sed -e "${sedScript}"
285 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
288 *) internalError "unimplemented action: ${requestedAction}";;
291 translateDevice_none()
295 translateDevice_devfs()
297 minor="${device#ttyS}"
298 if [ "${minor}" != "${device}" ]
300 device="tts/${minor}"
304 if [ "${minor}" != "${device}" ]
306 device="printers/${minor}"
309 programMessage "unsupported old-style device: ${device}"
311 translateDevice_old()
313 major="${device%%/*}"
314 if [ "${major}" != "${device}" ]
319 tts) devfs="ttyS${minor}";;
320 printers) devfs="lp${minor}";;
327 programMessage "unsupported devfs device: ${device}"
333 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
337 echo "# Boot Parameter:${bootParameter}"
339 putConfigurationFile()
341 startConfigurationFile
342 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
343 [ -n "${brailleDevice}" ] && {
344 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
345 if [ "${device#/}" = "${device}" ]
347 translateDevice_${deviceTranslation}
349 putConfigurationDirective "braille-device" "${device}"
351 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
352 finalizeConfigurationFile
356 bootParameter="${bootParameter} ${1}"
358 while [ "${number}" -le 3 ]
360 cut="cut -d, -f${number}"
361 [ "${number}" -gt 1 ] && cut="${cut} -s"
362 operand="`echo ${1} | ${cut}`"
363 if [ -n "${operand}" ]
367 1) brailleDriver="${operand}";;
368 2) brailleDevice="${operand}";;
369 3) textTable="${operand}";;
372 number="`expr ${number} + 1`"
377 parseBootParameter "${1}"
383 while [ "${#}" -gt 0 ]
389 parseBootParameter "${1#*=}"
394 "${found}" && putConfigurationFile
400 bootCommandFile="/proc/cmdline"
401 if [ -n "${requestedParameter}" ]
403 putBootParameter "${requestedParameter}"
404 elif [ -f "${bootCommandFile}" ]
406 parseBootCommand `cat "${bootCommandFile}"`
407 elif [ -n "${brltty}" ]
409 putBootParameter "${brltty}"
414 %post -n brlapi -p /sbin/ldconfig
415 %postun -n brlapi -p /sbin/ldconfig
418 %defattr(644,root,root,755)
419 %attr(755,root,root) %{_bindir}/brltty
420 %attr(755,root,root) %{_bindir}/brltty-*
421 %attr(755,root,root) %{_bindir}/xbrlapi
422 %dir %{_libdir}/brltty
423 %dir %{_sysconfdir}/brltty
424 %attr(755,root,root) %{_libdir}/brltty/*.so
425 %dir %{_libdir}/brltty
426 %{_sysconfdir}/brltty
427 %doc %{_mandir}/man1/*
428 %doc Documents/Manual.sgml Documents/Manual.txt Documents/Manual-HTML
429 %doc Documents/ChangeLog Documents/TODO
431 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
434 %defattr(644,root,root,755)
435 %attr(755,root,root) %{_libdir}/libbrlapi.so.*
436 %doc Documents/BrlAPI.sgml Documents/BrlAPI.txt Documents/BrlAPI-HTML
438 %files -n brlapi-devel
439 %defattr(644,root,root,755)
440 %attr(755,root,root) %{_libdir}/libbrlapi.so
441 %{_includedir}/brltty
442 %doc %{_mandir}/man3/*
443 %doc Documents/BrlAPIref-HTML
444 %doc Documents/README.Gnopernicus
446 %files -n brlapi-static
447 %defattr(644,root,root,755)
448 %{_libdir}/libbrlapi.a