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