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
28 %include /usr/lib/rpm/macros.java
29 Summary: Braille display driver for Linux/Unix
30 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
36 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
37 # Source0-md5: 192af5e634210616928496645e392097
38 Patch0: %{name}-stat.patch
39 URL: http://mielke.cc/brltty/
40 BuildRequires: at-spi-devel
41 BuildRequires: autoconf >= 2.62
42 BuildRequires: automake
44 #BuildRequires: bluez-devel
45 %{?with_apidocs:BuildRequires: doxygen}
46 BuildRequires: gpm-devel
47 %{?with_java:BuildRequires: jdk}
48 BuildRequires: ncurses-devel
49 %{?with_ocaml:BuildRequires: ocaml}
50 BuildRequires: pkgconfig
51 %{?with_python:BuildRequires: python-Pyrex}
52 %{?with_java:BuildRequires: rpm-javaprov}
53 %{?with_python:BuildRequires: rpm-pythonprov}
54 %{?with_tcl:BuildRequires: tcl}
55 %{?with_x:BuildRequires: xorg-lib-libXaw-devel}
56 %{?with_x:BuildRequires: xorg-lib-libXtst-devel}
58 #BR: libbraile-devel (-lllibbraile <braille.h>)
60 BuildRequires: flite-devel
62 #BR: Mikropuhe-devel (-lmikropuhe <mpwrfile.h>)
64 #BuildRequires: speech-dispatcher-devel
66 #BR: Swift-devel (-lswift <swift.h>)
68 #BR: Theta-devel (-ltheta <theta.h>)
70 #BR: ViaVoice-devel (-lviavoice <eci.h>)
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74 BRLTTY is a background process (daemon) which provides access to the
75 Linux/Unix console (when in text mode) for a blind person using a
76 refreshable Braille display. It drives the Braille display, and
77 provides complete screen review functionality. Some speech capability
78 has also been incorporated.
80 %description -l pl.UTF-8
81 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
82 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
83 odświeżaniem (refreshable Braille display). BRLTTY steruje
84 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
85 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
89 Summary: Application Programming Interface for BRLTTY
90 Summary(pl.UTF-8): API do BRLTTY
91 Group: Applications/System
93 %description -n brlapi
94 This package provides the run-time support for the Application
95 Programming Interface to BRLTTY.
97 Install this package if you have an application which directly
98 accesses a refreshable Braille display.
100 %description -n brlapi -l pl.UTF-8
101 Ten pakiet zawiera środowisko uruchomieniowe dla programów
102 korzystających z API BRLTTY.
104 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
105 wyświetlacza Braille'a z odświeżaniem.
107 %package -n brlapi-devel
108 Summary: Headers and documentation for BrlAPI
109 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
110 Group: Development/Libraries
111 Requires: brlapi = %{version}-%{release}
113 %description -n brlapi-devel
114 This package provides the header files, shared object linker
115 reference, and reference documentation for BrlAPI (the Application
116 Programming Interface to BRLTTY). It enables the implementation of
117 applications which take direct advantage of a refreshable Braille
118 display in order to present information in ways which are more
119 appropriate for blind users and/or to provide user interfaces which
120 are more specifically atuned to their needs.
122 Install this package if you're developing or maintaining an
123 application which directly accesses a refreshable Braille display.
125 %description -n brlapi-devel -l pl.UTF-8
126 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
127 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
128 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
129 bardziej przystosowany dla osób niewidomych.
131 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
132 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
134 %package -n brlapi-static
135 Summary: Static BrlAPI library
136 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
137 Group: Development/Libraries
138 Requires: brlapi-devel = %{version}-%{release}
140 %description -n brlapi-static
141 This is package with static BrlAPI library.
143 %description -n brlapi-static -l pl.UTF-8
144 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
146 %package -n brlapi-apidocs
147 Summary: BrlAPI documentation
148 Summary(pl.UTF-8): Documentacja BrlAPI
151 %description -n brlapi-apidocs
152 Documentation for BrlAPI in HTML format generated from brltty
155 %description -n brlapi-apidocs -l pl.UTF-8
156 Dokumentacja BrlAPI w formacie HTML generowane ze
157 źrodeł brltty przez doxygen.
159 %package -n java-brlapi
160 Summary: BrlAPI library for Java
161 Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
163 Requires: brlapi = %{version}-%{release}
165 %description -n java-brlapi
166 BrlAPI library for Java.
168 %description -n java-brlapi -l pl.UTF-8
169 Biblioteka BrlAPI dla Javy.
171 %package -n python-brlapi
172 Summary: Python interface to BrlAPI
173 Summary(pl.UTF-8): Pythonowy interfejs do BrlAPI
175 Requires: brlapi = %{version}-%{release}
177 %description -n python-brlapi
178 Python interface to BrlAPI.
180 %description -n python-brlapi -l pl.UTF-8
181 Pythonowy interfejs do BrlAPI.
183 %package -n brlapi-tcl
184 Summary: BrlAPI library for Tcl
185 Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl
187 Requires: brlapi = %{version}-%{release}
189 %description -n brlapi-tcl
190 BrlAPI library for Tcl.
192 %description -n brlapi-tcl -l pl.UTF-8
193 Biblioteka BrlAPI dla Tcl.
200 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
202 --with-install-root="$RPM_BUILD_ROOT" \
203 %{!?with_java:--disable-java-bindings} \
209 mkdir -p "$directory"
210 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`
212 mkdir -p "$directory/${file%/*}"
213 cp -rp "$file" "$directory/$file"
217 rm -rf $RPM_BUILD_ROOT
218 %{__make} -j1 install
219 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
222 rm -rf $RPM_BUILD_ROOT
225 # The pre-install scriptlet.
227 # If a configuration file already exists then rpm installs the new one as
228 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
231 # There's no explicit way to tell if a configuration file has been installed
232 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
233 # erasing the .rpmnew file now so that we can see if it gets created later.
234 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
237 # The post-install scriptlet.
239 # If BRLTTY's boot parameter has been specified then update the just installed
240 # configuration file template to reflect the options supplied thereby.
242 # First, we need to determine which file to update. If there's a .rpmnew file
243 # then update it since a previous configuration file must already have existed.
244 file="%{_sysconfdir}/brltty.conf"
246 [ -f "${new}" ] && file="${new}"
248 # Update the configuration file template via the Bootdisks/bp2cf script.
249 # Include it right within this scriptlet so that it needn't be installed.
250 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
252 # First, set bp2cf's command line arguments.
253 set -- -u -f "${file}"
256 ###############################################################################
257 # BRLTTY - A background process providing access to the Linux console (when in
258 # text mode) for a blind person using a refreshable Braille display.
260 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
262 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
264 # This is free software, placed under the terms of the
265 # GNU General Public License, as published by the Free Software
266 # Foundation. Please see the file COPYING for details.
268 # Web Page: http://mielke.cc/brltty/
270 # This software is maintained by Dave Mielke <dave@mielke.cc>.
271 ###############################################################################
273 # Convert the boot parameter to configuration file directives.
274 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
275 # If /proc is not mounted then use the brltty environment variable.
276 # Invoke with -h for usage information.
278 programName="${0##*/}"
281 echo 2>&1 "${programName}: ${1}"
285 programMessage "${1}"
290 programMessage "${1}"
295 requestedAction=create
296 deviceTranslation=none
297 requestedParameter=""
299 while getopts ":f:cundop:h" option
302 f) configurationFile="${OPTARG}";;
303 c) requestedAction=create;;
304 u) requestedAction=update;;
305 n) deviceTranslation=none;;
306 d) deviceTranslation=devfs;;
307 o) deviceTranslation=old;;
308 p) requestedParameter="${OPTARG}";;
311 Usage: ${programName} [option ...]
312 -f file The configuration file to create/update.
313 -c Create the configuration file (write to stdout if no -f).
314 -u Update the configuration file (copying from stdin to stdout if no -f).
315 -n Do not translate device paths.
316 -d Do old-style to devfs device path translation.
317 -o Do devfs to old-style device path translation.
318 -p [driver][,[device][,[table]]]
319 Explicitly specify the boot parameter.
320 -h Display this usage summary.
324 \?) syntaxError "unknown option: -${OPTARG}";;
325 :) syntaxError "missing value: -${OPTARG}";;
326 *) internalError "unimplemented option: -${option}";;
329 shift "`expr $OPTIND - 1`"
330 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
332 case "${requestedAction}" in
334 putConfigurationLine()
336 echo "${1}" || exit 4
338 startConfigurationFile()
340 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
341 putConfigurationLine "`makeHeaderLine Created`"
342 putConfigurationLine "`makeParameterLine`"
343 putConfigurationLine ""
345 putConfigurationDirective()
347 putConfigurationLine "${1} ${2}"
349 finalizeConfigurationFile()
357 sedScript="${sedScript}
360 startConfigurationFile()
362 if [ -n "${configurationFile}" ]; then
363 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
364 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
365 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
366 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
367 outputFile="${configurationFile}.new"
368 exec <"${configurationFile}" >"${outputFile}"
372 `makeHeaderLine Updated`\\
373 `makeParameterLine`\\
376 putConfigurationDirective()
378 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
379 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
380 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
382 finalizeConfigurationFile()
384 sed -e "${sedScript}"
385 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
388 *) internalError "unimplemented action: ${requestedAction}";;
391 translateDevice_none()
395 translateDevice_devfs()
397 minor="${device#ttyS}"
398 if [ "${minor}" != "${device}" ]; then
399 device="tts/${minor}"
403 if [ "${minor}" != "${device}" ]; then
404 device="printers/${minor}"
407 programMessage "unsupported old-style device: ${device}"
409 translateDevice_old()
411 major="${device%%/*}"
412 if [ "${major}" != "${device}" ]; then
415 tts) devfs="ttyS${minor}";;
416 printers) devfs="lp${minor}";;
419 if [ -n "${devfs}" ]; then
422 programMessage "unsupported devfs device: ${device}"
428 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
432 echo "# Boot Parameter:${bootParameter}"
434 putConfigurationFile()
436 startConfigurationFile
437 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
438 [ -n "${brailleDevice}" ] && {
439 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
440 if [ "${device#/}" = "${device}" ]; then
441 translateDevice_${deviceTranslation}
443 putConfigurationDirective "braille-device" "${device}"
445 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
446 finalizeConfigurationFile
450 bootParameter="${bootParameter} ${1}"
452 while [ "${number}" -le 3 ]; do
453 cut="cut -d, -f${number}"
454 [ "${number}" -gt 1 ] && cut="${cut} -s"
455 operand="`echo ${1} | ${cut}`"
456 if [ -n "${operand}" ]; then
458 1) brailleDriver="${operand}";;
459 2) brailleDevice="${operand}";;
460 3) textTable="${operand}";;
463 number="`expr ${number} + 1`"
468 parseBootParameter "${1}"
474 while [ "${#}" -gt 0 ]; do
478 parseBootParameter "${1#*=}"
483 "${found}" && putConfigurationFile
489 bootCommandFile="/proc/cmdline"
490 if [ -n "${requestedParameter}" ]; then
491 putBootParameter "${requestedParameter}"
492 elif [ -f "${bootCommandFile}" ]; then
493 parseBootCommand `cat "${bootCommandFile}"`
494 elif [ -n "${brltty}" ]; then
495 putBootParameter "${brltty}"
500 %post -n brlapi -p /sbin/ldconfig
501 %postun -n brlapi -p /sbin/ldconfig
504 %defattr(644,root,root,755)
505 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
506 %doc doc/{Bindings,Bootdisks,Drivers,Patches,Tables,README,nsistrings.txt}
507 %attr(755,root,root) %{_bindir}/brltty
508 %attr(755,root,root) %{_bindir}/brltty-install
509 %attr(755,root,root) %{_bindir}/brltty-config
510 %attr(755,root,root) %{_bindir}/vstp
511 %{?with_x:%attr(755,root,root) %{_bindir}/xbrlapi}
512 %dir %{_libdir}/brltty
513 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
514 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
515 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
516 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
517 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
518 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
519 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
520 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
521 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
522 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
523 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
524 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
525 %attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
526 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
527 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
528 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
529 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
530 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
531 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
532 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
533 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
534 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
535 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
536 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
537 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
538 %{?with_x:%attr(755,root,root) %{_libdir}/brltty/libbrlttybxw.so}
539 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
540 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
541 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
542 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfl.so
543 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
544 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
545 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxas.so
546 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
547 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
548 %attr(755,root,root) %{_libdir}/brltty/libbrlttybhm.so
549 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmt.so
550 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpg.so
551 %attr(755,root,root) %{_libdir}/brltty/libbrlttybsk.so
552 %attr(755,root,root) %{_libdir}/brltty/libbrlttysxs.so
553 %attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so
554 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxa2.so
555 %attr(755,root,root) %{_libdir}/brltty/libbrlttyssd.so
557 %{_sysconfdir}/brltty
558 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
559 %{_mandir}/man1/brltty.1*
560 %{_mandir}/man1/vstp.1*
561 %{?with_x:%{_mandir}/man1/xbrlapi.1*}
564 %defattr(644,root,root,755)
565 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.5
566 %attr(755,root,root) %ghost %{_libdir}/libbrlapi.so.0.5
568 %files -n brlapi-devel
569 %defattr(644,root,root,755)
570 %doc Documents/Manual-BrlAPI/English/BrlAPI*
571 %attr(755,root,root) %{_libdir}/libbrlapi.so
572 %{_includedir}/brltty
573 %{_includedir}/brlapi*.h
576 %files -n brlapi-static
577 %defattr(644,root,root,755)
578 %{_libdir}/libbrlapi.a
581 %files -n brlapi-apidocs
582 %defattr(644,root,root,755)
583 %doc Documents/BrlAPIref/html/*
587 %files -n java-brlapi
588 %defattr(644,root,root,755)
589 %{_libdir}/java/libbrlapi_java.so
590 %{_javadir}/brlapi.jar
594 %files -n python-brlapi
595 %defattr(644,root,root,755)
596 %{py_sitedir}/Brlapi-*.egg-info
597 %attr(755,root,root) %{py_sitedir}/brlapi.so
602 %defattr(644,root,root,755)
603 %dir %{_libdir}/brlapi-0.5.5
604 %attr(755,root,root) %{_libdir}/brlapi-0.5.5/libbrlapi_tcl.so
605 %{_libdir}/brlapi-0.5.5/pkgIndex.tcl