]> git.pld-linux.org Git - packages/brltty.git/blame - brltty.spec
BR: rpmbuild(macros) >= 1.710
[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
ca14117d 31Release: 8
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/
e25ac783 40BuildRequires: rpmbuild(macros) >= 1.710
82b1c71c
JB
41BuildRequires: alsa-lib-devel
42%{?with_at_spi:BuildRequires: at-spi-devel}
42577d78 43BuildRequires: autoconf >= 2.62
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}
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}
295e8be4
JB
65BuildRequires: tar >= 1:1.22
66%{?with_tcl:BuildRequires: tcl-devel >= 8.5}
82b1c71c
JB
67%if %{with x}
68BuildRequires: xorg-lib-libX11-devel
69BuildRequires: xorg-lib-libXaw-devel
70BuildRequires: xorg-lib-libXext-devel
71BuildRequires: xorg-lib-libXt-devel
72BuildRequires: xorg-lib-libXtst-devel
73%endif
295e8be4 74BuildRequires: xz
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>)}
91162002 79BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80
81%description
82BRLTTY is a background process (daemon) which provides access to the
83Linux/Unix console (when in text mode) for a blind person using a
33e3c5f9 84refreshable Braille display. It drives the Braille display, and
3b0ec988 85provides complete screen review functionality. Some speech capability
91162002 86has also been incorporated.
87
54f59947
JR
88%description -l pl.UTF-8
89BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
90trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
91odświeżaniem (refreshable Braille display). BRLTTY steruje
92wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
93przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
9b20373a 94mowy.
91162002 95
96%package -n brlapi
9b20373a 97Summary: Application Programming Interface for BRLTTY
8731bfde 98Summary(pl.UTF-8): API do BRLTTY
3dcc4a01
JB
99License: LGPL v2.1+
100Group: Libraries
91162002 101
102%description -n brlapi
103This package provides the run-time support for the Application
104Programming Interface to BRLTTY.
105
9b20373a 106Install this package if you have an application which directly
107accesses a refreshable Braille display.
91162002 108
54f59947
JR
109%description -n brlapi -l pl.UTF-8
110Ten pakiet zawiera środowisko uruchomieniowe dla programów
111korzystających z API BRLTTY.
91162002 112
54f59947
JR
113Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
114wyświetlacza Braille'a z odświeżaniem.
91162002 115
116%package -n brlapi-devel
9b20373a 117Summary: Headers and documentation for BrlAPI
8731bfde 118Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
3dcc4a01 119License: LGPL v2.1+
3b0ec988 120Group: Development/Libraries
664a738b 121Requires: brlapi = %{version}-%{release}
91162002 122
123%description -n brlapi-devel
9b20373a 124This package provides the header files, shared object linker
125reference, and reference documentation for BrlAPI (the Application
3b0ec988 126Programming Interface to BRLTTY). It enables the implementation of
9b20373a 127applications which take direct advantage of a refreshable Braille
128display in order to present information in ways which are more
129appropriate for blind users and/or to provide user interfaces which
130are more specifically atuned to their needs.
91162002 131
3b0ec988 132Install this package if you're developing or maintaining an
133application which directly accesses a refreshable Braille display.
91162002 134
54f59947
JR
135%description -n brlapi-devel -l pl.UTF-8
136Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
137do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
138korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
139bardziej przystosowany dla osób niewidomych.
91162002 140
54f59947
JR
141Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
142korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
91162002 143
144%package -n brlapi-static
9b20373a 145Summary: Static BrlAPI library
8731bfde 146Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
3dcc4a01 147License: LGPL v2.1+
3b0ec988 148Group: Development/Libraries
664a738b 149Requires: brlapi-devel = %{version}-%{release}
91162002 150
151%description -n brlapi-static
9b20373a 152This is package with static BrlAPI library.
91162002 153
54f59947
JR
154%description -n brlapi-static -l pl.UTF-8
155Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
91162002 156
608626ec
SS
157%package -n brlapi-apidocs
158Summary: BrlAPI documentation
159Summary(pl.UTF-8): Documentacja BrlAPI
160Group: Documentation
161
162%description -n brlapi-apidocs
163Documentation for BrlAPI in HTML format generated from brltty
164sources by doxygen.
165
166%description -n brlapi-apidocs -l pl.UTF-8
167Dokumentacja BrlAPI w formacie HTML generowane ze
168źrodeł brltty przez doxygen.
169
332e4348 170%package -n java-brlapi
09255552
SS
171Summary: BrlAPI library for Java
172Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
3dcc4a01 173License: LGPL v2.1+
09255552
SS
174Group: Libraries
175Requires: brlapi = %{version}-%{release}
176
332e4348 177%description -n java-brlapi
09255552
SS
178BrlAPI library for Java.
179
332e4348 180%description -n java-brlapi -l pl.UTF-8
09255552
SS
181Biblioteka BrlAPI dla Javy.
182
82b1c71c
JB
183%package -n ocaml-brlapi
184Summary: OCaml binding for BrlAPI
185Summary(pl.UTF-8): Wiązania OCamla do BrlAPI
3dcc4a01 186License: LGPL v2.1+
82b1c71c
JB
187Group: Libraries
188Requires: brlapi = %{version}-%{release}
189%requires_eq ocaml-runtime
190
191%description -n ocaml-brlapi
192OCaml binding for BrlAPI.
193
194%description -n ocaml-brlapi -l pl.UTF-8
195Wiązania OCamla do BrlAPI.
196
197%package -n ocaml-brlapi-devel
198Summary: OCaml binding for BrlAPI - development files
199Summary(pl.UTF-8): Wiązania OCamla do BrlAPI - pliki programistyczne
3dcc4a01 200License: LGPL v2.1+
82b1c71c
JB
201Group: Libraries
202Requires: ocaml-brlapi = %{version}-%{release}
203%requires_eq ocaml
204
205%description -n ocaml-brlapi-devel
206OCaml binding for BrlAPI - development files.
207
208%description -n ocaml-brlapi-devel -l pl.UTF-8
209Wiązania OCamla do BrlAPI - pliki programistyczne.
210
0bb357f1 211%package -n python-brlapi
75f78027
JB
212Summary: Python 2.x interface to BrlAPI
213Summary(pl.UTF-8): Interfejs Pythona 2.x do BrlAPI
3dcc4a01 214License: LGPL v2.1+
0bb357f1
SS
215Group: Libraries
216Requires: brlapi = %{version}-%{release}
217
218%description -n python-brlapi
75f78027 219Python 2.x interface to BrlAPI.
0bb357f1
SS
220
221%description -n python-brlapi -l pl.UTF-8
75f78027
JB
222Interfejs Pythona 2.x do BrlAPI.
223
224%package -n python3-brlapi
225Summary: Python 3.x interface to BrlAPI
226Summary(pl.UTF-8): Interfejs Pythona 3.x do BrlAPI
227License: LGPL v2.1+
228Group: Libraries
229Requires: brlapi = %{version}-%{release}
230
231%description -n python3-brlapi
232Python 3.x interface to BrlAPI.
233
234%description -n python3-brlapi -l pl.UTF-8
235Interfejs Pythona 3.x do BrlAPI.
0bb357f1
SS
236
237%package -n brlapi-tcl
238Summary: BrlAPI library for Tcl
239Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl
3dcc4a01 240License: LGPL v2.1+
0bb357f1
SS
241Group: Libraries
242Requires: brlapi = %{version}-%{release}
243
244%description -n brlapi-tcl
245BrlAPI library for Tcl.
246
247%description -n brlapi-tcl -l pl.UTF-8
248Biblioteka BrlAPI dla Tcl.
249
91162002 250%prep
251%setup -q
6c9c25b1 252%patch0 -p1
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
75f78027
JB
276%if %{with python3}
277cd Bindings/Python
414dde53 278%py3_build \
75f78027
JB
279 -b build-3
280cd ../..
281%endif
282
91162002 283directory="doc"
284mkdir -p "$directory"
285for 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`
286do
9b20373a 287 mkdir -p "$directory/${file%/*}"
288 cp -rp "$file" "$directory/$file"
91162002 289done
290
291%install
292rm -rf $RPM_BUILD_ROOT
82b1c71c
JB
293
294%{__make} -j1 install \
295 OCAML_INSTALL_TARGET=install-without-findlib
296
4bef0dd9
JB
297# findlib-specific, useless in rpm
298%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so.owner
299
75f78027
JB
300%if %{with python3}
301cd Bindings/Python
302%{__python3} setup.py \
303 build \
304 -b build-3 \
305 install \
306 --optimize=2 \
307 --skip-build \
308 --root=$RPM_BUILD_ROOT
309cd ../..
310%endif
311
538473c2
JR
312%if %{_lib} != "lib"
313 # Fix java plugin install path on 64-bit archs
314 install -d $RPM_BUILD_ROOT%{_libdir}/java
315 %{__mv} $RPM_BUILD_ROOT%{_prefix}/{lib,%{_lib}}/java/libbrlapi_java.so
316%endif
317
3b0ec988 318install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
91162002 319
82b1c71c
JB
320install -d $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
321cat >$RPM_BUILD_ROOT/usr/lib/tmpfiles.d/brltty.conf <<EOF
322d /var/run/brltty 0755 root root -
323EOF
324
287defab
JR
325# no sign in source wheter it is zh_CN or zh_TW so just remove it
326%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh
327
295e8be4
JB
328%find_lang %{name}
329
91162002 330%clean
331rm -rf $RPM_BUILD_ROOT
332
333%pre
334# The pre-install scriptlet.
335
336# If a configuration file already exists then rpm installs the new one as
337# <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
338# already exists.
339
340# There's no explicit way to tell if a configuration file has been installed
341# as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
3b0ec988 342# erasing the .rpmnew file now so that we can see if it gets created later.
91162002 343rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
344
345%post
346# The post-install scriptlet.
347
348# If BRLTTY's boot parameter has been specified then update the just installed
349# configuration file template to reflect the options supplied thereby.
350
351# First, we need to determine which file to update. If there's a .rpmnew file
352# then update it since a previous configuration file must already have existed.
353file="%{_sysconfdir}/brltty.conf"
354new="${file}.rpmnew"
355[ -f "${new}" ] && file="${new}"
356
357# Update the configuration file template via the Bootdisks/bp2cf script.
358# Include it right within this scriptlet so that it needn't be installed.
359# Imbed it within a subshell to ensure that it won't impact this scriptlet.
360(
c247b245 361 # First, set bp2cf's command line arguments.
362 set -- -u -f "${file}"
91162002 363
364#!/bin/sh
365###############################################################################
366# BRLTTY - A background process providing access to the Linux console (when in
9b20373a 367# text mode) for a blind person using a refreshable Braille display.
91162002 368#
369# Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
370#
371# BRLTTY comes with ABSOLUTELY NO WARRANTY.
372#
373# This is free software, placed under the terms of the
374# GNU General Public License, as published by the Free Software
375# Foundation. Please see the file COPYING for details.
376#
377# Web Page: http://mielke.cc/brltty/
378#
379# This software is maintained by Dave Mielke <dave@mielke.cc>.
380###############################################################################
381
382# Convert the boot parameter to configuration file directives.
383# If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
384# If /proc is not mounted then use the brltty environment variable.
385# Invoke with -h for usage information.
386
387programName="${0##*/}"
388programMessage()
389{
c247b245 390 echo 2>&1 "${programName}: ${1}"
91162002 391}
392syntaxError()
393{
c247b245 394 programMessage "${1}"
395 exit 2
91162002 396}
397internalError()
398{
c247b245 399 programMessage "${1}"
400 exit 3
91162002 401}
402
403configurationFile=""
404requestedAction=create
405deviceTranslation=none
406requestedParameter=""
407OPTIND=1
408while getopts ":f:cundop:h" option
409do
c247b245 410 case "${option}" in
411 f) configurationFile="${OPTARG}";;
412 c) requestedAction=create;;
413 u) requestedAction=update;;
414 n) deviceTranslation=none;;
415 d) deviceTranslation=devfs;;
416 o) deviceTranslation=old;;
417 p) requestedParameter="${OPTARG}";;
418 h)
419 cat <<EOF
91162002 420Usage: ${programName} [option ...]
421-f file The configuration file to create/update.
422-c Create the configuration file (write to stdout if no -f).
423-u Update the configuration file (copying from stdin to stdout if no -f).
424-n Do not translate device paths.
425-d Do old-style to devfs device path translation.
426-o Do devfs to old-style device path translation.
427-p [driver][,[device][,[table]]]
428 Explicitly specify the boot parameter.
429-h Display this usage summary.
430EOF
c247b245 431 exit 0
432 ;;
433 \?) syntaxError "unknown option: -${OPTARG}";;
434 :) syntaxError "missing value: -${OPTARG}";;
435 *) internalError "unimplemented option: -${option}";;
436 esac
91162002 437done
438shift "`expr $OPTIND - 1`"
439[ "${#}" -eq 0 ] || syntaxError "too many parameters."
440
c247b245 441case "${requestedAction}" in
442 create)
443 putConfigurationLine()
444 {
445 echo "${1}" || exit 4
446 }
447 startConfigurationFile()
448 {
449 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
450 putConfigurationLine "`makeHeaderLine Created`"
451 putConfigurationLine "`makeParameterLine`"
452 putConfigurationLine ""
453 }
454 putConfigurationDirective()
455 {
456 putConfigurationLine "${1} ${2}"
457 }
458 finalizeConfigurationFile()
459 {
460 :
461 }
462 ;;
463 update)
464 putSedCommand()
465 {
466 sedScript="${sedScript}
91162002 467${1}"
c247b245 468 }
469 startConfigurationFile()
470 {
106ddbb5 471 if [ -n "${configurationFile}" ]; then
c247b245 472 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
473 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
474 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
475 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
476 outputFile="${configurationFile}.new"
477 exec <"${configurationFile}" >"${outputFile}"
478 fi
479 sedScript=""
480 putSedCommand "1i\\
91162002 481`makeHeaderLine Updated`\\
482`makeParameterLine`\\
483"
c247b245 484 }
485 putConfigurationDirective()
486 {
487 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
488 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
489 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
490 }
491 finalizeConfigurationFile()
492 {
493 sed -e "${sedScript}"
494 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
495 }
496 ;;
497 *) internalError "unimplemented action: ${requestedAction}";;
91162002 498esac
499
500translateDevice_none()
501{
c247b245 502 :
91162002 503}
504translateDevice_devfs()
505{
c247b245 506 minor="${device#ttyS}"
106ddbb5 507 if [ "${minor}" != "${device}" ]; then
c247b245 508 device="tts/${minor}"
509 return 0
510 fi
511 minor="${device#lp}"
106ddbb5 512 if [ "${minor}" != "${device}" ]; then
c247b245 513 device="printers/${minor}"
514 return 0
515 fi
516 programMessage "unsupported old-style device: ${device}"
91162002 517}
518translateDevice_old()
519{
c247b245 520 major="${device%%/*}"
106ddbb5 521 if [ "${major}" != "${device}" ]; then
c247b245 522 minor="${device#*/}"
523 case "${major}" in
524 tts) devfs="ttyS${minor}";;
525 printers) devfs="lp${minor}";;
526 esac
527 fi
106ddbb5 528 if [ -n "${devfs}" ]; then
c247b245 529 device="${devfs}"
530 else
531 programMessage "unsupported devfs device: ${device}"
532 fi
91162002 533}
534
535makeHeaderLine()
536{
c247b245 537 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
91162002 538}
539makeParameterLine()
540{
c247b245 541 echo "# Boot Parameter:${bootParameter}"
91162002 542}
543putConfigurationFile()
544{
c247b245 545 startConfigurationFile
546 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
547 [ -n "${brailleDevice}" ] && {
548 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
106ddbb5 549 if [ "${device#/}" = "${device}" ]; then
c247b245 550 translateDevice_${deviceTranslation}
551 fi
552 putConfigurationDirective "braille-device" "${device}"
553 }
554 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
555 finalizeConfigurationFile
91162002 556}
557parseBootParameter()
558{
c247b245 559 bootParameter="${bootParameter} ${1}"
560 number=1
106ddbb5 561 while [ "${number}" -le 3 ]; do
c247b245 562 cut="cut -d, -f${number}"
563 [ "${number}" -gt 1 ] && cut="${cut} -s"
564 operand="`echo ${1} | ${cut}`"
106ddbb5 565 if [ -n "${operand}" ]; then
c247b245 566 case "${number}" in
567 1) brailleDriver="${operand}";;
568 2) brailleDevice="${operand}";;
569 3) textTable="${operand}";;
570 esac
571 fi
572 number="`expr ${number} + 1`"
573 done
91162002 574}
575putBootParameter()
576{
c247b245 577 parseBootParameter "${1}"
578 putConfigurationFile
91162002 579}
580parseBootCommand()
581{
c247b245 582 found=false
106ddbb5 583 while [ "${#}" -gt 0 ]; do
c247b245 584 case "${1}" in
585 "brltty="*)
586 found=true
587 parseBootParameter "${1#*=}"
588 ;;
589 esac
590 shift
591 done
592 "${found}" && putConfigurationFile
91162002 593}
594
595brailleDriver=""
596brailleDevice=""
597textTable=""
598bootCommandFile="/proc/cmdline"
106ddbb5 599if [ -n "${requestedParameter}" ]; then
c247b245 600 putBootParameter "${requestedParameter}"
106ddbb5 601elif [ -f "${bootCommandFile}" ]; then
c247b245 602 parseBootCommand `cat "${bootCommandFile}"`
106ddbb5 603elif [ -n "${brltty}" ]; then
c247b245 604 putBootParameter "${brltty}"
91162002 605fi
606exit 0
607)
608
9b20373a 609%post -n brlapi -p /sbin/ldconfig
610%postun -n brlapi -p /sbin/ldconfig
91162002 611
295e8be4 612%files -f %{name}.lang
91162002 613%defattr(644,root,root,755)
c0ab824f 614%doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
935a2a62 615%doc doc/{Bindings,Bootdisks,Drivers,Patches,Tables,README}
91162002 616%attr(755,root,root) %{_bindir}/brltty
c0ab824f 617%attr(755,root,root) %{_bindir}/brltty-config
509de961 618%attr(755,root,root) %{_bindir}/brltty-ctb
509de961
JB
619%attr(755,root,root) %{_bindir}/brltty-trtxt
620%attr(755,root,root) %{_bindir}/brltty-ttb
295e8be4 621%attr(755,root,root) %{_bindir}/eutp
18f080b9 622%attr(755,root,root) %{_bindir}/vstp
eb77b64b 623%{?with_x:%attr(755,root,root) %{_bindir}/xbrlapi}
91162002 624%dir %{_libdir}/brltty
82b1c71c 625# Braille drivers
c0ab824f
SS
626%attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
627%attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
628%attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
82b1c71c 629%attr(755,root,root) %{_libdir}/brltty/libbrlttybbc.so
c0ab824f
SS
630%attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
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
82b1c71c
JB
684/usr/lib/tmpfiles.d/brltty.conf
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.162892 seconds and 4 git commands to generate.