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