2 # - what is that huge %post script?
3 # - ocaml bcond is useless now:
4 # Cannot find ocamlfind.
5 # BrlAPI Caml bindings will be compiled but not installed.
7 # - create bcond to build with minimal deps (wo ncurses,gpm,at-spi*)
9 # warning: Installed (but unpackaged) file(s) found:
10 # /usr/lib/ocaml/brlapi/META
11 # /usr/lib/ocaml/brlapi/brlapi.cma
12 # /usr/lib/ocaml/brlapi/brlapi.cmi
13 # /usr/lib/ocaml/brlapi/brlapi.cmxa
14 # /usr/lib/ocaml/brlapi/brlapi.mli
15 # /usr/lib/ocaml/brlapi/libbrlapi_stubs.a
16 # /usr/lib/ocaml/stublibs/dllbrlapi_stubs.so
17 # /usr/lib/ocaml/stublibs/dllbrlapi_stubs.so.owner
18 # /usr/share/man/man1/xbrlapi.1.gz
21 %bcond_without apidocs # documentation generated with doxygen
22 %bcond_with java # java bindings
23 %bcond_with ocaml # ocaml bindings (NFY)
24 %bcond_without python # python bindings
25 %bcond_without tcl # tcl bindings
26 %bcond_without x # build X11-based utilities
27 %bcond_without speech_dispatcher # build without speech-dispatcher driver
28 %bcond_without at_spi2 # build without AtSpi2 driver
29 %bcond_without espeak # build without eSpeak driver
31 %include /usr/lib/rpm/macros.java
32 Summary: Braille display driver for Linux/Unix
33 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
39 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
40 # Source0-md5: 192af5e634210616928496645e392097
41 Patch0: %{name}-stat.patch
42 URL: http://mielke.cc/brltty/
43 BuildRequires: at-spi-devel
44 BuildRequires: autoconf >= 2.62
45 BuildRequires: automake
47 #BuildRequires: bluez-devel
48 %{?with_at_spi2:BuildRequires: dbus-devel}
49 %{?with_apidocs:BuildRequires: doxygen}
50 %{?with_espeak:BuildRequires: espeak-devel}
51 BuildRequires: gpm-devel
52 %{?with_java:BuildRequires: jdk}
53 BuildRequires: ncurses-devel
54 %{?with_ocaml:BuildRequires: ocaml}
55 BuildRequires: pkgconfig
56 %{?with_python:BuildRequires: python-Pyrex}
57 %{?with_java:BuildRequires: rpm-javaprov}
58 %{?with_python:BuildRequires: rpm-pythonprov}
59 %{?with_tcl:BuildRequires: tcl-devel}
60 %{?with_x:BuildRequires: xorg-lib-libXaw-devel}
61 %{?with_x:BuildRequires: xorg-lib-libXtst-devel}
63 #BR: libbraile-devel (-lllibbraile <braille.h>)
65 BuildRequires: flite-devel
67 #BR: Mikropuhe-devel (-lmikropuhe <mpwrfile.h>)
69 %{?with_speech_dispatcher:BuildRequires: speech-dispatcher-devel}
71 #BR: Swift-devel (-lswift <swift.h>)
73 #BR: Theta-devel (-ltheta <theta.h>)
75 #BR: ViaVoice-devel (-lviavoice <eci.h>)
76 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
79 BRLTTY is a background process (daemon) which provides access to the
80 Linux/Unix console (when in text mode) for a blind person using a
81 refreshable Braille display. It drives the Braille display, and
82 provides complete screen review functionality. Some speech capability
83 has also been incorporated.
85 %description -l pl.UTF-8
86 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
87 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
88 odświeżaniem (refreshable Braille display). BRLTTY steruje
89 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
90 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
94 Summary: Application Programming Interface for BRLTTY
95 Summary(pl.UTF-8): API do BRLTTY
96 Group: Applications/System
98 %description -n brlapi
99 This package provides the run-time support for the Application
100 Programming Interface to BRLTTY.
102 Install this package if you have an application which directly
103 accesses a refreshable Braille display.
105 %description -n brlapi -l pl.UTF-8
106 Ten pakiet zawiera środowisko uruchomieniowe dla programów
107 korzystających z API BRLTTY.
109 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
110 wyświetlacza Braille'a z odświeżaniem.
112 %package -n brlapi-devel
113 Summary: Headers and documentation for BrlAPI
114 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
115 Group: Development/Libraries
116 Requires: brlapi = %{version}-%{release}
118 %description -n brlapi-devel
119 This package provides the header files, shared object linker
120 reference, and reference documentation for BrlAPI (the Application
121 Programming Interface to BRLTTY). It enables the implementation of
122 applications which take direct advantage of a refreshable Braille
123 display in order to present information in ways which are more
124 appropriate for blind users and/or to provide user interfaces which
125 are more specifically atuned to their needs.
127 Install this package if you're developing or maintaining an
128 application which directly accesses a refreshable Braille display.
130 %description -n brlapi-devel -l pl.UTF-8
131 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
132 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
133 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
134 bardziej przystosowany dla osób niewidomych.
136 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
137 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
139 %package -n brlapi-static
140 Summary: Static BrlAPI library
141 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
142 Group: Development/Libraries
143 Requires: brlapi-devel = %{version}-%{release}
145 %description -n brlapi-static
146 This is package with static BrlAPI library.
148 %description -n brlapi-static -l pl.UTF-8
149 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
151 %package -n brlapi-apidocs
152 Summary: BrlAPI documentation
153 Summary(pl.UTF-8): Documentacja BrlAPI
156 %description -n brlapi-apidocs
157 Documentation for BrlAPI in HTML format generated from brltty
160 %description -n brlapi-apidocs -l pl.UTF-8
161 Dokumentacja BrlAPI w formacie HTML generowane ze
162 źrodeł brltty przez doxygen.
164 %package -n java-brlapi
165 Summary: BrlAPI library for Java
166 Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
168 Requires: brlapi = %{version}-%{release}
170 %description -n java-brlapi
171 BrlAPI library for Java.
173 %description -n java-brlapi -l pl.UTF-8
174 Biblioteka BrlAPI dla Javy.
176 %package -n python-brlapi
177 Summary: Python interface to BrlAPI
178 Summary(pl.UTF-8): Pythonowy interfejs do BrlAPI
180 Requires: brlapi = %{version}-%{release}
182 %description -n python-brlapi
183 Python interface to BrlAPI.
185 %description -n python-brlapi -l pl.UTF-8
186 Pythonowy interfejs do BrlAPI.
188 %package -n brlapi-tcl
189 Summary: BrlAPI library for Tcl
190 Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl
192 Requires: brlapi = %{version}-%{release}
194 %description -n brlapi-tcl
195 BrlAPI library for Tcl.
197 %description -n brlapi-tcl -l pl.UTF-8
198 Biblioteka BrlAPI dla Tcl.
205 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
207 --with-install-root="$RPM_BUILD_ROOT" \
208 %{!?with_java:--disable-java-bindings} \
214 mkdir -p "$directory"
215 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`
217 mkdir -p "$directory/${file%/*}"
218 cp -rp "$file" "$directory/$file"
222 rm -rf $RPM_BUILD_ROOT
223 %{__make} -j1 install
224 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
227 rm -rf $RPM_BUILD_ROOT
230 # The pre-install scriptlet.
232 # If a configuration file already exists then rpm installs the new one as
233 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
236 # There's no explicit way to tell if a configuration file has been installed
237 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
238 # erasing the .rpmnew file now so that we can see if it gets created later.
239 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
242 # The post-install scriptlet.
244 # If BRLTTY's boot parameter has been specified then update the just installed
245 # configuration file template to reflect the options supplied thereby.
247 # First, we need to determine which file to update. If there's a .rpmnew file
248 # then update it since a previous configuration file must already have existed.
249 file="%{_sysconfdir}/brltty.conf"
251 [ -f "${new}" ] && file="${new}"
253 # Update the configuration file template via the Bootdisks/bp2cf script.
254 # Include it right within this scriptlet so that it needn't be installed.
255 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
257 # First, set bp2cf's command line arguments.
258 set -- -u -f "${file}"
261 ###############################################################################
262 # BRLTTY - A background process providing access to the Linux console (when in
263 # text mode) for a blind person using a refreshable Braille display.
265 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
267 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
269 # This is free software, placed under the terms of the
270 # GNU General Public License, as published by the Free Software
271 # Foundation. Please see the file COPYING for details.
273 # Web Page: http://mielke.cc/brltty/
275 # This software is maintained by Dave Mielke <dave@mielke.cc>.
276 ###############################################################################
278 # Convert the boot parameter to configuration file directives.
279 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
280 # If /proc is not mounted then use the brltty environment variable.
281 # Invoke with -h for usage information.
283 programName="${0##*/}"
286 echo 2>&1 "${programName}: ${1}"
290 programMessage "${1}"
295 programMessage "${1}"
300 requestedAction=create
301 deviceTranslation=none
302 requestedParameter=""
304 while getopts ":f:cundop:h" option
307 f) configurationFile="${OPTARG}";;
308 c) requestedAction=create;;
309 u) requestedAction=update;;
310 n) deviceTranslation=none;;
311 d) deviceTranslation=devfs;;
312 o) deviceTranslation=old;;
313 p) requestedParameter="${OPTARG}";;
316 Usage: ${programName} [option ...]
317 -f file The configuration file to create/update.
318 -c Create the configuration file (write to stdout if no -f).
319 -u Update the configuration file (copying from stdin to stdout if no -f).
320 -n Do not translate device paths.
321 -d Do old-style to devfs device path translation.
322 -o Do devfs to old-style device path translation.
323 -p [driver][,[device][,[table]]]
324 Explicitly specify the boot parameter.
325 -h Display this usage summary.
329 \?) syntaxError "unknown option: -${OPTARG}";;
330 :) syntaxError "missing value: -${OPTARG}";;
331 *) internalError "unimplemented option: -${option}";;
334 shift "`expr $OPTIND - 1`"
335 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
337 case "${requestedAction}" in
339 putConfigurationLine()
341 echo "${1}" || exit 4
343 startConfigurationFile()
345 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
346 putConfigurationLine "`makeHeaderLine Created`"
347 putConfigurationLine "`makeParameterLine`"
348 putConfigurationLine ""
350 putConfigurationDirective()
352 putConfigurationLine "${1} ${2}"
354 finalizeConfigurationFile()
362 sedScript="${sedScript}
365 startConfigurationFile()
367 if [ -n "${configurationFile}" ]; then
368 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
369 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
370 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
371 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
372 outputFile="${configurationFile}.new"
373 exec <"${configurationFile}" >"${outputFile}"
377 `makeHeaderLine Updated`\\
378 `makeParameterLine`\\
381 putConfigurationDirective()
383 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
384 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
385 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
387 finalizeConfigurationFile()
389 sed -e "${sedScript}"
390 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
393 *) internalError "unimplemented action: ${requestedAction}";;
396 translateDevice_none()
400 translateDevice_devfs()
402 minor="${device#ttyS}"
403 if [ "${minor}" != "${device}" ]; then
404 device="tts/${minor}"
408 if [ "${minor}" != "${device}" ]; then
409 device="printers/${minor}"
412 programMessage "unsupported old-style device: ${device}"
414 translateDevice_old()
416 major="${device%%/*}"
417 if [ "${major}" != "${device}" ]; then
420 tts) devfs="ttyS${minor}";;
421 printers) devfs="lp${minor}";;
424 if [ -n "${devfs}" ]; then
427 programMessage "unsupported devfs device: ${device}"
433 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
437 echo "# Boot Parameter:${bootParameter}"
439 putConfigurationFile()
441 startConfigurationFile
442 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
443 [ -n "${brailleDevice}" ] && {
444 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
445 if [ "${device#/}" = "${device}" ]; then
446 translateDevice_${deviceTranslation}
448 putConfigurationDirective "braille-device" "${device}"
450 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
451 finalizeConfigurationFile
455 bootParameter="${bootParameter} ${1}"
457 while [ "${number}" -le 3 ]; do
458 cut="cut -d, -f${number}"
459 [ "${number}" -gt 1 ] && cut="${cut} -s"
460 operand="`echo ${1} | ${cut}`"
461 if [ -n "${operand}" ]; then
463 1) brailleDriver="${operand}";;
464 2) brailleDevice="${operand}";;
465 3) textTable="${operand}";;
468 number="`expr ${number} + 1`"
473 parseBootParameter "${1}"
479 while [ "${#}" -gt 0 ]; do
483 parseBootParameter "${1#*=}"
488 "${found}" && putConfigurationFile
494 bootCommandFile="/proc/cmdline"
495 if [ -n "${requestedParameter}" ]; then
496 putBootParameter "${requestedParameter}"
497 elif [ -f "${bootCommandFile}" ]; then
498 parseBootCommand `cat "${bootCommandFile}"`
499 elif [ -n "${brltty}" ]; then
500 putBootParameter "${brltty}"
505 %post -n brlapi -p /sbin/ldconfig
506 %postun -n brlapi -p /sbin/ldconfig
509 %defattr(644,root,root,755)
510 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
511 %doc doc/{Bindings,Bootdisks,Drivers,Patches,Tables,README,nsistrings.txt}
512 %attr(755,root,root) %{_bindir}/brltty
513 %attr(755,root,root) %{_bindir}/brltty-install
514 %attr(755,root,root) %{_bindir}/brltty-config
515 %attr(755,root,root) %{_bindir}/vstp
516 %{?with_x:%attr(755,root,root) %{_bindir}/xbrlapi}
517 %dir %{_libdir}/brltty
518 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
519 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
520 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
521 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
522 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
523 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
524 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
525 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
526 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
527 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
528 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
529 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
530 %attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
531 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
532 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
533 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
534 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
535 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
536 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
537 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
538 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
539 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
540 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
541 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
542 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
543 %{?with_x:%attr(755,root,root) %{_libdir}/brltty/libbrlttybxw.so}
544 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
545 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
546 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
547 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfl.so
548 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
549 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
550 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxas.so
551 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
552 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
553 %attr(755,root,root) %{_libdir}/brltty/libbrlttybhm.so
554 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmt.so
555 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpg.so
556 %attr(755,root,root) %{_libdir}/brltty/libbrlttybsk.so
557 %attr(755,root,root) %{_libdir}/brltty/libbrlttysxs.so
558 %{?with_espeak:%attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so}
559 %{?with_at_spi2:%attr(755,root,root) %{_libdir}/brltty/libbrlttyxa2.so}
560 %{?with_speech_dispatcher:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssd.so}
562 %{_sysconfdir}/brltty
563 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
564 %{_mandir}/man1/brltty.1*
565 %{_mandir}/man1/vstp.1*
566 %{?with_x:%{_mandir}/man1/xbrlapi.1*}
569 %defattr(644,root,root,755)
570 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.5
571 %attr(755,root,root) %ghost %{_libdir}/libbrlapi.so.0.5
573 %files -n brlapi-devel
574 %defattr(644,root,root,755)
575 %doc Documents/Manual-BrlAPI/English/BrlAPI*
576 %attr(755,root,root) %{_libdir}/libbrlapi.so
577 %{_includedir}/brltty
578 %{_includedir}/brlapi*.h
581 %files -n brlapi-static
582 %defattr(644,root,root,755)
583 %{_libdir}/libbrlapi.a
586 %files -n brlapi-apidocs
587 %defattr(644,root,root,755)
588 %doc Documents/BrlAPIref/html/*
592 %files -n java-brlapi
593 %defattr(644,root,root,755)
594 %{_libdir}/java/libbrlapi_java.so
595 %{_javadir}/brlapi.jar
599 %files -n python-brlapi
600 %defattr(644,root,root,755)
601 %{py_sitedir}/Brlapi-*.egg-info
602 %attr(755,root,root) %{py_sitedir}/brlapi.so
607 %defattr(644,root,root,755)
608 %dir %{_libdir}/brlapi-0.5.5
609 %attr(755,root,root) %{_libdir}/brlapi-0.5.5/libbrlapi_tcl.so
610 %{_libdir}/brlapi-0.5.5/pkgIndex.tcl