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.
24 BRLTTY jest demonem, który udostêpnia dostêp do linuksowej konsoli (w
25 trybie tekstowym) dla niewidomych u¿ywaj±cych wy¶wietlaczy Braille'a z
26 od¶wie¿aniem (refreshable Braille display). BRLTTY steruje
27 wy¶wietlaczem Braille'a i dostarcza funkcjonalno¶æ ca³kowitego
28 przegl±du ekranu. Do tego pakietu zosta³a w³±czona mo¿liwo¶æ syntezy
32 Summary: Application Programming Interface for BRLTTY
33 Summary(pl): API do BRLTTY
34 Group: Applications/System
36 %description -n brlapi
37 This package provides the run-time support for the Application
38 Programming Interface to BRLTTY.
40 Install this package if you have an application which directly
41 accesses a refreshable Braille display.
43 %description -n brlapi -l pl
44 Ten pakiet zawiera ¶rodowisko uruchomieniowe dla programów
45 korzystaj±cych z API BRLTTY.
47 Zainstaluj ten pakiet je¶li masz aplikacjê, która bezpo¶rednio u¿ywa
48 wy¶wietlacza Braille'a z od¶wie¿aniem.
50 %package -n brlapi-devel
51 Summary: Headers and documentation for BrlAPI
52 Summary(pl): Pliki nag³ówkowe i dokumentacja do BrlAPI
53 Group: Development/Libraries
54 Requires: brlapi = %{version}
56 %description -n brlapi-devel
57 This package provides the header files, shared object linker
58 reference, and reference documentation for BrlAPI (the Application
59 Programming Interface to BRLTTY). It enables the implementation of
60 applications which take direct advantage of a refreshable Braille
61 display in order to present information in ways which are more
62 appropriate for blind users and/or to provide user interfaces which
63 are more specifically atuned to their needs.
65 Install this package if you're developing or maintaining an application
66 which directly accesses a refreshable Braille display.
68 %description -n brlapi-devel -l pl
69 Ten pakiet zawiera pliki nag³ówkowe oraz dokumentacjê do BrlAPI (API
70 do BRLTTY). BrlAPI pozwala implementowaæ aplikacje, które bezpo¶rednio
71 korzystaj± z wy¶wietlaczy Braille'a dostarczaj±c interfejs u¿ytkownika
72 bardziej przystosowany dla osób niewidomych.
74 Zainstaluj ten pakiet, je¶li tworzysz lub nadzorujesz aplikacjê
75 korzystaj±c± bezpo¶rednio z od¶wierzalnych wy¶wietlaczy Braille'a.
77 %package -n brlapi-static
78 Summary: Static BrlAPI library
79 Summary(pl): Statyczna biblioteka BrlAPI
80 Group: Development/Libraries
81 Requires: brlapi-devel = %{version}
83 %description -n brlapi-static
84 This is package with static BrlAPI library.
86 %description -n brlapi-static -l pl
87 Ten pakiet zawier± statyczn± wersjê biblioteki BrlAPI.
93 %configure --with-install-root="$RPM_BUILD_ROOT" \
94 --disable-tainted-components \
100 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`
102 mkdir -p "$directory/${file%/*}"
103 cp -rp "$file" "$directory/$file"
107 rm -rf $RPM_BUILD_ROOT
109 install -m 644 Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
112 rm -rf $RPM_BUILD_ROOT
115 # The pre-install scriptlet.
117 # If a configuration file already exists then rpm installs the new one as
118 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
121 # There's no explicit way to tell if a configuration file has been installed
122 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
123 # erasing the .rpmnew file now so that we can see if it gets created later.
124 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
127 # The post-install scriptlet.
129 # If BRLTTY's boot parameter has been specified then update the just installed
130 # configuration file template to reflect the options supplied thereby.
132 # First, we need to determine which file to update. If there's a .rpmnew file
133 # then update it since a previous configuration file must already have existed.
134 file="%{_sysconfdir}/brltty.conf"
136 [ -f "${new}" ] && file="${new}"
138 # Update the configuration file template via the Bootdisks/bp2cf script.
139 # Include it right within this scriptlet so that it needn't be installed.
140 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
142 # First, set bp2cf's command line arguments.
143 set -- -u -f "${file}"
146 ###############################################################################
147 # BRLTTY - A background process providing access to the Linux console (when in
148 # text mode) for a blind person using a refreshable Braille display.
150 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
152 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
154 # This is free software, placed under the terms of the
155 # GNU General Public License, as published by the Free Software
156 # Foundation. Please see the file COPYING for details.
158 # Web Page: http://mielke.cc/brltty/
160 # This software is maintained by Dave Mielke <dave@mielke.cc>.
161 ###############################################################################
163 # Convert the boot parameter to configuration file directives.
164 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
165 # If /proc is not mounted then use the brltty environment variable.
166 # Invoke with -h for usage information.
168 programName="${0##*/}"
171 echo 2>&1 "${programName}: ${1}"
175 programMessage "${1}"
180 programMessage "${1}"
185 requestedAction=create
186 deviceTranslation=none
187 requestedParameter=""
189 while getopts ":f:cundop:h" option
193 f) configurationFile="${OPTARG}";;
194 c) requestedAction=create;;
195 u) requestedAction=update;;
196 n) deviceTranslation=none;;
197 d) deviceTranslation=devfs;;
198 o) deviceTranslation=old;;
199 p) requestedParameter="${OPTARG}";;
202 Usage: ${programName} [option ...]
203 -f file The configuration file to create/update.
204 -c Create the configuration file (write to stdout if no -f).
205 -u Update the configuration file (copying from stdin to stdout if no -f).
206 -n Do not translate device paths.
207 -d Do old-style to devfs device path translation.
208 -o Do devfs to old-style device path translation.
209 -p [driver][,[device][,[table]]]
210 Explicitly specify the boot parameter.
211 -h Display this usage summary.
215 \?) syntaxError "unknown option: -${OPTARG}";;
216 :) syntaxError "missing value: -${OPTARG}";;
217 *) internalError "unimplemented option: -${option}";;
220 shift "`expr $OPTIND - 1`"
221 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
223 case "${requestedAction}"
226 putConfigurationLine()
228 echo "${1}" || exit 4
230 startConfigurationFile()
232 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
233 putConfigurationLine "`makeHeaderLine Created`"
234 putConfigurationLine "`makeParameterLine`"
235 putConfigurationLine ""
237 putConfigurationDirective()
239 putConfigurationLine "${1} ${2}"
241 finalizeConfigurationFile()
249 sedScript="${sedScript}
252 startConfigurationFile()
254 if [ -n "${configurationFile}" ]
256 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
257 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
258 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
259 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
260 outputFile="${configurationFile}.new"
261 exec <"${configurationFile}" >"${outputFile}"
265 `makeHeaderLine Updated`\\
266 `makeParameterLine`\\
269 putConfigurationDirective()
271 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
272 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
273 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
275 finalizeConfigurationFile()
277 sed -e "${sedScript}"
278 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
281 *) internalError "unimplemented action: ${requestedAction}";;
284 translateDevice_none()
288 translateDevice_devfs()
290 minor="${device#ttyS}"
291 if [ "${minor}" != "${device}" ]
293 device="tts/${minor}"
297 if [ "${minor}" != "${device}" ]
299 device="printers/${minor}"
302 programMessage "unsupported old-style device: ${device}"
304 translateDevice_old()
306 major="${device%%/*}"
307 if [ "${major}" != "${device}" ]
312 tts) devfs="ttyS${minor}";;
313 printers) devfs="lp${minor}";;
320 programMessage "unsupported devfs device: ${device}"
326 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
330 echo "# Boot Parameter:${bootParameter}"
332 putConfigurationFile()
334 startConfigurationFile
335 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
336 [ -n "${brailleDevice}" ] && {
337 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
338 if [ "${device#/}" = "${device}" ]
340 translateDevice_${deviceTranslation}
342 putConfigurationDirective "braille-device" "${device}"
344 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
345 finalizeConfigurationFile
349 bootParameter="${bootParameter} ${1}"
351 while [ "${number}" -le 3 ]
353 cut="cut -d, -f${number}"
354 [ "${number}" -gt 1 ] && cut="${cut} -s"
355 operand="`echo ${1} | ${cut}`"
356 if [ -n "${operand}" ]
360 1) brailleDriver="${operand}";;
361 2) brailleDevice="${operand}";;
362 3) textTable="${operand}";;
365 number="`expr ${number} + 1`"
370 parseBootParameter "${1}"
376 while [ "${#}" -gt 0 ]
382 parseBootParameter "${1#*=}"
387 "${found}" && putConfigurationFile
393 bootCommandFile="/proc/cmdline"
394 if [ -n "${requestedParameter}" ]
396 putBootParameter "${requestedParameter}"
397 elif [ -f "${bootCommandFile}" ]
399 parseBootCommand `cat "${bootCommandFile}"`
400 elif [ -n "${brltty}" ]
402 putBootParameter "${brltty}"
407 %post -n brlapi -p /sbin/ldconfig
408 %postun -n brlapi -p /sbin/ldconfig
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/brltty
413 %attr(755,root,root) %{_bindir}/brltty-*
414 %dir %{_libdir}/brltty
415 %dir %{_sysconfdir}/brltty
416 %attr(755,root,root) %{_libdir}/brltty/*.so
418 %{_sysconfdir}/brltty
419 %doc %{_mandir}/man1/*
420 %doc Documents/Manual.sgml Documents/Manual.txt Documents/Manual-HTML
421 %doc Documents/ChangeLog Documents/TODO
423 %config(noreplace) %verify(not size md5 mtime) %{_sysconfdir}/brltty.conf
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/libbrlapi.so.*
428 %doc Documents/BrlAPI.sgml Documents/BrlAPI.txt Documents/BrlAPI-HTML
430 %files -n brlapi-devel
431 %defattr(644,root,root,755)
432 %{_libdir}/libbrlapi.so
433 %{_includedir}/brltty
434 %doc %{_mandir}/man3/*
435 %doc Documents/BrlAPIref-HTML
436 %doc Documents/README.Gnopernicus
438 %files -n brlapi-static
439 %defattr(644,root,root,755)
440 %{_libdir}/libbrlapi.a