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/brltty/libbrlttybbs.so
11 # /usr/lib/ocaml/brlapi/META
12 # /usr/lib/ocaml/brlapi/brlapi.cma
13 # /usr/lib/ocaml/brlapi/brlapi.cmi
14 # /usr/lib/ocaml/brlapi/brlapi.cmxa
15 # /usr/lib/ocaml/brlapi/brlapi.mli
16 # /usr/lib/ocaml/brlapi/libbrlapi_stubs.a
17 # /usr/lib/ocaml/stublibs/dllbrlapi_stubs.so
18 # /usr/lib/ocaml/stublibs/dllbrlapi_stubs.so.owner
19 # /usr/share/man/man1/xbrlapi.1.gz
22 %bcond_without apidocs # documentation generated with doxygen
23 %bcond_with java # java bindings
24 %bcond_with ocaml # ocaml bindings (NFY)
25 %bcond_without python # python bindings
26 %bcond_without tcl # tcl bindings
27 %bcond_without x # build X11-based utilities
29 %include /usr/lib/rpm/macros.java
30 Summary: Braille display driver for Linux/Unix
31 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
37 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
38 # Source0-md5: d52f332a29e00495d166e7f45403fa9d
39 Patch0: %{name}-ac.patch
40 URL: http://mielke.cc/brltty/
41 BuildRequires: at-spi-devel
42 BuildRequires: autoconf >= 2.62
43 BuildRequires: automake
45 #BuildRequires: bluez-devel
46 %{?with_apidocs:BuildRequires: doxygen}
47 BuildRequires: gpm-devel
48 %{?with_java:BuildRequires: jdk}
49 BuildRequires: ncurses-devel
50 %{?with_ocaml:BuildRequires: ocaml}
51 BuildRequires: pkgconfig
52 %{?with_python:BuildRequires: python-Pyrex}
53 %{?with_java:BuildRequires: rpm-javaprov}
54 %{?with_python:BuildRequires: rpm-pythonprov}
55 %{?with_tcl:BuildRequires: tcl}
56 %{?with_x:BuildRequires: xorg-lib-libXaw-devel}
57 %{?with_x:BuildRequires: xorg-lib-libXtst-devel}
59 #BR: libbraile-devel (-lllibbraile <braille.h>)
61 BuildRequires: flite-devel
63 #BR: Mikropuhe-devel (-lmikropuhe <mpwrfile.h>)
65 #BuildRequires: speech-dispatcher-devel
67 #BR: Swift-devel (-lswift <swift.h>)
69 #BR: Theta-devel (-ltheta <theta.h>)
71 #BR: ViaVoice-devel (-lviavoice <eci.h>)
72 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75 BRLTTY is a background process (daemon) which provides access to the
76 Linux/Unix console (when in text mode) for a blind person using a
77 refreshable Braille display. It drives the Braille display, and
78 provides complete screen review functionality. Some speech capability
79 has also been incorporated.
81 %description -l pl.UTF-8
82 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
83 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
84 odświeżaniem (refreshable Braille display). BRLTTY steruje
85 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
86 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
90 Summary: Application Programming Interface for BRLTTY
91 Summary(pl.UTF-8): API do BRLTTY
92 Group: Applications/System
94 %description -n brlapi
95 This package provides the run-time support for the Application
96 Programming Interface to BRLTTY.
98 Install this package if you have an application which directly
99 accesses a refreshable Braille display.
101 %description -n brlapi -l pl.UTF-8
102 Ten pakiet zawiera środowisko uruchomieniowe dla programów
103 korzystających z API BRLTTY.
105 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
106 wyświetlacza Braille'a z odświeżaniem.
108 %package -n brlapi-devel
109 Summary: Headers and documentation for BrlAPI
110 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
111 Group: Development/Libraries
112 Requires: brlapi = %{version}-%{release}
114 %description -n brlapi-devel
115 This package provides the header files, shared object linker
116 reference, and reference documentation for BrlAPI (the Application
117 Programming Interface to BRLTTY). It enables the implementation of
118 applications which take direct advantage of a refreshable Braille
119 display in order to present information in ways which are more
120 appropriate for blind users and/or to provide user interfaces which
121 are more specifically atuned to their needs.
123 Install this package if you're developing or maintaining an
124 application which directly accesses a refreshable Braille display.
126 %description -n brlapi-devel -l pl.UTF-8
127 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
128 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
129 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
130 bardziej przystosowany dla osób niewidomych.
132 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
133 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
135 %package -n brlapi-static
136 Summary: Static BrlAPI library
137 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
138 Group: Development/Libraries
139 Requires: brlapi-devel = %{version}-%{release}
141 %description -n brlapi-static
142 This is package with static BrlAPI library.
144 %description -n brlapi-static -l pl.UTF-8
145 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
147 %package -n brlapi-apidocs
148 Summary: BrlAPI documentation
149 Summary(pl.UTF-8): Documentacja BrlAPI
152 %description -n brlapi-apidocs
153 Documentation for BrlAPI in HTML format generated from brltty
156 %description -n brlapi-apidocs -l pl.UTF-8
157 Dokumentacja BrlAPI w formacie HTML generowane ze
158 źrodeł brltty przez doxygen.
160 %package -n java-brlapi
161 Summary: BrlAPI library for Java
162 Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
164 Requires: brlapi = %{version}-%{release}
166 %description -n java-brlapi
167 BrlAPI library for Java.
169 %description -n java-brlapi -l pl.UTF-8
170 Biblioteka BrlAPI dla Javy.
172 %package -n python-brlapi
173 Summary: Python interface to BrlAPI
174 Summary(pl.UTF-8): Pythonowy interfejs do BrlAPI
176 Requires: brlapi = %{version}-%{release}
178 %description -n python-brlapi
179 Python interface to BrlAPI.
181 %description -n python-brlapi -l pl.UTF-8
182 Pythonowy interfejs do BrlAPI.
184 %package -n brlapi-tcl
185 Summary: BrlAPI library for Tcl
186 Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl
188 Requires: brlapi = %{version}-%{release}
190 %description -n brlapi-tcl
191 BrlAPI library for Tcl.
193 %description -n brlapi-tcl -l pl.UTF-8
194 Biblioteka BrlAPI dla Tcl.
203 cp -f /usr/share/automake/config.sub acdir
204 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
206 --with-install-root="$RPM_BUILD_ROOT" \
207 --disable-tainted-components \
208 %{!?with_java:--disable-java-bindings} \
213 mkdir -p "$directory"
214 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`
216 mkdir -p "$directory/${file%/*}"
217 cp -rp "$file" "$directory/$file"
221 rm -rf $RPM_BUILD_ROOT
223 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
226 rm -rf $RPM_BUILD_ROOT
229 # The pre-install scriptlet.
231 # If a configuration file already exists then rpm installs the new one as
232 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
235 # There's no explicit way to tell if a configuration file has been installed
236 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
237 # erasing the .rpmnew file now so that we can see if it gets created later.
238 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
241 # The post-install scriptlet.
243 # If BRLTTY's boot parameter has been specified then update the just installed
244 # configuration file template to reflect the options supplied thereby.
246 # First, we need to determine which file to update. If there's a .rpmnew file
247 # then update it since a previous configuration file must already have existed.
248 file="%{_sysconfdir}/brltty.conf"
250 [ -f "${new}" ] && file="${new}"
252 # Update the configuration file template via the Bootdisks/bp2cf script.
253 # Include it right within this scriptlet so that it needn't be installed.
254 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
256 # First, set bp2cf's command line arguments.
257 set -- -u -f "${file}"
260 ###############################################################################
261 # BRLTTY - A background process providing access to the Linux console (when in
262 # text mode) for a blind person using a refreshable Braille display.
264 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
266 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
268 # This is free software, placed under the terms of the
269 # GNU General Public License, as published by the Free Software
270 # Foundation. Please see the file COPYING for details.
272 # Web Page: http://mielke.cc/brltty/
274 # This software is maintained by Dave Mielke <dave@mielke.cc>.
275 ###############################################################################
277 # Convert the boot parameter to configuration file directives.
278 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
279 # If /proc is not mounted then use the brltty environment variable.
280 # Invoke with -h for usage information.
282 programName="${0##*/}"
285 echo 2>&1 "${programName}: ${1}"
289 programMessage "${1}"
294 programMessage "${1}"
299 requestedAction=create
300 deviceTranslation=none
301 requestedParameter=""
303 while getopts ":f:cundop:h" option
306 f) configurationFile="${OPTARG}";;
307 c) requestedAction=create;;
308 u) requestedAction=update;;
309 n) deviceTranslation=none;;
310 d) deviceTranslation=devfs;;
311 o) deviceTranslation=old;;
312 p) requestedParameter="${OPTARG}";;
315 Usage: ${programName} [option ...]
316 -f file The configuration file to create/update.
317 -c Create the configuration file (write to stdout if no -f).
318 -u Update the configuration file (copying from stdin to stdout if no -f).
319 -n Do not translate device paths.
320 -d Do old-style to devfs device path translation.
321 -o Do devfs to old-style device path translation.
322 -p [driver][,[device][,[table]]]
323 Explicitly specify the boot parameter.
324 -h Display this usage summary.
328 \?) syntaxError "unknown option: -${OPTARG}";;
329 :) syntaxError "missing value: -${OPTARG}";;
330 *) internalError "unimplemented option: -${option}";;
333 shift "`expr $OPTIND - 1`"
334 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
336 case "${requestedAction}" in
338 putConfigurationLine()
340 echo "${1}" || exit 4
342 startConfigurationFile()
344 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
345 putConfigurationLine "`makeHeaderLine Created`"
346 putConfigurationLine "`makeParameterLine`"
347 putConfigurationLine ""
349 putConfigurationDirective()
351 putConfigurationLine "${1} ${2}"
353 finalizeConfigurationFile()
361 sedScript="${sedScript}
364 startConfigurationFile()
366 if [ -n "${configurationFile}" ]; then
367 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
368 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
369 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
370 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
371 outputFile="${configurationFile}.new"
372 exec <"${configurationFile}" >"${outputFile}"
376 `makeHeaderLine Updated`\\
377 `makeParameterLine`\\
380 putConfigurationDirective()
382 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
383 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
384 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
386 finalizeConfigurationFile()
388 sed -e "${sedScript}"
389 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
392 *) internalError "unimplemented action: ${requestedAction}";;
395 translateDevice_none()
399 translateDevice_devfs()
401 minor="${device#ttyS}"
402 if [ "${minor}" != "${device}" ]; then
403 device="tts/${minor}"
407 if [ "${minor}" != "${device}" ]; then
408 device="printers/${minor}"
411 programMessage "unsupported old-style device: ${device}"
413 translateDevice_old()
415 major="${device%%/*}"
416 if [ "${major}" != "${device}" ]; then
419 tts) devfs="ttyS${minor}";;
420 printers) devfs="lp${minor}";;
423 if [ -n "${devfs}" ]; then
426 programMessage "unsupported devfs device: ${device}"
432 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
436 echo "# Boot Parameter:${bootParameter}"
438 putConfigurationFile()
440 startConfigurationFile
441 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
442 [ -n "${brailleDevice}" ] && {
443 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
444 if [ "${device#/}" = "${device}" ]; then
445 translateDevice_${deviceTranslation}
447 putConfigurationDirective "braille-device" "${device}"
449 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
450 finalizeConfigurationFile
454 bootParameter="${bootParameter} ${1}"
456 while [ "${number}" -le 3 ]; do
457 cut="cut -d, -f${number}"
458 [ "${number}" -gt 1 ] && cut="${cut} -s"
459 operand="`echo ${1} | ${cut}`"
460 if [ -n "${operand}" ]; then
462 1) brailleDriver="${operand}";;
463 2) brailleDevice="${operand}";;
464 3) textTable="${operand}";;
467 number="`expr ${number} + 1`"
472 parseBootParameter "${1}"
478 while [ "${#}" -gt 0 ]; do
482 parseBootParameter "${1#*=}"
487 "${found}" && putConfigurationFile
493 bootCommandFile="/proc/cmdline"
494 if [ -n "${requestedParameter}" ]; then
495 putBootParameter "${requestedParameter}"
496 elif [ -f "${bootCommandFile}" ]; then
497 parseBootCommand `cat "${bootCommandFile}"`
498 elif [ -n "${brltty}" ]; then
499 putBootParameter "${brltty}"
504 %post -n brlapi -p /sbin/ldconfig
505 %postun -n brlapi -p /sbin/ldconfig
508 %defattr(644,root,root,755)
509 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
510 %doc doc/{Bindings,Bootdisks,BrailleDrivers,BrailleTables,ContractionTables,Patches,README,SpeechDrivers}
511 %attr(755,root,root) %{_bindir}/brltty
512 %attr(755,root,root) %{_bindir}/brltty-install
513 %attr(755,root,root) %{_bindir}/brltty-config
514 %attr(755,root,root) %{_bindir}/vstp
515 %{?with_x:%attr(755,root,root) %{_bindir}/xbrlapi}
516 %dir %{_libdir}/brltty
517 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
518 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
519 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
520 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
521 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
522 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
523 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
524 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
525 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
526 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
527 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
528 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
529 %attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
530 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
531 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
532 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
533 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
534 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
535 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
536 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
537 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
538 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
539 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
540 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
541 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
542 %{?with_x:%attr(755,root,root) %{_libdir}/brltty/libbrlttybxw.so}
543 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
544 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
545 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
546 %attr(755,root,root) %{_libdir}/brltty/libbrlttyses.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 %{_sysconfdir}/brltty
554 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
555 %{_mandir}/man1/brltty.1*
556 %{_mandir}/man1/vstp.1*
559 %defattr(644,root,root,755)
560 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.2
561 %attr(755,root,root) %ghost %{_libdir}/libbrlapi.so.0.5
563 %files -n brlapi-devel
564 %defattr(644,root,root,755)
565 %doc Documents/README.Gnopernicus
566 %doc Documents/Manual-BrlAPI/English/BrlAPI*
567 %attr(755,root,root) %{_libdir}/libbrlapi.so
568 %{_includedir}/brltty
569 %{_includedir}/brlapi*.h
572 %files -n brlapi-static
573 %defattr(644,root,root,755)
574 %{_libdir}/libbrlapi.a
577 %files -n brlapi-apidocs
578 %defattr(644,root,root,755)
579 %doc Documents/BrlAPIref/html/*
583 %files -n java-brlapi
584 %defattr(644,root,root,755)
585 %{_libdir}/java/libbrlapi_java.so
586 %{_javadir}/brlapi.jar
590 %files -n python-brlapi
591 %defattr(644,root,root,755)
592 %{py_sitedir}/Brlapi-*.egg-info
593 %attr(755,root,root) %{py_sitedir}/brlapi.so
598 %defattr(644,root,root,755)
599 %dir %{_libdir}/brlapi-0.5.2
600 %attr(755,root,root) %{_libdir}/brlapi-0.5.2/libbrlapi_tcl.so
601 %{_libdir}/brlapi-0.5.2/pkgIndex.tcl