]> git.pld-linux.org Git - packages/brltty.git/blame - brltty.spec
- release 2 (by relup.sh)
[packages/brltty.git] / brltty.spec
CommitLineData
3704768a 1# TODO:
e6a1be7c 2# - what is that huge %post script?
42577d78 3#
608626ec 4# Conditional build:
82b1c71c 5%bcond_without apidocs # documentation generated with doxygen
3dcc4a01 6%bcond_without java # Java bindings
82b1c71c
JB
7%bcond_without ocaml # OCaml bindings
8%bcond_without python # Python bindings
75f78027 9%bcond_without python3 # Python 3.x bindings
82b1c71c
JB
10%bcond_without tcl # Tcl bindings
11%bcond_without x # X11-based utilities
12%bcond_without gpm # mouse tracking via GPM
509de961 13%bcond_without libbraille # libbraille Braille driver
1db3af51 14%bcond_without liblouis # liblouis in-line contracted Braille support
82b1c71c 15%bcond_without espeak # eSpeak synthesizer driver
1db3af51 16%bcond_without espeak_ng # eSpeak-NG synthesizer driver
82b1c71c 17%bcond_without flite # Flite synthesizer driver
dfe38ff6 18%bcond_with mikropuhe # Mikropuhe synthesizer driver [commercial, Finnish]
82b1c71c 19%bcond_without speech_dispatcher # Speech Dispatcher synthesizer driver
dfe38ff6
JB
20%bcond_with swift # Swift synthesizer driver [commercial, from Cepstral]
21%bcond_with theta # Theta synthesizer driver [commercial, from Cepstral]
22%bcond_with viavoice # IBM ViaVoice synthesizer driver [commercial]
e4015245 23%bcond_with at_spi # AtSpi screen driver
509de961 24%bcond_without at_spi2 # AtSpi2 screen driver
a8f3581f 25
1db3af51 26%define brlapi_ver 0.7.0
332e4348 27%include /usr/lib/rpm/macros.java
9b20373a 28Summary: Braille display driver for Linux/Unix
8731bfde 29Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
91162002 30Name: brltty
1db3af51 31Version: 6.0
f864b533 32Release: 2
3dcc4a01 33License: GPL v2+ (brltty and drivers), LGPL v2.1+ (APIs)
a8f3581f 34Group: Daemons
295e8be4 35Source0: http://mielke.cc/brltty/archive/%{name}-%{version}.tar.xz
1db3af51 36# Source0-md5: feca8c2f22b13a4c67b1366191033c0e
ad027d08
JB
37Patch1: %{name}-speech-dispatcher.patch
38Patch2: %{name}-python.patch
0285055e 39Patch4: %{name}-glibc25.patch
1a7665e9 40URL: http://mielke.cc/brltty/
82b1c71c
JB
41BuildRequires: alsa-lib-devel
42%{?with_at_spi:BuildRequires: at-spi-devel}
c80b057e 43BuildRequires: autoconf >= 2.64
664a738b 44BuildRequires: automake
91162002 45BuildRequires: bison
82b1c71c
JB
46# just headers
47BuildRequires: bluez-libs-devel
48%{?with_at_spi2:BuildRequires: dbus-devel >= 1.0}
608626ec 49%{?with_apidocs:BuildRequires: doxygen}
ed3025fe 50%{?with_espeak:BuildRequires: espeak-devel}
1db3af51
JB
51%{?with_espeak_ng:BuildRequires: espeak-ng-devel}
52BuildRequires: expat-devel
dfe38ff6 53%{?with_flite:BuildRequires: flite-devel}
1db3af51 54BuildRequires: gettext-tools
82b1c71c 55%{?with_gpm:BuildRequires: gpm-devel}
09255552 56%{?with_java:BuildRequires: jdk}
0b1afa7b 57%{?with_java:BuildRequires: jpackage-utils}
dfe38ff6 58%{?with_libbraille:BuildRequires: libbraille-devel}
82b1c71c 59BuildRequires: libicu-devel
1db3af51 60%{?with_liblouis:BuildRequires: liblouis-devel}
eb77b64b 61BuildRequires: ncurses-devel
6913fe15 62%{?with_ocaml:BuildRequires: ocaml}
ac744b8d 63BuildRequires: pkgconfig
1db3af51 64BuildRequires: polkit-devel
295e8be4 65%{?with_python:BuildRequires: python-Cython}
75f78027 66%{?with_python3:BuildRequires: python3-Cython}
332e4348 67%{?with_java:BuildRequires: rpm-javaprov}
0bb357f1 68%{?with_python:BuildRequires: rpm-pythonprov}
1db3af51 69BuildRequires: rpmbuild(macros) >= 1.710
0b1afa7b 70%{?with_speech_dispatcher:BuildRequires: speech-dispatcher-devel >= 0.8}
3bb421f0 71BuildRequires: systemd-devel
295e8be4
JB
72BuildRequires: tar >= 1:1.22
73%{?with_tcl:BuildRequires: tcl-devel >= 8.5}
82b1c71c
JB
74%if %{with x}
75BuildRequires: xorg-lib-libX11-devel
76BuildRequires: xorg-lib-libXaw-devel
77BuildRequires: xorg-lib-libXext-devel
78BuildRequires: xorg-lib-libXt-devel
79BuildRequires: xorg-lib-libXtst-devel
80%endif
dfe38ff6
JB
81#%{?with_mikropuhe:BuildRequires: Mikropuhe-devel (-lmikropuhe <mpwrfile.h>)}
82#%{?with_swift:BuildRequires: Swift-devel (-lswift <swift.h>)}
83#%{?with_theta:BuildRequires: Theta-devel (-ltheta <theta.h>)}
84#%{?with_viavoice:BuildRequires: ViaVoice-devel (-libmeci50 <eci.h>)}
a8f3581f 85BuildRequires: xz
91162002 86BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
87
88%description
89BRLTTY is a background process (daemon) which provides access to the
90Linux/Unix console (when in text mode) for a blind person using a
33e3c5f9 91refreshable Braille display. It drives the Braille display, and
3b0ec988 92provides complete screen review functionality. Some speech capability
91162002 93has also been incorporated.
94
54f59947
JR
95%description -l pl.UTF-8
96BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
97trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
98odświeżaniem (refreshable Braille display). BRLTTY steruje
99wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
100przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
9b20373a 101mowy.
91162002 102
103%package -n brlapi
9b20373a 104Summary: Application Programming Interface for BRLTTY
8731bfde 105Summary(pl.UTF-8): API do BRLTTY
3dcc4a01
JB
106License: LGPL v2.1+
107Group: Libraries
91162002 108
109%description -n brlapi
110This package provides the run-time support for the Application
111Programming Interface to BRLTTY.
112
9b20373a 113Install this package if you have an application which directly
114accesses a refreshable Braille display.
91162002 115
54f59947
JR
116%description -n brlapi -l pl.UTF-8
117Ten pakiet zawiera środowisko uruchomieniowe dla programów
118korzystających z API BRLTTY.
91162002 119
54f59947
JR
120Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
121wyświetlacza Braille'a z odświeżaniem.
91162002 122
123%package -n brlapi-devel
9b20373a 124Summary: Headers and documentation for BrlAPI
8731bfde 125Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
3dcc4a01 126License: LGPL v2.1+
3b0ec988 127Group: Development/Libraries
664a738b 128Requires: brlapi = %{version}-%{release}
91162002 129
130%description -n brlapi-devel
9b20373a 131This package provides the header files, shared object linker
132reference, and reference documentation for BrlAPI (the Application
3b0ec988 133Programming Interface to BRLTTY). It enables the implementation of
9b20373a 134applications which take direct advantage of a refreshable Braille
135display in order to present information in ways which are more
136appropriate for blind users and/or to provide user interfaces which
137are more specifically atuned to their needs.
91162002 138
3b0ec988 139Install this package if you're developing or maintaining an
140application which directly accesses a refreshable Braille display.
91162002 141
54f59947
JR
142%description -n brlapi-devel -l pl.UTF-8
143Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
144do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
145korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
146bardziej przystosowany dla osób niewidomych.
91162002 147
54f59947
JR
148Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
149korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
91162002 150
151%package -n brlapi-static
9b20373a 152Summary: Static BrlAPI library
8731bfde 153Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
3dcc4a01 154License: LGPL v2.1+
3b0ec988 155Group: Development/Libraries
664a738b 156Requires: brlapi-devel = %{version}-%{release}
91162002 157
158%description -n brlapi-static
9b20373a 159This is package with static BrlAPI library.
91162002 160
54f59947
JR
161%description -n brlapi-static -l pl.UTF-8
162Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
91162002 163
608626ec
SS
164%package -n brlapi-apidocs
165Summary: BrlAPI documentation
166Summary(pl.UTF-8): Documentacja BrlAPI
167Group: Documentation
a8f3581f
ER
168%if "%{_rpmversion}" >= "5"
169BuildArch: noarch
170%endif
608626ec
SS
171
172%description -n brlapi-apidocs
a8f3581f
ER
173Documentation for BrlAPI in HTML format generated from brltty sources
174by doxygen.
608626ec
SS
175
176%description -n brlapi-apidocs -l pl.UTF-8
a8f3581f
ER
177Dokumentacja BrlAPI w formacie HTML generowane ze źrodeł brltty przez
178doxygen.
608626ec 179
332e4348 180%package -n java-brlapi
09255552
SS
181Summary: BrlAPI library for Java
182Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
3dcc4a01 183License: LGPL v2.1+
09255552
SS
184Group: Libraries
185Requires: brlapi = %{version}-%{release}
186
332e4348 187%description -n java-brlapi
09255552
SS
188BrlAPI library for Java.
189
332e4348 190%description -n java-brlapi -l pl.UTF-8
09255552
SS
191Biblioteka BrlAPI dla Javy.
192
82b1c71c
JB
193%package -n ocaml-brlapi
194Summary: OCaml binding for BrlAPI
195Summary(pl.UTF-8): Wiązania OCamla do BrlAPI
3dcc4a01 196License: LGPL v2.1+
82b1c71c
JB
197Group: Libraries
198Requires: brlapi = %{version}-%{release}
199%requires_eq ocaml-runtime
200
201%description -n ocaml-brlapi
202OCaml binding for BrlAPI.
203
204%description -n ocaml-brlapi -l pl.UTF-8
205Wiązania OCamla do BrlAPI.
206
207%package -n ocaml-brlapi-devel
208Summary: OCaml binding for BrlAPI - development files
209Summary(pl.UTF-8): Wiązania OCamla do BrlAPI - pliki programistyczne
3dcc4a01 210License: LGPL v2.1+
82b1c71c
JB
211Group: Libraries
212Requires: ocaml-brlapi = %{version}-%{release}
213%requires_eq ocaml
214
215%description -n ocaml-brlapi-devel
216OCaml binding for BrlAPI - development files.
217
218%description -n ocaml-brlapi-devel -l pl.UTF-8
219Wiązania OCamla do BrlAPI - pliki programistyczne.
220
0bb357f1 221%package -n python-brlapi
75f78027
JB
222Summary: Python 2.x interface to BrlAPI
223Summary(pl.UTF-8): Interfejs Pythona 2.x do BrlAPI
3dcc4a01 224License: LGPL v2.1+
0bb357f1
SS
225Group: Libraries
226Requires: brlapi = %{version}-%{release}
227
228%description -n python-brlapi
75f78027 229Python 2.x interface to BrlAPI.
0bb357f1
SS
230
231%description -n python-brlapi -l pl.UTF-8
75f78027
JB
232Interfejs Pythona 2.x do BrlAPI.
233
234%package -n python3-brlapi
235Summary: Python 3.x interface to BrlAPI
236Summary(pl.UTF-8): Interfejs Pythona 3.x do BrlAPI
237License: LGPL v2.1+
238Group: Libraries
239Requires: brlapi = %{version}-%{release}
240
241%description -n python3-brlapi
242Python 3.x interface to BrlAPI.
243
244%description -n python3-brlapi -l pl.UTF-8
245Interfejs Pythona 3.x do BrlAPI.
0bb357f1
SS
246
247%package -n brlapi-tcl
248Summary: BrlAPI library for Tcl
249Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl
3dcc4a01 250License: LGPL v2.1+
0bb357f1
SS
251Group: Libraries
252Requires: brlapi = %{version}-%{release}
253
254%description -n brlapi-tcl
255BrlAPI library for Tcl.
256
257%description -n brlapi-tcl -l pl.UTF-8
258Biblioteka BrlAPI dla Tcl.
259
91162002 260%prep
261%setup -q
0b1afa7b
JB
262%patch1 -p1
263%patch2 -p1
0285055e 264%patch4 -p1
91162002 265
266%build
0b1afa7b 267%{__autoconf}
915167f5 268CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
664a738b 269%configure \
0b1afa7b 270 %{?with_java:JAVA_HOME=%{java_home}} \
664a738b 271 --with-install-root="$RPM_BUILD_ROOT" \
509de961 272 %{!?with_libbraille:--without-libbraille} \
82b1c71c 273 %{!?with_espeak:--without-espeak} \
1db3af51 274 %{!?with_espeak_ng:--without-espeak_ng} \
82b1c71c
JB
275 %{!?with_flite:--without-flite} \
276 %{!?with_speech_dispatcher:--without-speechd} \
277 %{!?with_ocaml:--disable-caml-bindings} \
278 %{!?with_gpm:--disable-gpm} \
f50dc761 279 %{!?with_java:--disable-java-bindings} \
1db3af51
JB
280 %{!?with_liblouis:--disable-liblouis} \
281 --enable-lisp-bindings \
82b1c71c
JB
282 %{!?with_python:--disable-python-bindings} \
283 %{!?with_tcl:--disable-tcl-bindings} \
284 %{!?with_x:--disable-x} \
91162002 285 --enable-api
245bd38d
JR
286
287%{__make} -j1
91162002 288
850bcb5b
JR
289%if %{with python}
290cd Bindings/Python
291%py_build
292cd ../..
293%endif
294
75f78027
JB
295%if %{with python3}
296cd Bindings/Python
850bcb5b 297%py3_build
75f78027
JB
298cd ../..
299%endif
300
91162002 301%install
302rm -rf $RPM_BUILD_ROOT
82b1c71c 303
1db3af51 304%{__make} -j1 install install-appstream \
82b1c71c
JB
305 OCAML_INSTALL_TARGET=install-without-findlib
306
4bef0dd9
JB
307# findlib-specific, useless in rpm
308%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so.owner
309
850bcb5b
JR
310%if %{with python}
311cd Bindings/Python
312%py_install
313cd ../..
314%endif
315
75f78027
JB
316%if %{with python3}
317cd Bindings/Python
850bcb5b 318%py3_install
75f78027
JB
319cd ../..
320%endif
321
538473c2
JR
322%if %{_lib} != "lib"
323 # Fix java plugin install path on 64-bit archs
324 install -d $RPM_BUILD_ROOT%{_libdir}/java
325 %{__mv} $RPM_BUILD_ROOT%{_prefix}/{lib,%{_lib}}/java/libbrlapi_java.so
326%endif
327
b25dee4e 328cp -p Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
91162002 329
b25dee4e
JR
330install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
331cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/brltty.conf <<EOF
82b1c71c
JB
332d /var/run/brltty 0755 root root -
333EOF
334
1db3af51
JB
335# no sign in source wheter it is zh_CN or zh_TW
336# but seems to contain Traditional Chinese characters
337%{__mv} $RPM_BUILD_ROOT%{_localedir}/{zh,zh_TW}
287defab 338
295e8be4
JB
339%find_lang %{name}
340
91162002 341%clean
342rm -rf $RPM_BUILD_ROOT
343
344%pre
345# The pre-install scriptlet.
346
347# If a configuration file already exists then rpm installs the new one as
348# <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
349# already exists.
350
351# There's no explicit way to tell if a configuration file has been installed
352# as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
3b0ec988 353# erasing the .rpmnew file now so that we can see if it gets created later.
91162002 354rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
355
356%post
357# The post-install scriptlet.
358
359# If BRLTTY's boot parameter has been specified then update the just installed
360# configuration file template to reflect the options supplied thereby.
361
362# First, we need to determine which file to update. If there's a .rpmnew file
363# then update it since a previous configuration file must already have existed.
364file="%{_sysconfdir}/brltty.conf"
365new="${file}.rpmnew"
366[ -f "${new}" ] && file="${new}"
367
368# Update the configuration file template via the Bootdisks/bp2cf script.
369# Include it right within this scriptlet so that it needn't be installed.
370# Imbed it within a subshell to ensure that it won't impact this scriptlet.
371(
c247b245 372 # First, set bp2cf's command line arguments.
373 set -- -u -f "${file}"
91162002 374
375#!/bin/sh
376###############################################################################
377# BRLTTY - A background process providing access to the Linux console (when in
9b20373a 378# text mode) for a blind person using a refreshable Braille display.
91162002 379#
380# Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
381#
382# BRLTTY comes with ABSOLUTELY NO WARRANTY.
383#
384# This is free software, placed under the terms of the
385# GNU General Public License, as published by the Free Software
386# Foundation. Please see the file COPYING for details.
387#
388# Web Page: http://mielke.cc/brltty/
389#
390# This software is maintained by Dave Mielke <dave@mielke.cc>.
391###############################################################################
392
393# Convert the boot parameter to configuration file directives.
394# If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
395# If /proc is not mounted then use the brltty environment variable.
396# Invoke with -h for usage information.
397
398programName="${0##*/}"
399programMessage()
400{
c247b245 401 echo 2>&1 "${programName}: ${1}"
91162002 402}
403syntaxError()
404{
c247b245 405 programMessage "${1}"
406 exit 2
91162002 407}
408internalError()
409{
c247b245 410 programMessage "${1}"
411 exit 3
91162002 412}
413
414configurationFile=""
415requestedAction=create
416deviceTranslation=none
417requestedParameter=""
418OPTIND=1
419while getopts ":f:cundop:h" option
420do
c247b245 421 case "${option}" in
422 f) configurationFile="${OPTARG}";;
423 c) requestedAction=create;;
424 u) requestedAction=update;;
425 n) deviceTranslation=none;;
426 d) deviceTranslation=devfs;;
427 o) deviceTranslation=old;;
428 p) requestedParameter="${OPTARG}";;
429 h)
430 cat <<EOF
91162002 431Usage: ${programName} [option ...]
432-f file The configuration file to create/update.
433-c Create the configuration file (write to stdout if no -f).
434-u Update the configuration file (copying from stdin to stdout if no -f).
435-n Do not translate device paths.
436-d Do old-style to devfs device path translation.
437-o Do devfs to old-style device path translation.
438-p [driver][,[device][,[table]]]
439 Explicitly specify the boot parameter.
440-h Display this usage summary.
441EOF
c247b245 442 exit 0
443 ;;
444 \?) syntaxError "unknown option: -${OPTARG}";;
445 :) syntaxError "missing value: -${OPTARG}";;
446 *) internalError "unimplemented option: -${option}";;
447 esac
91162002 448done
449shift "`expr $OPTIND - 1`"
450[ "${#}" -eq 0 ] || syntaxError "too many parameters."
451
c247b245 452case "${requestedAction}" in
453 create)
454 putConfigurationLine()
455 {
456 echo "${1}" || exit 4
457 }
458 startConfigurationFile()
459 {
460 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
461 putConfigurationLine "`makeHeaderLine Created`"
462 putConfigurationLine "`makeParameterLine`"
463 putConfigurationLine ""
464 }
465 putConfigurationDirective()
466 {
467 putConfigurationLine "${1} ${2}"
468 }
469 finalizeConfigurationFile()
470 {
471 :
472 }
473 ;;
474 update)
475 putSedCommand()
476 {
477 sedScript="${sedScript}
91162002 478${1}"
c247b245 479 }
480 startConfigurationFile()
481 {
106ddbb5 482 if [ -n "${configurationFile}" ]; then
c247b245 483 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
484 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
485 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
486 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
487 outputFile="${configurationFile}.new"
488 exec <"${configurationFile}" >"${outputFile}"
489 fi
490 sedScript=""
491 putSedCommand "1i\\
91162002 492`makeHeaderLine Updated`\\
493`makeParameterLine`\\
494"
c247b245 495 }
496 putConfigurationDirective()
497 {
498 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
499 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
500 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
501 }
502 finalizeConfigurationFile()
503 {
504 sed -e "${sedScript}"
505 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
506 }
507 ;;
508 *) internalError "unimplemented action: ${requestedAction}";;
91162002 509esac
510
511translateDevice_none()
512{
c247b245 513 :
91162002 514}
515translateDevice_devfs()
516{
c247b245 517 minor="${device#ttyS}"
106ddbb5 518 if [ "${minor}" != "${device}" ]; then
c247b245 519 device="tts/${minor}"
520 return 0
521 fi
522 minor="${device#lp}"
106ddbb5 523 if [ "${minor}" != "${device}" ]; then
c247b245 524 device="printers/${minor}"
525 return 0
526 fi
527 programMessage "unsupported old-style device: ${device}"
91162002 528}
529translateDevice_old()
530{
c247b245 531 major="${device%%/*}"
106ddbb5 532 if [ "${major}" != "${device}" ]; then
c247b245 533 minor="${device#*/}"
534 case "${major}" in
535 tts) devfs="ttyS${minor}";;
536 printers) devfs="lp${minor}";;
537 esac
538 fi
106ddbb5 539 if [ -n "${devfs}" ]; then
c247b245 540 device="${devfs}"
541 else
542 programMessage "unsupported devfs device: ${device}"
543 fi
91162002 544}
545
546makeHeaderLine()
547{
c247b245 548 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
91162002 549}
550makeParameterLine()
551{
c247b245 552 echo "# Boot Parameter:${bootParameter}"
91162002 553}
554putConfigurationFile()
555{
c247b245 556 startConfigurationFile
557 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
558 [ -n "${brailleDevice}" ] && {
559 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
106ddbb5 560 if [ "${device#/}" = "${device}" ]; then
c247b245 561 translateDevice_${deviceTranslation}
562 fi
563 putConfigurationDirective "braille-device" "${device}"
564 }
565 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
566 finalizeConfigurationFile
91162002 567}
568parseBootParameter()
569{
c247b245 570 bootParameter="${bootParameter} ${1}"
571 number=1
106ddbb5 572 while [ "${number}" -le 3 ]; do
c247b245 573 cut="cut -d, -f${number}"
574 [ "${number}" -gt 1 ] && cut="${cut} -s"
575 operand="`echo ${1} | ${cut}`"
106ddbb5 576 if [ -n "${operand}" ]; then
c247b245 577 case "${number}" in
578 1) brailleDriver="${operand}";;
579 2) brailleDevice="${operand}";;
580 3) textTable="${operand}";;
581 esac
582 fi
583 number="`expr ${number} + 1`"
584 done
91162002 585}
586putBootParameter()
587{
c247b245 588 parseBootParameter "${1}"
589 putConfigurationFile
91162002 590}
591parseBootCommand()
592{
c247b245 593 found=false
106ddbb5 594 while [ "${#}" -gt 0 ]; do
c247b245 595 case "${1}" in
596 "brltty="*)
597 found=true
598 parseBootParameter "${1#*=}"
599 ;;
600 esac
601 shift
602 done
603 "${found}" && putConfigurationFile
91162002 604}
605
606brailleDriver=""
607brailleDevice=""
608textTable=""
609bootCommandFile="/proc/cmdline"
106ddbb5 610if [ -n "${requestedParameter}" ]; then
c247b245 611 putBootParameter "${requestedParameter}"
106ddbb5 612elif [ -f "${bootCommandFile}" ]; then
c247b245 613 parseBootCommand `cat "${bootCommandFile}"`
106ddbb5 614elif [ -n "${brltty}" ]; then
c247b245 615 putBootParameter "${brltty}"
91162002 616fi
617exit 0
618)
619
9b20373a 620%post -n brlapi -p /sbin/ldconfig
621%postun -n brlapi -p /sbin/ldconfig
91162002 622
295e8be4 623%files -f %{name}.lang
91162002 624%defattr(644,root,root,755)
c0ab824f 625%doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
91162002 626%attr(755,root,root) %{_bindir}/brltty
c80b057e 627%attr(755,root,root) %{_bindir}/brltty-atb
c0ab824f 628%attr(755,root,root) %{_bindir}/brltty-config
1db3af51 629%attr(755,root,root) %{_bindir}/brltty-cldr
509de961 630%attr(755,root,root) %{_bindir}/brltty-ctb
c80b057e 631%attr(755,root,root) %{_bindir}/brltty-ktb
1db3af51
JB
632%attr(755,root,root) %{_bindir}/brltty-lscmds
633%attr(755,root,root) %{_bindir}/brltty-lsinc
634%attr(755,root,root) %{_bindir}/brltty-morse
509de961
JB
635%attr(755,root,root) %{_bindir}/brltty-trtxt
636%attr(755,root,root) %{_bindir}/brltty-ttb
c80b057e 637%attr(755,root,root) %{_bindir}/brltty-tune
295e8be4 638%attr(755,root,root) %{_bindir}/eutp
18f080b9 639%attr(755,root,root) %{_bindir}/vstp
eb77b64b 640%{?with_x:%attr(755,root,root) %{_bindir}/xbrlapi}
91162002 641%dir %{_libdir}/brltty
82b1c71c 642# Braille drivers
c0ab824f
SS
643%attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
644%attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
645%attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
82b1c71c 646%attr(755,root,root) %{_libdir}/brltty/libbrlttybbc.so
c0ab824f 647%attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
c80b057e 648%attr(755,root,root) %{_libdir}/brltty/libbrlttybbg.so
c0ab824f
SS
649%attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
650%attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
651%attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
652%attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
0b1afa7b 653%attr(755,root,root) %{_libdir}/brltty/libbrlttybce.so
c0ab824f
SS
654%attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
655%attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
656%attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
935a2a62 657%attr(755,root,root) %{_libdir}/brltty/libbrlttybhd.so
82b1c71c 658%attr(755,root,root) %{_libdir}/brltty/libbrlttybhm.so
c0ab824f 659%attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
509de961 660%attr(755,root,root) %{_libdir}/brltty/libbrlttybhw.so
1db3af51 661%attr(755,root,root) %{_libdir}/brltty/libbrlttybic.so
509de961
JB
662%attr(755,root,root) %{_libdir}/brltty/libbrlttybir.so
663%{?with_libbraille:%attr(755,root,root) %{_libdir}/brltty/libbrlttyblb.so}
c0ab824f
SS
664%attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
665%attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
666%attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
295e8be4 667%attr(755,root,root) %{_libdir}/brltty/libbrlttybmm.so
c0ab824f 668%attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
82b1c71c 669%attr(755,root,root) %{_libdir}/brltty/libbrlttybmt.so
509de961 670%attr(755,root,root) %{_libdir}/brltty/libbrlttybnp.so
82b1c71c 671%attr(755,root,root) %{_libdir}/brltty/libbrlttybpg.so
c0ab824f 672%attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
82b1c71c 673%attr(755,root,root) %{_libdir}/brltty/libbrlttybsk.so
c0ab824f
SS
674%attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
675%attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
676%attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
677%attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
678%attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
679%attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
680%attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
eb77b64b 681%{?with_x:%attr(755,root,root) %{_libdir}/brltty/libbrlttybxw.so}
82b1c71c 682# speech synthesizer drivers
c0ab824f
SS
683%attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
684%attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
685%attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
1db3af51 686%{?with_espeak_ng:%attr(755,root,root) %{_libdir}/brltty/libbrlttysen.so}
82b1c71c
JB
687%{?with_espeak:%attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so}
688%{?with_flite:%attr(755,root,root) %{_libdir}/brltty/libbrlttysfl.so}
c0ab824f
SS
689%attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
690%attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
dfe38ff6 691%{?with_mikropuhe:%attr(755,root,root) %{_libdir}/brltty/libbrlttysmp.so}
82b1c71c 692%{?with_speech_dispatcher:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssd.so}
dfe38ff6
JB
693%{?with_swift:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssw.so}
694%{?with_theta:%attr(755,root,root) %{_libdir}/brltty/libbrlttysth.so}
695%{?with_viavoice:%attr(755,root,root) %{_libdir}/brltty/libbrlttysvv.so}
b538cd8d 696%attr(755,root,root) %{_libdir}/brltty/libbrlttysxs.so
82b1c71c 697# screen drivers
681d76a3 698%{?with_at_spi2:%attr(755,root,root) %{_libdir}/brltty/libbrlttyxa2.so}
82b1c71c
JB
699%{?with_at_spi:%attr(755,root,root) %{_libdir}/brltty/libbrlttyxas.so}
700%attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
701%attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
91162002 702%{_sysconfdir}/brltty
1c33f0ca 703%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
a8f3581f 704%{systemdtmpfilesdir}/brltty.conf
82b1c71c
JB
705%dir /var/lib/BrlAPI
706%dir /var/run/brltty
c0ab824f 707%{_mandir}/man1/brltty.1*
295e8be4 708%{_mandir}/man1/eutp.1*
c0ab824f 709%{_mandir}/man1/vstp.1*
b538cd8d 710%{?with_x:%{_mandir}/man1/xbrlapi.1*}
91162002 711
295e8be4
JB
712%if %{with x}
713# gdm autostart - subpackage?
714#%{_datadir}/gdm/greeter/autostart/xbrlapi.desktop
f81ce4b6 715#/etc/X11/Xsession.d/60xbrlapi
b25dee4e 716%{_datadir}/metainfo/org.a11y.brltty.metainfo.xml
295e8be4 717%endif
b25dee4e 718%{_datadir}/polkit-1/actions/org.a11y.brlapi.policy
295e8be4 719
91162002 720%files -n brlapi
721%defattr(644,root,root,755)
82b1c71c 722%attr(755,root,root) %{_libdir}/libbrlapi.so.*.*.*
1db3af51 723%attr(755,root,root) %ghost %{_libdir}/libbrlapi.so.0.7
91162002 724
725%files -n brlapi-devel
726%defattr(644,root,root,755)
608626ec 727%doc Documents/Manual-BrlAPI/English/BrlAPI*
1c33f0ca 728%attr(755,root,root) %{_libdir}/libbrlapi.so
91162002 729%{_includedir}/brltty
18f080b9 730%{_includedir}/brlapi*.h
82b1c71c 731%{_mandir}/man3/brlapi_*.3*
91162002 732
733%files -n brlapi-static
734%defattr(644,root,root,755)
735%{_libdir}/libbrlapi.a
608626ec 736
09255552 737%if %{with apidocs}
608626ec
SS
738%files -n brlapi-apidocs
739%defattr(644,root,root,755)
740%doc Documents/BrlAPIref/html/*
09255552
SS
741%endif
742
743%if %{with java}
332e4348 744%files -n java-brlapi
09255552 745%defattr(644,root,root,755)
3dcc4a01 746%attr(755,root,root) %{_libdir}/java/libbrlapi_java.so
09255552
SS
747%{_javadir}/brlapi.jar
748%endif
0bb357f1 749
82b1c71c
JB
750%if %{with ocaml}
751%files -n ocaml-brlapi
752%defattr(644,root,root,755)
753%attr(755,root,root) %{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so
82b1c71c
JB
754
755%files -n ocaml-brlapi-devel
756%defattr(644,root,root,755)
757%dir %{_libdir}/ocaml/brlapi
758%{_libdir}/ocaml/brlapi/META
759%{_libdir}/ocaml/brlapi/brlapi.cm[aix]*
760%{_libdir}/ocaml/brlapi/brlapi.mli
761%{_libdir}/ocaml/brlapi/libbrlapi_stubs.a
762%endif
763
0bb357f1
SS
764%if %{with python}
765%files -n python-brlapi
766%defattr(644,root,root,755)
0bb357f1 767%attr(755,root,root) %{py_sitedir}/brlapi.so
509de961 768%{py_sitedir}/Brlapi-%{brlapi_ver}-py*.egg-info
75f78027
JB
769
770%if %{with python3}
771%files -n python3-brlapi
772%defattr(644,root,root,755)
773%attr(755,root,root) %{py3_sitedir}/brlapi.cpython-*.so
774%{py3_sitedir}/Brlapi-%{brlapi_ver}-py*.egg-info
775%endif
0bb357f1
SS
776%endif
777
778%if %{with tcl}
779%files -n brlapi-tcl
780%defattr(644,root,root,755)
509de961
JB
781%dir %{_libdir}/brlapi-%{brlapi_ver}
782%attr(755,root,root) %{_libdir}/brlapi-%{brlapi_ver}/libbrlapi_tcl.so
783%{_libdir}/brlapi-%{brlapi_ver}/pkgIndex.tcl
0bb357f1 784%endif
This page took 0.201451 seconds and 4 git commands to generate.