3 %bcond_without apidocs # documentation generated with doxygen
4 %bcond_without java # Java bindings
5 %bcond_without ocaml # OCaml bindings
6 %bcond_without python # Python bindings
7 %bcond_without python3 # Python 3.x bindings
8 %bcond_without tcl # Tcl bindings
9 %bcond_without x # X11-based utilities
10 %bcond_without gpm # mouse tracking via GPM
11 %bcond_without libbraille # libbraille Braille driver
12 %bcond_without liblouis # liblouis in-line contracted Braille support
13 %bcond_without espeak # eSpeak synthesizer driver
14 %bcond_without espeak_ng # eSpeak-NG synthesizer driver
15 %bcond_without flite # Flite synthesizer driver
16 %bcond_with mikropuhe # Mikropuhe synthesizer driver [commercial, Finnish]
17 %bcond_without speech_dispatcher # Speech Dispatcher synthesizer driver
18 %bcond_with swift # Swift synthesizer driver [commercial, from Cepstral]
19 %bcond_with theta # Theta synthesizer driver [commercial, from Cepstral]
20 %bcond_with viavoice # IBM ViaVoice synthesizer driver [commercial]
21 %bcond_with at_spi # AtSpi screen driver
22 %bcond_without at_spi2 # AtSpi2 screen driver
24 %define brlapi_ver 0.8.0
25 Summary: Braille display driver for Linux/Unix
26 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
30 License: GPL v2+ (brltty and drivers), LGPL v2.1+ (APIs)
32 Source0: http://mielke.cc/brltty/archive/%{name}-%{version}.tar.xz
33 # Source0-md5: ddcdd8c093f94c68885a39508af08d92
34 Patch1: %{name}-speech-dispatcher.patch
35 Patch2: %{name}-python.patch
36 Patch4: %{name}-glibc25.patch
37 URL: http://mielke.cc/brltty/
38 BuildRequires: alsa-lib-devel
39 %{?with_at_spi:BuildRequires: at-spi-devel}
40 %{?with_at_spi2:BuildRequires: at-spi2-core-devel >= 2.0}
41 BuildRequires: autoconf >= 2.64
42 BuildRequires: automake
45 BuildRequires: bluez-libs-devel
46 %{?with_at_spi2:BuildRequires: dbus-devel >= 1.0}
47 %{?with_apidocs:BuildRequires: doxygen}
48 %{?with_espeak:BuildRequires: espeak-devel}
49 %{?with_espeak_ng:BuildRequires: espeak-ng-devel}
50 BuildRequires: expat-devel
51 %{?with_flite:BuildRequires: flite-devel}
52 BuildRequires: gettext-tools
53 %{?with_at_spi2:BuildRequires: glib2-devel >= 2.0}
54 %{?with_gpm:BuildRequires: gpm-devel}
55 %{?with_java:BuildRequires: jdk}
56 %{?with_java:BuildRequires: jpackage-utils}
57 %{?with_libbraille:BuildRequires: libbraille-devel}
58 BuildRequires: libicu-devel
59 %{?with_liblouis:BuildRequires: liblouis-devel}
60 BuildRequires: ncurses-devel
61 %{?with_ocaml:BuildRequires: ocaml}
62 BuildRequires: pcre2-32-devel
63 BuildRequires: pkgconfig
64 BuildRequires: polkit-devel
65 %{?with_python:BuildRequires: python-Cython}
66 %{?with_python3:BuildRequires: python3-Cython}
67 %{?with_java:BuildRequires: rpm-javaprov}
68 %{?with_python:BuildRequires: rpm-pythonprov}
69 BuildRequires: rpmbuild(macros) >= 1.714
70 BuildRequires: sed >= 4.0
71 %{?with_speech_dispatcher:BuildRequires: speech-dispatcher-devel >= 0.8}
72 BuildRequires: systemd-devel
73 BuildRequires: tar >= 1:1.22
74 %{?with_tcl:BuildRequires: tcl-devel >= 8.5}
76 BuildRequires: xorg-lib-libX11-devel
77 BuildRequires: xorg-lib-libXaw-devel
78 BuildRequires: xorg-lib-libXext-devel
79 BuildRequires: xorg-lib-libXfixes-devel
80 BuildRequires: xorg-lib-libXt-devel
81 BuildRequires: xorg-lib-libXtst-devel
83 #%{?with_mikropuhe:BuildRequires: Mikropuhe-devel (-lmikropuhe <mpwrfile.h>)}
84 #%{?with_swift:BuildRequires: Swift-devel (-lswift <swift.h>)}
85 #%{?with_theta:BuildRequires: Theta-devel (-ltheta <theta.h>)}
86 #%{?with_viavoice:BuildRequires: ViaVoice-devel (-libmeci50 <eci.h>)}
88 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91 BRLTTY is a background process (daemon) which provides access to the
92 Linux/Unix console (when in text mode) for a blind person using a
93 refreshable Braille display. It drives the Braille display, and
94 provides complete screen review functionality. Some speech capability
95 has also been incorporated.
97 %description -l pl.UTF-8
98 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
99 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
100 odświeżaniem (refreshable Braille display). BRLTTY steruje
101 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
102 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
106 Summary: Application Programming Interface for BRLTTY
107 Summary(pl.UTF-8): API do BRLTTY
111 %description -n brlapi
112 This package provides the run-time support for the Application
113 Programming Interface to BRLTTY.
115 Install this package if you have an application which directly
116 accesses a refreshable Braille display.
118 %description -n brlapi -l pl.UTF-8
119 Ten pakiet zawiera środowisko uruchomieniowe dla programów
120 korzystających z API BRLTTY.
122 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
123 wyświetlacza Braille'a z odświeżaniem.
125 %package -n brlapi-devel
126 Summary: Headers and documentation for BrlAPI
127 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
129 Group: Development/Libraries
130 Requires: brlapi = %{version}-%{release}
132 %description -n brlapi-devel
133 This package provides the header files, shared object linker
134 reference, and reference documentation for BrlAPI (the Application
135 Programming Interface to BRLTTY). It enables the implementation of
136 applications which take direct advantage of a refreshable Braille
137 display in order to present information in ways which are more
138 appropriate for blind users and/or to provide user interfaces which
139 are more specifically atuned to their needs.
141 Install this package if you're developing or maintaining an
142 application which directly accesses a refreshable Braille display.
144 %description -n brlapi-devel -l pl.UTF-8
145 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
146 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
147 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
148 bardziej przystosowany dla osób niewidomych.
150 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
151 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
153 %package -n brlapi-static
154 Summary: Static BrlAPI library
155 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
157 Group: Development/Libraries
158 Requires: brlapi-devel = %{version}-%{release}
160 %description -n brlapi-static
161 This is package with static BrlAPI library.
163 %description -n brlapi-static -l pl.UTF-8
164 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
166 %package -n brlapi-apidocs
167 Summary: BrlAPI documentation
168 Summary(pl.UTF-8): Documentacja BrlAPI
172 %description -n brlapi-apidocs
173 Documentation for BrlAPI in HTML format generated from brltty sources
176 %description -n brlapi-apidocs -l pl.UTF-8
177 Dokumentacja BrlAPI w formacie HTML generowane ze źrodeł brltty przez
180 %package -n java-brlapi
181 Summary: BrlAPI library for Java
182 Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
185 Requires: brlapi = %{version}-%{release}
187 %description -n java-brlapi
188 BrlAPI library for Java.
190 %description -n java-brlapi -l pl.UTF-8
191 Biblioteka BrlAPI dla Javy.
193 %package -n ocaml-brlapi
194 Summary: OCaml binding for BrlAPI
195 Summary(pl.UTF-8): Wiązania OCamla do BrlAPI
198 Requires: brlapi = %{version}-%{release}
199 %requires_eq ocaml-runtime
201 %description -n ocaml-brlapi
202 OCaml binding for BrlAPI.
204 %description -n ocaml-brlapi -l pl.UTF-8
205 Wiązania OCamla do BrlAPI.
207 %package -n ocaml-brlapi-devel
208 Summary: OCaml binding for BrlAPI - development files
209 Summary(pl.UTF-8): Wiązania OCamla do BrlAPI - pliki programistyczne
212 Requires: ocaml-brlapi = %{version}-%{release}
215 %description -n ocaml-brlapi-devel
216 OCaml binding for BrlAPI - development files.
218 %description -n ocaml-brlapi-devel -l pl.UTF-8
219 Wiązania OCamla do BrlAPI - pliki programistyczne.
221 %package -n python-brlapi
222 Summary: Python 2.x interface to BrlAPI
223 Summary(pl.UTF-8): Interfejs Pythona 2.x do BrlAPI
226 Requires: brlapi = %{version}-%{release}
228 %description -n python-brlapi
229 Python 2.x interface to BrlAPI.
231 %description -n python-brlapi -l pl.UTF-8
232 Interfejs Pythona 2.x do BrlAPI.
234 %package -n python3-brlapi
235 Summary: Python 3.x interface to BrlAPI
236 Summary(pl.UTF-8): Interfejs Pythona 3.x do BrlAPI
239 Requires: brlapi = %{version}-%{release}
241 %description -n python3-brlapi
242 Python 3.x interface to BrlAPI.
244 %description -n python3-brlapi -l pl.UTF-8
245 Interfejs Pythona 3.x do BrlAPI.
247 %package -n brlapi-tcl
248 Summary: BrlAPI library for Tcl
249 Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl
252 Requires: brlapi = %{version}-%{release}
254 %description -n brlapi-tcl
255 BrlAPI library for Tcl.
257 %description -n brlapi-tcl -l pl.UTF-8
258 Biblioteka BrlAPI dla Tcl.
266 %{__sed} -i -e '1s,/usr/bin/python$,%{__python},' Tables/Contraction/latex-access.ctb
271 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
273 %{?with_java:JAVA_HOME=%{java_home}} \
274 --with-install-root="$RPM_BUILD_ROOT" \
275 %{!?with_libbraille:--without-libbraille} \
276 %{!?with_espeak:--without-espeak} \
277 %{!?with_espeak_ng:--without-espeak_ng} \
278 %{!?with_flite:--without-flite} \
279 %{!?with_speech_dispatcher:--without-speechd} \
280 %{!?with_ocaml:--disable-caml-bindings} \
281 %{!?with_gpm:--disable-gpm} \
282 %{!?with_java:--disable-java-bindings} \
283 %{!?with_liblouis:--disable-liblouis} \
284 --enable-lisp-bindings \
285 %{!?with_python:--disable-python-bindings} \
286 %{!?with_tcl:--disable-tcl-bindings} \
287 %{!?with_x:--disable-x} \
305 rm -rf $RPM_BUILD_ROOT
307 %{__make} -j1 install install-appstream \
308 OCAML_INSTALL_TARGET=install-without-findlib
310 # findlib-specific, useless in rpm
311 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so.owner
325 %if "%{_lib}" != "lib"
326 # Fix java plugin install path on 64-bit archs
327 install -d $RPM_BUILD_ROOT%{_libdir}/java
328 %{__mv} $RPM_BUILD_ROOT%{_prefix}/{lib,%{_lib}}/java/libbrlapi_java.so
331 install Bootdisks/bp2cf $RPM_BUILD_ROOT%{_bindir}/brltty-bp2cf
332 cp -p Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
334 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
335 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/brltty.conf <<EOF
336 d /var/run/brltty 0755 root root -
339 # no sign in source wheter it is zh_CN or zh_TW
340 # but seems to contain Traditional Chinese characters
341 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{zh,zh_TW}
346 rm -rf $RPM_BUILD_ROOT
349 # The pre-install scriptlet.
351 # If a configuration file already exists then rpm installs the new one as
352 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
355 # There's no explicit way to tell if a configuration file has been installed
356 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
357 # erasing the .rpmnew file now so that we can see if it gets created later.
358 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
361 # If BRLTTY's boot parameter has been specified then update the just installed
362 # configuration file template to reflect the options supplied thereby.
364 # First, we need to determine which file to update. If there's a .rpmnew file
365 # then update it since a previous configuration file must already have existed.
366 file="%{_sysconfdir}/brltty.conf"
368 [ -f "${new}" ] && file="${new}"
370 # Update the configuration file template via the Bootdisks/bp2cf script.
371 %{_bindir}/brltty-bp2cf -u -f "${file}" >/dev/null 2>&1 || :
373 %post -n brlapi -p /sbin/ldconfig
374 %postun -n brlapi -p /sbin/ldconfig
376 %files -f %{name}.lang
377 %defattr(644,root,root,755)
378 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
379 %attr(755,root,root) %{_bindir}/brltty
380 %attr(755,root,root) %{_bindir}/brltty-atb
381 %attr(755,root,root) %{_bindir}/brltty-bp2cf
382 %attr(755,root,root) %{_bindir}/brltty-config
383 %attr(755,root,root) %{_bindir}/brltty-clip
384 %attr(755,root,root) %{_bindir}/brltty-cldr
385 %attr(755,root,root) %{_bindir}/brltty-ctb
386 %attr(755,root,root) %{_bindir}/brltty-ktb
387 %attr(755,root,root) %{_bindir}/brltty-lscmds
388 %attr(755,root,root) %{_bindir}/brltty-lsinc
389 %attr(755,root,root) %{_bindir}/brltty-morse
390 %attr(755,root,root) %{_bindir}/brltty-trtxt
391 %attr(755,root,root) %{_bindir}/brltty-ttb
392 %attr(755,root,root) %{_bindir}/brltty-tune
393 %attr(755,root,root) %{_bindir}/eutp
394 %attr(755,root,root) %{_bindir}/vstp
395 %{?with_x:%attr(755,root,root) %{_bindir}/xbrlapi}
396 %dir %{_libdir}/brltty
398 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
399 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
400 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
401 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbc.so
402 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
403 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbg.so
404 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
405 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
406 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
407 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
408 %attr(755,root,root) %{_libdir}/brltty/libbrlttybce.so
409 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcn.so
410 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
411 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
412 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
413 %attr(755,root,root) %{_libdir}/brltty/libbrlttybhd.so
414 %attr(755,root,root) %{_libdir}/brltty/libbrlttybhm.so
415 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
416 %attr(755,root,root) %{_libdir}/brltty/libbrlttybhw.so
417 %attr(755,root,root) %{_libdir}/brltty/libbrlttybic.so
418 %attr(755,root,root) %{_libdir}/brltty/libbrlttybir.so
419 %{?with_libbraille:%attr(755,root,root) %{_libdir}/brltty/libbrlttyblb.so}
420 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
421 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
422 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
423 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmm.so
424 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
425 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmt.so
426 %attr(755,root,root) %{_libdir}/brltty/libbrlttybnp.so
427 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpg.so
428 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
429 %attr(755,root,root) %{_libdir}/brltty/libbrlttybsk.so
430 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
431 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
432 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
433 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
434 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
435 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
436 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
437 %{?with_x:%attr(755,root,root) %{_libdir}/brltty/libbrlttybxw.so}
438 # speech synthesizer drivers
439 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
440 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
441 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
442 %{?with_espeak_ng:%attr(755,root,root) %{_libdir}/brltty/libbrlttysen.so}
443 %{?with_espeak:%attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so}
444 %{?with_flite:%attr(755,root,root) %{_libdir}/brltty/libbrlttysfl.so}
445 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
446 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
447 %{?with_mikropuhe:%attr(755,root,root) %{_libdir}/brltty/libbrlttysmp.so}
448 %{?with_speech_dispatcher:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssd.so}
449 %{?with_swift:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssw.so}
450 %{?with_theta:%attr(755,root,root) %{_libdir}/brltty/libbrlttysth.so}
451 %{?with_viavoice:%attr(755,root,root) %{_libdir}/brltty/libbrlttysvv.so}
452 %attr(755,root,root) %{_libdir}/brltty/libbrlttysxs.so
454 %{?with_at_spi2:%attr(755,root,root) %{_libdir}/brltty/libbrlttyxa2.so}
455 %{?with_at_spi:%attr(755,root,root) %{_libdir}/brltty/libbrlttyxas.so}
456 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
457 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
458 %{_sysconfdir}/brltty
459 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
460 %{systemdtmpfilesdir}/brltty.conf
463 %{_mandir}/man1/brltty.1*
464 %{_mandir}/man1/eutp.1*
465 %{_mandir}/man1/vstp.1*
466 %{?with_x:%{_mandir}/man1/xbrlapi.1*}
469 # gdm autostart - subpackage?
470 #%{_datadir}/gdm/greeter/autostart/xbrlapi.desktop
471 #/etc/X11/Xsession.d/90xbrlapi
472 %{_datadir}/metainfo/org.a11y.brltty.metainfo.xml
474 %{_datadir}/polkit-1/actions/org.a11y.brlapi.policy
477 %defattr(644,root,root,755)
478 %attr(755,root,root) %{_libdir}/libbrlapi.so.*.*.*
479 %attr(755,root,root) %ghost %{_libdir}/libbrlapi.so.0.8
481 %files -n brlapi-devel
482 %defattr(644,root,root,755)
483 %doc Documents/Manual-BrlAPI/English/BrlAPI*
484 %attr(755,root,root) %{_libdir}/libbrlapi.so
485 %{_includedir}/brltty
486 %{_includedir}/brlapi*.h
487 %{_mandir}/man3/brlapi_*.3*
489 %files -n brlapi-static
490 %defattr(644,root,root,755)
491 %{_libdir}/libbrlapi.a
494 %files -n brlapi-apidocs
495 %defattr(644,root,root,755)
496 %doc Documents/BrlAPIref/html/*
500 %files -n java-brlapi
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/java/libbrlapi_java.so
503 %{_javadir}/brlapi.jar
507 %files -n ocaml-brlapi
508 %defattr(644,root,root,755)
509 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so
511 %files -n ocaml-brlapi-devel
512 %defattr(644,root,root,755)
513 %dir %{_libdir}/ocaml/brlapi
514 %{_libdir}/ocaml/brlapi/META
515 %{_libdir}/ocaml/brlapi/brlapi.cm[aix]*
516 %{_libdir}/ocaml/brlapi/brlapi.mli
517 %{_libdir}/ocaml/brlapi/libbrlapi_stubs.a
521 %files -n python-brlapi
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{py_sitedir}/brlapi.so
524 %{py_sitedir}/Brlapi-%{brlapi_ver}-py*.egg-info
527 %files -n python3-brlapi
528 %defattr(644,root,root,755)
529 %attr(755,root,root) %{py3_sitedir}/brlapi.cpython-*.so
530 %{py3_sitedir}/Brlapi-%{brlapi_ver}-py*.egg-info
536 %defattr(644,root,root,755)
537 %dir %{_libdir}/brlapi-%{brlapi_ver}
538 %attr(755,root,root) %{_libdir}/brlapi-%{brlapi_ver}/libbrlapi_tcl.so
539 %{_libdir}/brlapi-%{brlapi_ver}/pkgIndex.tcl