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 b322afdc69c5661d97931f12497ca371
11 BuildRequires: autoconf >= 2.53
13 BuildRequires: glibc-devel
14 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 BRLTTY is a background process (daemon) which provides access to the
18 Linux/Unix console (when in text mode) for a blind person using a
19 refreshable braille display. It drives the braille display, and
20 provides complete screen review functionality. Some speech capability
21 has also been incorporated.
23 Install this package if you use a refreshable braille display.
26 BRLTTY jest demonem, który udostêpnia dostêp do linuksowej konsoli
27 (w trybie tekstowym) dla niewidomych u¿ywaj±cych wy¶wietlaczy braille'a
28 z od¶wie¿aniem (refreshable braille display). BRLTTY steruje wy¶wietlaczem
29 braille'a i dostarcza funkcjonalno¶æ ca³kowitego przegl±du ekranu.
30 Mo¿liwo¶æ syntezy mowy zosta³a w³±czona do tego pakietu.
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 accesses
42 a refreshable braille display.
44 %description -n brlapi -l pl
45 Ten pakiet zawiera ¶rodowisko uruchomieniowe dla programów korzystaj±cych
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
59 linker reference, and reference documentation for BrlAPI (the
60 Application Programming Interface to BRLTTY). It enables the
61 implementation of applications which take direct advantage of a
62 refreshable braille display in order to present information in ways
63 which are more appropriate for blind users and/or to provide user
64 interfaces which are more specifically atuned to their needs.
66 Install this package if you're developing or maintaining an application
67 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
71 (API 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ê korzystaj±c±
76 bezpo¶rednio z od¶wierzalnych wy¶wietlaczy braille'a.
78 %package -n brlapi-static
79 Summary: Static library brlapi
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 libraries.
87 %description -n brlapi-static -l pl
88 Statyczne biblioteki brlapi.
94 %configure --with-install-root="$RPM_BUILD_ROOT" \
95 --disable-tainted-components \
100 mkdir -p "$directory"
101 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`
103 mkdir -p "$directory/${file%/*}"
104 cp -rp "$file" "$directory/$file"
108 rm -rf $RPM_BUILD_ROOT
110 install -m 644 Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
113 rm -rf $RPM_BUILD_ROOT
116 # The pre-install scriptlet.
118 # If a configuration file already exists then rpm installs the new one as
119 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
122 # There's no explicit way to tell if a configuration file has been installed
123 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
124 # erasing the .rpmnew file now so that we can see if it gets created later.
125 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
128 # The post-install scriptlet.
130 # If BRLTTY's boot parameter has been specified then update the just installed
131 # configuration file template to reflect the options supplied thereby.
133 # First, we need to determine which file to update. If there's a .rpmnew file
134 # then update it since a previous configuration file must already have existed.
135 file="%{_sysconfdir}/brltty.conf"
137 [ -f "${new}" ] && file="${new}"
139 # Update the configuration file template via the Bootdisks/bp2cf script.
140 # Include it right within this scriptlet so that it needn't be installed.
141 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
143 # First, set bp2cf's command line arguments.
144 set -- -u -f "${file}"
147 ###############################################################################
148 # BRLTTY - A background process providing access to the Linux console (when in
149 # text mode) for a blind person using a refreshable braille display.
151 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
153 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
155 # This is free software, placed under the terms of the
156 # GNU General Public License, as published by the Free Software
157 # Foundation. Please see the file COPYING for details.
159 # Web Page: http://mielke.cc/brltty/
161 # This software is maintained by Dave Mielke <dave@mielke.cc>.
162 ###############################################################################
164 # Convert the boot parameter to configuration file directives.
165 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
166 # If /proc is not mounted then use the brltty environment variable.
167 # Invoke with -h for usage information.
169 programName="${0##*/}"
172 echo 2>&1 "${programName}: ${1}"
176 programMessage "${1}"
181 programMessage "${1}"
186 requestedAction=create
187 deviceTranslation=none
188 requestedParameter=""
190 while getopts ":f:cundop:h" option
194 f) configurationFile="${OPTARG}";;
195 c) requestedAction=create;;
196 u) requestedAction=update;;
197 n) deviceTranslation=none;;
198 d) deviceTranslation=devfs;;
199 o) deviceTranslation=old;;
200 p) requestedParameter="${OPTARG}";;
203 Usage: ${programName} [option ...]
204 -f file The configuration file to create/update.
205 -c Create the configuration file (write to stdout if no -f).
206 -u Update the configuration file (copying from stdin to stdout if no -f).
207 -n Do not translate device paths.
208 -d Do old-style to devfs device path translation.
209 -o Do devfs to old-style device path translation.
210 -p [driver][,[device][,[table]]]
211 Explicitly specify the boot parameter.
212 -h Display this usage summary.
216 \?) syntaxError "unknown option: -${OPTARG}";;
217 :) syntaxError "missing value: -${OPTARG}";;
218 *) internalError "unimplemented option: -${option}";;
221 shift "`expr $OPTIND - 1`"
222 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
224 case "${requestedAction}"
227 putConfigurationLine()
229 echo "${1}" || exit 4
231 startConfigurationFile()
233 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
234 putConfigurationLine "`makeHeaderLine Created`"
235 putConfigurationLine "`makeParameterLine`"
236 putConfigurationLine ""
238 putConfigurationDirective()
240 putConfigurationLine "${1} ${2}"
242 finalizeConfigurationFile()
250 sedScript="${sedScript}
253 startConfigurationFile()
255 if [ -n "${configurationFile}" ]
257 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
258 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
259 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
260 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
261 outputFile="${configurationFile}.new"
262 exec <"${configurationFile}" >"${outputFile}"
266 `makeHeaderLine Updated`\\
267 `makeParameterLine`\\
270 putConfigurationDirective()
272 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
273 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
274 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
276 finalizeConfigurationFile()
278 sed -e "${sedScript}"
279 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
282 *) internalError "unimplemented action: ${requestedAction}";;
285 translateDevice_none()
289 translateDevice_devfs()
291 minor="${device#ttyS}"
292 if [ "${minor}" != "${device}" ]
294 device="tts/${minor}"
298 if [ "${minor}" != "${device}" ]
300 device="printers/${minor}"
303 programMessage "unsupported old-style device: ${device}"
305 translateDevice_old()
307 major="${device%%/*}"
308 if [ "${major}" != "${device}" ]
313 tts) devfs="ttyS${minor}";;
314 printers) devfs="lp${minor}";;
321 programMessage "unsupported devfs device: ${device}"
327 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
331 echo "# Boot Parameter:${bootParameter}"
333 putConfigurationFile()
335 startConfigurationFile
336 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
337 [ -n "${brailleDevice}" ] && {
338 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
339 if [ "${device#/}" = "${device}" ]
341 translateDevice_${deviceTranslation}
343 putConfigurationDirective "braille-device" "${device}"
345 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
346 finalizeConfigurationFile
350 bootParameter="${bootParameter} ${1}"
352 while [ "${number}" -le 3 ]
354 cut="cut -d, -f${number}"
355 [ "${number}" -gt 1 ] && cut="${cut} -s"
356 operand="`echo ${1} | ${cut}`"
357 if [ -n "${operand}" ]
361 1) brailleDriver="${operand}";;
362 2) brailleDevice="${operand}";;
363 3) textTable="${operand}";;
366 number="`expr ${number} + 1`"
371 parseBootParameter "${1}"
377 while [ "${#}" -gt 0 ]
383 parseBootParameter "${1#*=}"
388 "${found}" && putConfigurationFile
394 bootCommandFile="/proc/cmdline"
395 if [ -n "${requestedParameter}" ]
397 putBootParameter "${requestedParameter}"
398 elif [ -f "${bootCommandFile}" ]
400 parseBootCommand `cat "${bootCommandFile}"`
401 elif [ -n "${brltty}" ]
403 putBootParameter "${brltty}"
408 %post -n brlapi -p /sbin/ldconfig
409 %postun -n brlapi -p /sbin/ldconfig
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_bindir}/brltty
414 %attr(755,root,root) %{_bindir}/brltty-*
415 %dir %{_libdir}/brltty
416 %dir %{_sysconfdir}/brltty
417 %attr(755,root,root) %{_libdir}/brltty/*.so
419 %{_sysconfdir}/brltty
420 %doc %{_mandir}/man1/*
421 %doc Documents/Manual.sgml Documents/Manual.txt Documents/Manual-HTML
422 %doc Documents/ChangeLog Documents/TODO
424 %config(noreplace) %verify(not size md5 mtime) %{_sysconfdir}/brltty.conf
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_libdir}/libbrlapi.so.*
429 %doc Documents/BrlAPI.sgml Documents/BrlAPI.txt Documents/BrlAPI-HTML
431 %files -n brlapi-devel
432 %defattr(644,root,root,755)
433 %{_libdir}/libbrlapi.so
434 %{_includedir}/brltty
435 %doc %{_mandir}/man3/*
436 %doc Documents/BrlAPIref-HTML
437 %doc Documents/README.Gnopernicus
439 %files -n brlapi-static
440 %defattr(644,root,root,755)
441 %{_libdir}/libbrlapi.a