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: 7ce54ba2d38b7c220870e8c781f36743
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.
23 %description -l pl.UTF-8
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.UTF-8): 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.UTF-8
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.UTF-8): 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.UTF-8
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.UTF-8): 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.UTF-8
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
196 f) configurationFile="${OPTARG}";;
197 c) requestedAction=create;;
198 u) requestedAction=update;;
199 n) deviceTranslation=none;;
200 d) deviceTranslation=devfs;;
201 o) deviceTranslation=old;;
202 p) requestedParameter="${OPTARG}";;
205 Usage: ${programName} [option ...]
206 -f file The configuration file to create/update.
207 -c Create the configuration file (write to stdout if no -f).
208 -u Update the configuration file (copying from stdin to stdout if no -f).
209 -n Do not translate device paths.
210 -d Do old-style to devfs device path translation.
211 -o Do devfs to old-style device path translation.
212 -p [driver][,[device][,[table]]]
213 Explicitly specify the boot parameter.
214 -h Display this usage summary.
218 \?) syntaxError "unknown option: -${OPTARG}";;
219 :) syntaxError "missing value: -${OPTARG}";;
220 *) internalError "unimplemented option: -${option}";;
223 shift "`expr $OPTIND - 1`"
224 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
226 case "${requestedAction}" in
228 putConfigurationLine()
230 echo "${1}" || exit 4
232 startConfigurationFile()
234 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
235 putConfigurationLine "`makeHeaderLine Created`"
236 putConfigurationLine "`makeParameterLine`"
237 putConfigurationLine ""
239 putConfigurationDirective()
241 putConfigurationLine "${1} ${2}"
243 finalizeConfigurationFile()
251 sedScript="${sedScript}
254 startConfigurationFile()
256 if [ -n "${configurationFile}" ]; then
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}" ]; then
293 device="tts/${minor}"
297 if [ "${minor}" != "${device}" ]; then
298 device="printers/${minor}"
301 programMessage "unsupported old-style device: ${device}"
303 translateDevice_old()
305 major="${device%%/*}"
306 if [ "${major}" != "${device}" ]; then
309 tts) devfs="ttyS${minor}";;
310 printers) devfs="lp${minor}";;
313 if [ -n "${devfs}" ]; then
316 programMessage "unsupported devfs device: ${device}"
322 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
326 echo "# Boot Parameter:${bootParameter}"
328 putConfigurationFile()
330 startConfigurationFile
331 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
332 [ -n "${brailleDevice}" ] && {
333 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
334 if [ "${device#/}" = "${device}" ]; then
335 translateDevice_${deviceTranslation}
337 putConfigurationDirective "braille-device" "${device}"
339 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
340 finalizeConfigurationFile
344 bootParameter="${bootParameter} ${1}"
346 while [ "${number}" -le 3 ]; do
347 cut="cut -d, -f${number}"
348 [ "${number}" -gt 1 ] && cut="${cut} -s"
349 operand="`echo ${1} | ${cut}`"
350 if [ -n "${operand}" ]; then
352 1) brailleDriver="${operand}";;
353 2) brailleDevice="${operand}";;
354 3) textTable="${operand}";;
357 number="`expr ${number} + 1`"
362 parseBootParameter "${1}"
368 while [ "${#}" -gt 0 ]; do
372 parseBootParameter "${1#*=}"
377 "${found}" && putConfigurationFile
383 bootCommandFile="/proc/cmdline"
384 if [ -n "${requestedParameter}" ]; then
385 putBootParameter "${requestedParameter}"
386 elif [ -f "${bootCommandFile}" ]; then
387 parseBootCommand `cat "${bootCommandFile}"`
388 elif [ -n "${brltty}" ]; then
389 putBootParameter "${brltty}"
394 %post -n brlapi -p /sbin/ldconfig
395 %postun -n brlapi -p /sbin/ldconfig
398 %defattr(644,root,root,755)
399 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO} doc/*
400 %attr(755,root,root) %{_bindir}/brltty
401 %attr(755,root,root) %{_bindir}/brltty-*
402 %attr(755,root,root) %{_bindir}/vstp
403 %attr(755,root,root) %{_bindir}/xbrlapi
404 %dir %{_libdir}/brltty
405 %attr(755,root,root) %{_libdir}/brltty/*.so
406 %{_sysconfdir}/brltty
407 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_libdir}/libbrlapi.so.*
413 %doc Documents/Manual-BrlAPI/English/BrlAPI*
415 %files -n brlapi-devel
416 %defattr(644,root,root,755)
417 %doc Documents/BrlAPIref Documents/README.Gnopernicus
418 %attr(755,root,root) %{_libdir}/libbrlapi.so
419 %{_includedir}/brltty
420 %{_includedir}/brlapi*.h
423 %files -n brlapi-static
424 %defattr(644,root,root,755)
425 %{_libdir}/libbrlapi.a