3 # - more packages (bindings)
5 Summary: Braille display driver for Linux/Unix
6 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
12 URL: http://mielke.cc/brltty/
13 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
14 # Source0-md5: 7ce54ba2d38b7c220870e8c781f36743
15 BuildRequires: autoconf >= 2.53
16 BuildRequires: automake
18 #BuildRequires: bluez-devel
19 #BuildRequires: doxygen
20 #BuildRequires: libtool
21 #BuildRequires: gpm-devel
22 #BuildRequires: java-?
23 #BuildRequires: libusb-devel
24 #BuildRequires: ncurses-devel
25 #BuildRequires: ocaml-devel
26 #BuildRequires: pkgconfig
27 #BuildRequires: python-devel
28 #BuildRequires: tcl-devel
29 #BuildRequires: xorg-lib-libX*
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 BRLTTY is a background process (daemon) which provides access to the
34 Linux/Unix console (when in text mode) for a blind person using a
35 refreshable Braille display. It drives the Braille display, and
36 provides complete screen review functionality. Some speech capability
37 has also been incorporated.
39 %description -l pl.UTF-8
40 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
41 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
42 odświeżaniem (refreshable Braille display). BRLTTY steruje
43 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
44 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
48 Summary: Application Programming Interface for BRLTTY
49 Summary(pl.UTF-8): API do BRLTTY
50 Group: Applications/System
52 %description -n brlapi
53 This package provides the run-time support for the Application
54 Programming Interface to BRLTTY.
56 Install this package if you have an application which directly
57 accesses a refreshable Braille display.
59 %description -n brlapi -l pl.UTF-8
60 Ten pakiet zawiera środowisko uruchomieniowe dla programów
61 korzystających z API BRLTTY.
63 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
64 wyświetlacza Braille'a z odświeżaniem.
66 %package -n brlapi-devel
67 Summary: Headers and documentation for BrlAPI
68 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
69 Group: Development/Libraries
70 Requires: brlapi = %{version}-%{release}
72 %description -n brlapi-devel
73 This package provides the header files, shared object linker
74 reference, and reference documentation for BrlAPI (the Application
75 Programming Interface to BRLTTY). It enables the implementation of
76 applications which take direct advantage of a refreshable Braille
77 display in order to present information in ways which are more
78 appropriate for blind users and/or to provide user interfaces which
79 are more specifically atuned to their needs.
81 Install this package if you're developing or maintaining an
82 application which directly accesses a refreshable Braille display.
84 %description -n brlapi-devel -l pl.UTF-8
85 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
86 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
87 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
88 bardziej przystosowany dla osób niewidomych.
90 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
91 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
93 %package -n brlapi-static
94 Summary: Static BrlAPI library
95 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
96 Group: Development/Libraries
97 Requires: brlapi-devel = %{version}-%{release}
99 %description -n brlapi-static
100 This is package with static BrlAPI library.
102 %description -n brlapi-static -l pl.UTF-8
103 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
111 cp -f /usr/share/automake/config.sub acdir
113 --with-install-root="$RPM_BUILD_ROOT" \
114 --disable-tainted-components \
119 mkdir -p "$directory"
120 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`
122 mkdir -p "$directory/${file%/*}"
123 cp -rp "$file" "$directory/$file"
127 rm -rf $RPM_BUILD_ROOT
129 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
132 rm -rf $RPM_BUILD_ROOT
135 # The pre-install scriptlet.
137 # If a configuration file already exists then rpm installs the new one as
138 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
141 # There's no explicit way to tell if a configuration file has been installed
142 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
143 # erasing the .rpmnew file now so that we can see if it gets created later.
144 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
147 # The post-install scriptlet.
149 # If BRLTTY's boot parameter has been specified then update the just installed
150 # configuration file template to reflect the options supplied thereby.
152 # First, we need to determine which file to update. If there's a .rpmnew file
153 # then update it since a previous configuration file must already have existed.
154 file="%{_sysconfdir}/brltty.conf"
156 [ -f "${new}" ] && file="${new}"
158 # Update the configuration file template via the Bootdisks/bp2cf script.
159 # Include it right within this scriptlet so that it needn't be installed.
160 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
162 # First, set bp2cf's command line arguments.
163 set -- -u -f "${file}"
166 ###############################################################################
167 # BRLTTY - A background process providing access to the Linux console (when in
168 # text mode) for a blind person using a refreshable Braille display.
170 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
172 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
174 # This is free software, placed under the terms of the
175 # GNU General Public License, as published by the Free Software
176 # Foundation. Please see the file COPYING for details.
178 # Web Page: http://mielke.cc/brltty/
180 # This software is maintained by Dave Mielke <dave@mielke.cc>.
181 ###############################################################################
183 # Convert the boot parameter to configuration file directives.
184 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
185 # If /proc is not mounted then use the brltty environment variable.
186 # Invoke with -h for usage information.
188 programName="${0##*/}"
191 echo 2>&1 "${programName}: ${1}"
195 programMessage "${1}"
200 programMessage "${1}"
205 requestedAction=create
206 deviceTranslation=none
207 requestedParameter=""
209 while getopts ":f:cundop:h" option
212 f) configurationFile="${OPTARG}";;
213 c) requestedAction=create;;
214 u) requestedAction=update;;
215 n) deviceTranslation=none;;
216 d) deviceTranslation=devfs;;
217 o) deviceTranslation=old;;
218 p) requestedParameter="${OPTARG}";;
221 Usage: ${programName} [option ...]
222 -f file The configuration file to create/update.
223 -c Create the configuration file (write to stdout if no -f).
224 -u Update the configuration file (copying from stdin to stdout if no -f).
225 -n Do not translate device paths.
226 -d Do old-style to devfs device path translation.
227 -o Do devfs to old-style device path translation.
228 -p [driver][,[device][,[table]]]
229 Explicitly specify the boot parameter.
230 -h Display this usage summary.
234 \?) syntaxError "unknown option: -${OPTARG}";;
235 :) syntaxError "missing value: -${OPTARG}";;
236 *) internalError "unimplemented option: -${option}";;
239 shift "`expr $OPTIND - 1`"
240 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
242 case "${requestedAction}" in
244 putConfigurationLine()
246 echo "${1}" || exit 4
248 startConfigurationFile()
250 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
251 putConfigurationLine "`makeHeaderLine Created`"
252 putConfigurationLine "`makeParameterLine`"
253 putConfigurationLine ""
255 putConfigurationDirective()
257 putConfigurationLine "${1} ${2}"
259 finalizeConfigurationFile()
267 sedScript="${sedScript}
270 startConfigurationFile()
272 if [ -n "${configurationFile}" ]; then
273 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
274 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
275 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
276 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
277 outputFile="${configurationFile}.new"
278 exec <"${configurationFile}" >"${outputFile}"
282 `makeHeaderLine Updated`\\
283 `makeParameterLine`\\
286 putConfigurationDirective()
288 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
289 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
290 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
292 finalizeConfigurationFile()
294 sed -e "${sedScript}"
295 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
298 *) internalError "unimplemented action: ${requestedAction}";;
301 translateDevice_none()
305 translateDevice_devfs()
307 minor="${device#ttyS}"
308 if [ "${minor}" != "${device}" ]; then
309 device="tts/${minor}"
313 if [ "${minor}" != "${device}" ]; then
314 device="printers/${minor}"
317 programMessage "unsupported old-style device: ${device}"
319 translateDevice_old()
321 major="${device%%/*}"
322 if [ "${major}" != "${device}" ]; then
325 tts) devfs="ttyS${minor}";;
326 printers) devfs="lp${minor}";;
329 if [ -n "${devfs}" ]; then
332 programMessage "unsupported devfs device: ${device}"
338 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
342 echo "# Boot Parameter:${bootParameter}"
344 putConfigurationFile()
346 startConfigurationFile
347 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
348 [ -n "${brailleDevice}" ] && {
349 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
350 if [ "${device#/}" = "${device}" ]; then
351 translateDevice_${deviceTranslation}
353 putConfigurationDirective "braille-device" "${device}"
355 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
356 finalizeConfigurationFile
360 bootParameter="${bootParameter} ${1}"
362 while [ "${number}" -le 3 ]; do
363 cut="cut -d, -f${number}"
364 [ "${number}" -gt 1 ] && cut="${cut} -s"
365 operand="`echo ${1} | ${cut}`"
366 if [ -n "${operand}" ]; then
368 1) brailleDriver="${operand}";;
369 2) brailleDevice="${operand}";;
370 3) textTable="${operand}";;
373 number="`expr ${number} + 1`"
378 parseBootParameter "${1}"
384 while [ "${#}" -gt 0 ]; do
388 parseBootParameter "${1#*=}"
393 "${found}" && putConfigurationFile
399 bootCommandFile="/proc/cmdline"
400 if [ -n "${requestedParameter}" ]; then
401 putBootParameter "${requestedParameter}"
402 elif [ -f "${bootCommandFile}" ]; then
403 parseBootCommand `cat "${bootCommandFile}"`
404 elif [ -n "${brltty}" ]; then
405 putBootParameter "${brltty}"
410 %post -n brlapi -p /sbin/ldconfig
411 %postun -n brlapi -p /sbin/ldconfig
414 %defattr(644,root,root,755)
415 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
416 %doc doc/{Bindings,Bootdisks,BrailleDrivers,BrailleTables,ContractionTables,Patches,README,SpeechDrivers}
417 %attr(755,root,root) %{_bindir}/brltty
418 %attr(755,root,root) %{_bindir}/brltty-install
419 %attr(755,root,root) %{_bindir}/brltty-config
420 %attr(755,root,root) %{_bindir}/vstp
421 #attr(755,root,root) %{_bindir}/xbrlapi
422 %dir %{_libdir}/brltty
423 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
424 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
425 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
426 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
427 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
428 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
429 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
430 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
431 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
432 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
433 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
434 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
435 %attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
436 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
437 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
438 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
439 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
440 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
441 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
442 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
443 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
444 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
445 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
446 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
447 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
448 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
449 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
450 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
451 %attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so
452 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
453 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
454 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
455 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
456 %{_sysconfdir}/brltty
457 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
458 %{_mandir}/man1/brltty.1*
459 %{_mandir}/man1/vstp.1*
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5
464 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.1
465 %doc Documents/Manual-BrlAPI/English/BrlAPI*
467 %files -n brlapi-devel
468 %defattr(644,root,root,755)
469 %doc Documents/BrlAPIref Documents/README.Gnopernicus
470 %attr(755,root,root) %{_libdir}/libbrlapi.so
471 %{_includedir}/brltty
472 %{_includedir}/brlapi*.h
475 %files -n brlapi-static
476 %defattr(644,root,root,755)
477 %{_libdir}/libbrlapi.a