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