3 # - more packages (bindings)
4 # - ocaml bcond is useless now:
5 # Cannot find ocamlfind.
6 # BrlAPI Caml bindings will be compiled but not installed.
9 %bcond_without apidocs # documentation generated with doxygen
10 %bcond_with ocaml # ocaml bindings (NFY)
12 Summary: Braille display driver for Linux/Unix
13 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
19 URL: http://mielke.cc/brltty/
20 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
21 # Source0-md5: 7ce54ba2d38b7c220870e8c781f36743
22 BuildRequires: autoconf >= 2.53
23 BuildRequires: automake
25 #BuildRequires: bluez-devel
26 %{?with_apidocs:BuildRequires: doxygen}
27 #BuildRequires: gpm-devel
28 #BuildRequires: java-?
29 #BuildRequires: libusb-devel
30 #BuildRequires: ncurses-devel
31 %{?with_ocaml:BuildRequires: ocaml}
32 #BuildRequires: pkgconfig
33 #BuildRequires: python-devel
34 #BuildRequires: tcl-devel
35 #BuildRequires: xorg-lib-libX*
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 BRLTTY is a background process (daemon) which provides access to the
40 Linux/Unix console (when in text mode) for a blind person using a
41 refreshable Braille display. It drives the Braille display, and
42 provides complete screen review functionality. Some speech capability
43 has also been incorporated.
45 %description -l pl.UTF-8
46 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
47 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
48 odświeżaniem (refreshable Braille display). BRLTTY steruje
49 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
50 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
54 Summary: Application Programming Interface for BRLTTY
55 Summary(pl.UTF-8): API do BRLTTY
56 Group: Applications/System
58 %description -n brlapi
59 This package provides the run-time support for the Application
60 Programming Interface to BRLTTY.
62 Install this package if you have an application which directly
63 accesses a refreshable Braille display.
65 %description -n brlapi -l pl.UTF-8
66 Ten pakiet zawiera środowisko uruchomieniowe dla programów
67 korzystających z API BRLTTY.
69 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
70 wyświetlacza Braille'a z odświeżaniem.
72 %package -n brlapi-devel
73 Summary: Headers and documentation for BrlAPI
74 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
75 Group: Development/Libraries
76 Requires: brlapi = %{version}-%{release}
78 %description -n brlapi-devel
79 This package provides the header files, shared object linker
80 reference, and reference documentation for BrlAPI (the Application
81 Programming Interface to BRLTTY). It enables the implementation of
82 applications which take direct advantage of a refreshable Braille
83 display in order to present information in ways which are more
84 appropriate for blind users and/or to provide user interfaces which
85 are more specifically atuned to their needs.
87 Install this package if you're developing or maintaining an
88 application which directly accesses a refreshable Braille display.
90 %description -n brlapi-devel -l pl.UTF-8
91 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
92 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
93 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
94 bardziej przystosowany dla osób niewidomych.
96 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
97 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
99 %package -n brlapi-static
100 Summary: Static BrlAPI library
101 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
102 Group: Development/Libraries
103 Requires: brlapi-devel = %{version}-%{release}
105 %description -n brlapi-static
106 This is package with static BrlAPI library.
108 %description -n brlapi-static -l pl.UTF-8
109 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
111 %package -n brlapi-apidocs
112 Summary: BrlAPI documentation
113 Summary(pl.UTF-8): Documentacja BrlAPI
116 %description -n brlapi-apidocs
117 Documentation for BrlAPI in HTML format generated from brltty
120 %description -n brlapi-apidocs -l pl.UTF-8
121 Dokumentacja BrlAPI w formacie HTML generowane ze
122 źrodeł brltty przez doxygen.
130 cp -f /usr/share/automake/config.sub acdir
132 --with-install-root="$RPM_BUILD_ROOT" \
133 --disable-tainted-components \
138 mkdir -p "$directory"
139 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`
141 mkdir -p "$directory/${file%/*}"
142 cp -rp "$file" "$directory/$file"
146 rm -rf $RPM_BUILD_ROOT
148 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
151 rm -rf $RPM_BUILD_ROOT
154 # The pre-install scriptlet.
156 # If a configuration file already exists then rpm installs the new one as
157 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
160 # There's no explicit way to tell if a configuration file has been installed
161 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
162 # erasing the .rpmnew file now so that we can see if it gets created later.
163 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
166 # The post-install scriptlet.
168 # If BRLTTY's boot parameter has been specified then update the just installed
169 # configuration file template to reflect the options supplied thereby.
171 # First, we need to determine which file to update. If there's a .rpmnew file
172 # then update it since a previous configuration file must already have existed.
173 file="%{_sysconfdir}/brltty.conf"
175 [ -f "${new}" ] && file="${new}"
177 # Update the configuration file template via the Bootdisks/bp2cf script.
178 # Include it right within this scriptlet so that it needn't be installed.
179 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
181 # First, set bp2cf's command line arguments.
182 set -- -u -f "${file}"
185 ###############################################################################
186 # BRLTTY - A background process providing access to the Linux console (when in
187 # text mode) for a blind person using a refreshable Braille display.
189 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
191 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
193 # This is free software, placed under the terms of the
194 # GNU General Public License, as published by the Free Software
195 # Foundation. Please see the file COPYING for details.
197 # Web Page: http://mielke.cc/brltty/
199 # This software is maintained by Dave Mielke <dave@mielke.cc>.
200 ###############################################################################
202 # Convert the boot parameter to configuration file directives.
203 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
204 # If /proc is not mounted then use the brltty environment variable.
205 # Invoke with -h for usage information.
207 programName="${0##*/}"
210 echo 2>&1 "${programName}: ${1}"
214 programMessage "${1}"
219 programMessage "${1}"
224 requestedAction=create
225 deviceTranslation=none
226 requestedParameter=""
228 while getopts ":f:cundop:h" option
231 f) configurationFile="${OPTARG}";;
232 c) requestedAction=create;;
233 u) requestedAction=update;;
234 n) deviceTranslation=none;;
235 d) deviceTranslation=devfs;;
236 o) deviceTranslation=old;;
237 p) requestedParameter="${OPTARG}";;
240 Usage: ${programName} [option ...]
241 -f file The configuration file to create/update.
242 -c Create the configuration file (write to stdout if no -f).
243 -u Update the configuration file (copying from stdin to stdout if no -f).
244 -n Do not translate device paths.
245 -d Do old-style to devfs device path translation.
246 -o Do devfs to old-style device path translation.
247 -p [driver][,[device][,[table]]]
248 Explicitly specify the boot parameter.
249 -h Display this usage summary.
253 \?) syntaxError "unknown option: -${OPTARG}";;
254 :) syntaxError "missing value: -${OPTARG}";;
255 *) internalError "unimplemented option: -${option}";;
258 shift "`expr $OPTIND - 1`"
259 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
261 case "${requestedAction}" in
263 putConfigurationLine()
265 echo "${1}" || exit 4
267 startConfigurationFile()
269 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
270 putConfigurationLine "`makeHeaderLine Created`"
271 putConfigurationLine "`makeParameterLine`"
272 putConfigurationLine ""
274 putConfigurationDirective()
276 putConfigurationLine "${1} ${2}"
278 finalizeConfigurationFile()
286 sedScript="${sedScript}
289 startConfigurationFile()
291 if [ -n "${configurationFile}" ]; then
292 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
293 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
294 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
295 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
296 outputFile="${configurationFile}.new"
297 exec <"${configurationFile}" >"${outputFile}"
301 `makeHeaderLine Updated`\\
302 `makeParameterLine`\\
305 putConfigurationDirective()
307 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
308 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
309 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
311 finalizeConfigurationFile()
313 sed -e "${sedScript}"
314 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
317 *) internalError "unimplemented action: ${requestedAction}";;
320 translateDevice_none()
324 translateDevice_devfs()
326 minor="${device#ttyS}"
327 if [ "${minor}" != "${device}" ]; then
328 device="tts/${minor}"
332 if [ "${minor}" != "${device}" ]; then
333 device="printers/${minor}"
336 programMessage "unsupported old-style device: ${device}"
338 translateDevice_old()
340 major="${device%%/*}"
341 if [ "${major}" != "${device}" ]; then
344 tts) devfs="ttyS${minor}";;
345 printers) devfs="lp${minor}";;
348 if [ -n "${devfs}" ]; then
351 programMessage "unsupported devfs device: ${device}"
357 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
361 echo "# Boot Parameter:${bootParameter}"
363 putConfigurationFile()
365 startConfigurationFile
366 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
367 [ -n "${brailleDevice}" ] && {
368 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
369 if [ "${device#/}" = "${device}" ]; then
370 translateDevice_${deviceTranslation}
372 putConfigurationDirective "braille-device" "${device}"
374 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
375 finalizeConfigurationFile
379 bootParameter="${bootParameter} ${1}"
381 while [ "${number}" -le 3 ]; do
382 cut="cut -d, -f${number}"
383 [ "${number}" -gt 1 ] && cut="${cut} -s"
384 operand="`echo ${1} | ${cut}`"
385 if [ -n "${operand}" ]; then
387 1) brailleDriver="${operand}";;
388 2) brailleDevice="${operand}";;
389 3) textTable="${operand}";;
392 number="`expr ${number} + 1`"
397 parseBootParameter "${1}"
403 while [ "${#}" -gt 0 ]; do
407 parseBootParameter "${1#*=}"
412 "${found}" && putConfigurationFile
418 bootCommandFile="/proc/cmdline"
419 if [ -n "${requestedParameter}" ]; then
420 putBootParameter "${requestedParameter}"
421 elif [ -f "${bootCommandFile}" ]; then
422 parseBootCommand `cat "${bootCommandFile}"`
423 elif [ -n "${brltty}" ]; then
424 putBootParameter "${brltty}"
429 %post -n brlapi -p /sbin/ldconfig
430 %postun -n brlapi -p /sbin/ldconfig
433 %defattr(644,root,root,755)
434 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
435 %doc doc/{Bindings,Bootdisks,BrailleDrivers,BrailleTables,ContractionTables,Patches,README,SpeechDrivers}
436 %attr(755,root,root) %{_bindir}/brltty
437 %attr(755,root,root) %{_bindir}/brltty-install
438 %attr(755,root,root) %{_bindir}/brltty-config
439 %attr(755,root,root) %{_bindir}/vstp
440 #attr(755,root,root) %{_bindir}/xbrlapi
441 %dir %{_libdir}/brltty
442 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
443 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
444 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
445 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
446 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
447 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
448 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
449 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
450 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
451 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
452 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
453 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
454 %attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
455 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
456 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
457 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
458 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
459 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
460 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
461 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
462 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
463 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
464 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
465 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
466 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
467 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
468 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
469 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
470 %attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so
471 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
472 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
473 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
474 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
475 %{_sysconfdir}/brltty
476 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
477 %{_mandir}/man1/brltty.1*
478 %{_mandir}/man1/vstp.1*
481 %defattr(644,root,root,755)
482 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5
483 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.1
485 %files -n brlapi-devel
486 %defattr(644,root,root,755)
487 %doc Documents/README.Gnopernicus
488 %doc Documents/Manual-BrlAPI/English/BrlAPI*
489 %attr(755,root,root) %{_libdir}/libbrlapi.so
490 %{_includedir}/brltty
491 %{_includedir}/brlapi*.h
494 %files -n brlapi-static
495 %defattr(644,root,root,755)
496 %{_libdir}/libbrlapi.a
498 %files -n brlapi-apidocs
499 %defattr(644,root,root,755)
500 %doc Documents/BrlAPIref/html/*