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
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}-%{release}
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
66 application 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¶wie¿alnych 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}-%{release}
83 %description -n brlapi-static
84 This is package with static BrlAPI library.
86 %description -n brlapi-static -l pl
87 Ten pakiet zawiera statyczn± wersjê biblioteki BrlAPI.
95 cp -f /usr/share/automake/config.sub acdir
97 --with-install-root="$RPM_BUILD_ROOT" \
98 --disable-tainted-components \
103 mkdir -p "$directory"
104 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`
106 mkdir -p "$directory/${file%/*}"
107 cp -rp "$file" "$directory/$file"
111 rm -rf $RPM_BUILD_ROOT
113 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
116 rm -rf $RPM_BUILD_ROOT
119 # The pre-install scriptlet.
121 # If a configuration file already exists then rpm installs the new one as
122 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
125 # There's no explicit way to tell if a configuration file has been installed
126 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
127 # erasing the .rpmnew file now so that we can see if it gets created later.
128 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
131 # The post-install scriptlet.
133 # If BRLTTY's boot parameter has been specified then update the just installed
134 # configuration file template to reflect the options supplied thereby.
136 # First, we need to determine which file to update. If there's a .rpmnew file
137 # then update it since a previous configuration file must already have existed.
138 file="%{_sysconfdir}/brltty.conf"
140 [ -f "${new}" ] && file="${new}"
142 # Update the configuration file template via the Bootdisks/bp2cf script.
143 # Include it right within this scriptlet so that it needn't be installed.
144 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
146 # First, set bp2cf's command line arguments.
147 set -- -u -f "${file}"
150 ###############################################################################
151 # BRLTTY - A background process providing access to the Linux console (when in
152 # text mode) for a blind person using a refreshable Braille display.
154 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
156 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
158 # This is free software, placed under the terms of the
159 # GNU General Public License, as published by the Free Software
160 # Foundation. Please see the file COPYING for details.
162 # Web Page: http://mielke.cc/brltty/
164 # This software is maintained by Dave Mielke <dave@mielke.cc>.
165 ###############################################################################
167 # Convert the boot parameter to configuration file directives.
168 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
169 # If /proc is not mounted then use the brltty environment variable.
170 # Invoke with -h for usage information.
172 programName="${0##*/}"
175 echo 2>&1 "${programName}: ${1}"
179 programMessage "${1}"
184 programMessage "${1}"
189 requestedAction=create
190 deviceTranslation=none
191 requestedParameter=""
193 while getopts ":f:cundop:h" option
197 f) configurationFile="${OPTARG}";;
198 c) requestedAction=create;;
199 u) requestedAction=update;;
200 n) deviceTranslation=none;;
201 d) deviceTranslation=devfs;;
202 o) deviceTranslation=old;;
203 p) requestedParameter="${OPTARG}";;
206 Usage: ${programName} [option ...]
207 -f file The configuration file to create/update.
208 -c Create the configuration file (write to stdout if no -f).
209 -u Update the configuration file (copying from stdin to stdout if no -f).
210 -n Do not translate device paths.
211 -d Do old-style to devfs device path translation.
212 -o Do devfs to old-style device path translation.
213 -p [driver][,[device][,[table]]]
214 Explicitly specify the boot parameter.
215 -h Display this usage summary.
219 \?) syntaxError "unknown option: -${OPTARG}";;
220 :) syntaxError "missing value: -${OPTARG}";;
221 *) internalError "unimplemented option: -${option}";;
224 shift "`expr $OPTIND - 1`"
225 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
227 case "${requestedAction}"
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}" ]
260 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
261 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
262 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
263 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
264 outputFile="${configurationFile}.new"
265 exec <"${configurationFile}" >"${outputFile}"
269 `makeHeaderLine Updated`\\
270 `makeParameterLine`\\
273 putConfigurationDirective()
275 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
276 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
277 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
279 finalizeConfigurationFile()
281 sed -e "${sedScript}"
282 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
285 *) internalError "unimplemented action: ${requestedAction}";;
288 translateDevice_none()
292 translateDevice_devfs()
294 minor="${device#ttyS}"
295 if [ "${minor}" != "${device}" ]
297 device="tts/${minor}"
301 if [ "${minor}" != "${device}" ]
303 device="printers/${minor}"
306 programMessage "unsupported old-style device: ${device}"
308 translateDevice_old()
310 major="${device%%/*}"
311 if [ "${major}" != "${device}" ]
316 tts) devfs="ttyS${minor}";;
317 printers) devfs="lp${minor}";;
324 programMessage "unsupported devfs device: ${device}"
330 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
334 echo "# Boot Parameter:${bootParameter}"
336 putConfigurationFile()
338 startConfigurationFile
339 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
340 [ -n "${brailleDevice}" ] && {
341 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
342 if [ "${device#/}" = "${device}" ]
344 translateDevice_${deviceTranslation}
346 putConfigurationDirective "braille-device" "${device}"
348 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
349 finalizeConfigurationFile
353 bootParameter="${bootParameter} ${1}"
355 while [ "${number}" -le 3 ]
357 cut="cut -d, -f${number}"
358 [ "${number}" -gt 1 ] && cut="${cut} -s"
359 operand="`echo ${1} | ${cut}`"
360 if [ -n "${operand}" ]
364 1) brailleDriver="${operand}";;
365 2) brailleDevice="${operand}";;
366 3) textTable="${operand}";;
369 number="`expr ${number} + 1`"
374 parseBootParameter "${1}"
380 while [ "${#}" -gt 0 ]
386 parseBootParameter "${1#*=}"
391 "${found}" && putConfigurationFile
397 bootCommandFile="/proc/cmdline"
398 if [ -n "${requestedParameter}" ]
400 putBootParameter "${requestedParameter}"
401 elif [ -f "${bootCommandFile}" ]
403 parseBootCommand `cat "${bootCommandFile}"`
404 elif [ -n "${brltty}" ]
406 putBootParameter "${brltty}"
411 %post -n brlapi -p /sbin/ldconfig
412 %postun -n brlapi -p /sbin/ldconfig
415 %defattr(644,root,root,755)
416 %doc Documents/{Manual.sgml,Manual.txt,Manual-HTML,ChangeLog,TODO} doc/*
417 %attr(755,root,root) %{_bindir}/brltty
418 %attr(755,root,root) %{_bindir}/brltty-*
419 %attr(755,root,root) %{_bindir}/xbrlapi
420 %dir %{_libdir}/brltty
421 %dir %{_sysconfdir}/brltty
422 %attr(755,root,root) %{_libdir}/brltty/*.so
423 %dir %{_libdir}/brltty
424 %{_sysconfdir}/brltty
425 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/libbrlapi.so.*
431 %doc Documents/BrlAPI.sgml Documents/BrlAPI.txt Documents/BrlAPI-HTML
433 %files -n brlapi-devel
434 %defattr(644,root,root,755)
435 %doc Documents/BrlAPIref-HTML Documents/README.Gnopernicus
436 %attr(755,root,root) %{_libdir}/libbrlapi.so
437 %{_includedir}/brltty
440 %files -n brlapi-static
441 %defattr(644,root,root,755)
442 %{_libdir}/libbrlapi.a