3 # - more packages (bindings)
4 # - ocaml bcond is useless now:
5 # Cannot find ocamlfind.
6 # BrlAPI Caml bindings will be compiled but not installed.
10 %bcond_without apidocs # documentation generated with doxygen
11 %bcond_with java # java bindings
12 %bcond_with ocaml # ocaml bindings (NFY)
13 %bcond_without python # python bindings
14 %bcond_without tcl # tcl bindings
16 Summary: Braille display driver for Linux/Unix
17 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
23 URL: http://mielke.cc/brltty/
24 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
25 # Source0-md5: 7ce54ba2d38b7c220870e8c781f36743
26 BuildRequires: autoconf >= 2.53
27 BuildRequires: automake
29 #BuildRequires: bluez-devel
30 %{?with_apidocs:BuildRequires: doxygen}
31 #BuildRequires: gpm-devel
32 %{?with_java:BuildRequires: jdk}
33 #BuildRequires: libusb-devel
34 #BuildRequires: ncurses-devel
35 %{?with_ocaml:BuildRequires: ocaml}
36 #BuildRequires: pkgconfig
37 %{?with_python:BuildRequires: python-Pyrex}
38 %{?with_python:BuildRequires: rpm-pythonprov}
39 %{?with_tcl:BuildRequires: tcl}
40 #BuildRequires: xorg-lib-libX*
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 BRLTTY is a background process (daemon) which provides access to the
45 Linux/Unix console (when in text mode) for a blind person using a
46 refreshable Braille display. It drives the Braille display, and
47 provides complete screen review functionality. Some speech capability
48 has also been incorporated.
50 %description -l pl.UTF-8
51 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
52 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
53 odświeżaniem (refreshable Braille display). BRLTTY steruje
54 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
55 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
59 Summary: Application Programming Interface for BRLTTY
60 Summary(pl.UTF-8): API do BRLTTY
61 Group: Applications/System
63 %description -n brlapi
64 This package provides the run-time support for the Application
65 Programming Interface to BRLTTY.
67 Install this package if you have an application which directly
68 accesses a refreshable Braille display.
70 %description -n brlapi -l pl.UTF-8
71 Ten pakiet zawiera środowisko uruchomieniowe dla programów
72 korzystających z API BRLTTY.
74 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
75 wyświetlacza Braille'a z odświeżaniem.
77 %package -n brlapi-devel
78 Summary: Headers and documentation for BrlAPI
79 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
80 Group: Development/Libraries
81 Requires: brlapi = %{version}-%{release}
83 %description -n brlapi-devel
84 This package provides the header files, shared object linker
85 reference, and reference documentation for BrlAPI (the Application
86 Programming Interface to BRLTTY). It enables the implementation of
87 applications which take direct advantage of a refreshable Braille
88 display in order to present information in ways which are more
89 appropriate for blind users and/or to provide user interfaces which
90 are more specifically atuned to their needs.
92 Install this package if you're developing or maintaining an
93 application which directly accesses a refreshable Braille display.
95 %description -n brlapi-devel -l pl.UTF-8
96 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
97 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
98 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
99 bardziej przystosowany dla osób niewidomych.
101 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
102 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
104 %package -n brlapi-static
105 Summary: Static BrlAPI library
106 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
107 Group: Development/Libraries
108 Requires: brlapi-devel = %{version}-%{release}
110 %description -n brlapi-static
111 This is package with static BrlAPI library.
113 %description -n brlapi-static -l pl.UTF-8
114 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
116 %package -n brlapi-apidocs
117 Summary: BrlAPI documentation
118 Summary(pl.UTF-8): Documentacja BrlAPI
121 %description -n brlapi-apidocs
122 Documentation for BrlAPI in HTML format generated from brltty
125 %description -n brlapi-apidocs -l pl.UTF-8
126 Dokumentacja BrlAPI w formacie HTML generowane ze
127 źrodeł brltty przez doxygen.
129 %package -n brlapi-java
130 Summary: BrlAPI library for Java
131 Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
133 Requires: brlapi = %{version}-%{release}
135 %description -n brlapi-java
136 BrlAPI library for Java.
138 %description -n brlapi-java -l pl.UTF-8
139 Biblioteka BrlAPI dla Javy.
141 %package -n python-brlapi
142 Summary: Python interface to BrlAPI
143 Summary(pl.UTF-8): Pythonowy interfejs do BrlAPI
145 Requires: brlapi = %{version}-%{release}
147 %description -n python-brlapi
148 Python interface to BrlAPI.
150 %description -n python-brlapi -l pl.UTF-8
151 Pythonowy interfejs do BrlAPI.
153 %package -n brlapi-tcl
154 Summary: BrlAPI library for Tcl
155 Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl
157 Requires: brlapi = %{version}-%{release}
159 %description -n brlapi-tcl
160 BrlAPI library for Tcl.
162 %description -n brlapi-tcl -l pl.UTF-8
163 Biblioteka BrlAPI dla Tcl.
171 cp -f /usr/share/automake/config.sub acdir
173 --with-install-root="$RPM_BUILD_ROOT" \
174 --disable-tainted-components \
179 mkdir -p "$directory"
180 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`
182 mkdir -p "$directory/${file%/*}"
183 cp -rp "$file" "$directory/$file"
187 rm -rf $RPM_BUILD_ROOT
189 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
192 rm -rf $RPM_BUILD_ROOT
195 # The pre-install scriptlet.
197 # If a configuration file already exists then rpm installs the new one as
198 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
201 # There's no explicit way to tell if a configuration file has been installed
202 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
203 # erasing the .rpmnew file now so that we can see if it gets created later.
204 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
207 # The post-install scriptlet.
209 # If BRLTTY's boot parameter has been specified then update the just installed
210 # configuration file template to reflect the options supplied thereby.
212 # First, we need to determine which file to update. If there's a .rpmnew file
213 # then update it since a previous configuration file must already have existed.
214 file="%{_sysconfdir}/brltty.conf"
216 [ -f "${new}" ] && file="${new}"
218 # Update the configuration file template via the Bootdisks/bp2cf script.
219 # Include it right within this scriptlet so that it needn't be installed.
220 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
222 # First, set bp2cf's command line arguments.
223 set -- -u -f "${file}"
226 ###############################################################################
227 # BRLTTY - A background process providing access to the Linux console (when in
228 # text mode) for a blind person using a refreshable Braille display.
230 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
232 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
234 # This is free software, placed under the terms of the
235 # GNU General Public License, as published by the Free Software
236 # Foundation. Please see the file COPYING for details.
238 # Web Page: http://mielke.cc/brltty/
240 # This software is maintained by Dave Mielke <dave@mielke.cc>.
241 ###############################################################################
243 # Convert the boot parameter to configuration file directives.
244 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
245 # If /proc is not mounted then use the brltty environment variable.
246 # Invoke with -h for usage information.
248 programName="${0##*/}"
251 echo 2>&1 "${programName}: ${1}"
255 programMessage "${1}"
260 programMessage "${1}"
265 requestedAction=create
266 deviceTranslation=none
267 requestedParameter=""
269 while getopts ":f:cundop:h" option
272 f) configurationFile="${OPTARG}";;
273 c) requestedAction=create;;
274 u) requestedAction=update;;
275 n) deviceTranslation=none;;
276 d) deviceTranslation=devfs;;
277 o) deviceTranslation=old;;
278 p) requestedParameter="${OPTARG}";;
281 Usage: ${programName} [option ...]
282 -f file The configuration file to create/update.
283 -c Create the configuration file (write to stdout if no -f).
284 -u Update the configuration file (copying from stdin to stdout if no -f).
285 -n Do not translate device paths.
286 -d Do old-style to devfs device path translation.
287 -o Do devfs to old-style device path translation.
288 -p [driver][,[device][,[table]]]
289 Explicitly specify the boot parameter.
290 -h Display this usage summary.
294 \?) syntaxError "unknown option: -${OPTARG}";;
295 :) syntaxError "missing value: -${OPTARG}";;
296 *) internalError "unimplemented option: -${option}";;
299 shift "`expr $OPTIND - 1`"
300 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
302 case "${requestedAction}" in
304 putConfigurationLine()
306 echo "${1}" || exit 4
308 startConfigurationFile()
310 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
311 putConfigurationLine "`makeHeaderLine Created`"
312 putConfigurationLine "`makeParameterLine`"
313 putConfigurationLine ""
315 putConfigurationDirective()
317 putConfigurationLine "${1} ${2}"
319 finalizeConfigurationFile()
327 sedScript="${sedScript}
330 startConfigurationFile()
332 if [ -n "${configurationFile}" ]; then
333 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
334 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
335 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
336 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
337 outputFile="${configurationFile}.new"
338 exec <"${configurationFile}" >"${outputFile}"
342 `makeHeaderLine Updated`\\
343 `makeParameterLine`\\
346 putConfigurationDirective()
348 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
349 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
350 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
352 finalizeConfigurationFile()
354 sed -e "${sedScript}"
355 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
358 *) internalError "unimplemented action: ${requestedAction}";;
361 translateDevice_none()
365 translateDevice_devfs()
367 minor="${device#ttyS}"
368 if [ "${minor}" != "${device}" ]; then
369 device="tts/${minor}"
373 if [ "${minor}" != "${device}" ]; then
374 device="printers/${minor}"
377 programMessage "unsupported old-style device: ${device}"
379 translateDevice_old()
381 major="${device%%/*}"
382 if [ "${major}" != "${device}" ]; then
385 tts) devfs="ttyS${minor}";;
386 printers) devfs="lp${minor}";;
389 if [ -n "${devfs}" ]; then
392 programMessage "unsupported devfs device: ${device}"
398 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
402 echo "# Boot Parameter:${bootParameter}"
404 putConfigurationFile()
406 startConfigurationFile
407 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
408 [ -n "${brailleDevice}" ] && {
409 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
410 if [ "${device#/}" = "${device}" ]; then
411 translateDevice_${deviceTranslation}
413 putConfigurationDirective "braille-device" "${device}"
415 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
416 finalizeConfigurationFile
420 bootParameter="${bootParameter} ${1}"
422 while [ "${number}" -le 3 ]; do
423 cut="cut -d, -f${number}"
424 [ "${number}" -gt 1 ] && cut="${cut} -s"
425 operand="`echo ${1} | ${cut}`"
426 if [ -n "${operand}" ]; then
428 1) brailleDriver="${operand}";;
429 2) brailleDevice="${operand}";;
430 3) textTable="${operand}";;
433 number="`expr ${number} + 1`"
438 parseBootParameter "${1}"
444 while [ "${#}" -gt 0 ]; do
448 parseBootParameter "${1#*=}"
453 "${found}" && putConfigurationFile
459 bootCommandFile="/proc/cmdline"
460 if [ -n "${requestedParameter}" ]; then
461 putBootParameter "${requestedParameter}"
462 elif [ -f "${bootCommandFile}" ]; then
463 parseBootCommand `cat "${bootCommandFile}"`
464 elif [ -n "${brltty}" ]; then
465 putBootParameter "${brltty}"
470 %post -n brlapi -p /sbin/ldconfig
471 %postun -n brlapi -p /sbin/ldconfig
474 %defattr(644,root,root,755)
475 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
476 %doc doc/{Bindings,Bootdisks,BrailleDrivers,BrailleTables,ContractionTables,Patches,README,SpeechDrivers}
477 %attr(755,root,root) %{_bindir}/brltty
478 %attr(755,root,root) %{_bindir}/brltty-install
479 %attr(755,root,root) %{_bindir}/brltty-config
480 %attr(755,root,root) %{_bindir}/vstp
481 #attr(755,root,root) %{_bindir}/xbrlapi
482 %dir %{_libdir}/brltty
483 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
484 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
485 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
486 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
487 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
488 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
489 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
490 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
491 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
492 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
493 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
494 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
495 %attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
496 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
497 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
498 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
499 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
500 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
501 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
502 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
503 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
504 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
505 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
506 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
507 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
508 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
509 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
510 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
511 %attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so
512 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
513 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
514 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
515 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
516 %{_sysconfdir}/brltty
517 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
518 %{_mandir}/man1/brltty.1*
519 %{_mandir}/man1/vstp.1*
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5
524 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.1
525 %dir %{_libdir}/brlapi-0.5.1
527 %files -n brlapi-devel
528 %defattr(644,root,root,755)
529 %doc Documents/README.Gnopernicus
530 %doc Documents/Manual-BrlAPI/English/BrlAPI*
531 %attr(755,root,root) %{_libdir}/libbrlapi.so
532 %{_includedir}/brltty
533 %{_includedir}/brlapi*.h
536 %files -n brlapi-static
537 %defattr(644,root,root,755)
538 %{_libdir}/libbrlapi.a
541 %files -n brlapi-apidocs
542 %defattr(644,root,root,755)
543 %doc Documents/BrlAPIref/html/*
547 %files -n brlapi-java
548 %defattr(644,root,root,755)
549 %{_libdir}/java/libbrlapi_java.so
550 %{_javadir}/brlapi.jar
554 %files -n python-brlapi
555 %defattr(644,root,root,755)
556 %{py_sitedir}/Brlapi-*.egg-info
557 %attr(755,root,root) %{py_sitedir}/brlapi.so
562 %defattr(644,root,root,755)
563 %attr(755,root,root) %{_libdir}/brlapi-0.5.1/libbrlapi_tcl.so
564 %{_libdir}/brlapi-0.5.1/pkgIndex.tcl