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