3 # - more packages (bindings)
4 # - ocaml bcond is useless now:
5 # Cannot find ocamlfind.
6 # BrlAPI Caml bindings will be compiled but not installed.
10 %bcond_without apidocs # documentation generated with doxygen
11 %bcond_with java # java bindings
12 %bcond_with ocaml # ocaml bindings (NFY)
14 Summary: Braille display driver for Linux/Unix
15 Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
21 URL: http://mielke.cc/brltty/
22 Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
23 # Source0-md5: 7ce54ba2d38b7c220870e8c781f36743
24 BuildRequires: autoconf >= 2.53
25 BuildRequires: automake
27 #BuildRequires: bluez-devel
28 %{?with_apidocs:BuildRequires: doxygen}
29 #BuildRequires: gpm-devel
30 %{?with_java:BuildRequires: jdk}
31 #BuildRequires: libusb-devel
32 #BuildRequires: ncurses-devel
33 %{?with_ocaml:BuildRequires: ocaml}
34 #BuildRequires: pkgconfig
35 #BuildRequires: python-devel
36 #BuildRequires: tcl-devel
37 #BuildRequires: xorg-lib-libX*
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 BRLTTY is a background process (daemon) which provides access to the
42 Linux/Unix console (when in text mode) for a blind person using a
43 refreshable Braille display. It drives the Braille display, and
44 provides complete screen review functionality. Some speech capability
45 has also been incorporated.
47 %description -l pl.UTF-8
48 BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
49 trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
50 odświeżaniem (refreshable Braille display). BRLTTY steruje
51 wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
52 przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
56 Summary: Application Programming Interface for BRLTTY
57 Summary(pl.UTF-8): API do BRLTTY
58 Group: Applications/System
60 %description -n brlapi
61 This package provides the run-time support for the Application
62 Programming Interface to BRLTTY.
64 Install this package if you have an application which directly
65 accesses a refreshable Braille display.
67 %description -n brlapi -l pl.UTF-8
68 Ten pakiet zawiera środowisko uruchomieniowe dla programów
69 korzystających z API BRLTTY.
71 Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
72 wyświetlacza Braille'a z odświeżaniem.
74 %package -n brlapi-devel
75 Summary: Headers and documentation for BrlAPI
76 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
77 Group: Development/Libraries
78 Requires: brlapi = %{version}-%{release}
80 %description -n brlapi-devel
81 This package provides the header files, shared object linker
82 reference, and reference documentation for BrlAPI (the Application
83 Programming Interface to BRLTTY). It enables the implementation of
84 applications which take direct advantage of a refreshable Braille
85 display in order to present information in ways which are more
86 appropriate for blind users and/or to provide user interfaces which
87 are more specifically atuned to their needs.
89 Install this package if you're developing or maintaining an
90 application which directly accesses a refreshable Braille display.
92 %description -n brlapi-devel -l pl.UTF-8
93 Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
94 do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
95 korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
96 bardziej przystosowany dla osób niewidomych.
98 Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
99 korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
101 %package -n brlapi-static
102 Summary: Static BrlAPI library
103 Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
104 Group: Development/Libraries
105 Requires: brlapi-devel = %{version}-%{release}
107 %description -n brlapi-static
108 This is package with static BrlAPI library.
110 %description -n brlapi-static -l pl.UTF-8
111 Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
113 %package -n brlapi-apidocs
114 Summary: BrlAPI documentation
115 Summary(pl.UTF-8): Documentacja BrlAPI
118 %description -n brlapi-apidocs
119 Documentation for BrlAPI in HTML format generated from brltty
122 %description -n brlapi-apidocs -l pl.UTF-8
123 Dokumentacja BrlAPI w formacie HTML generowane ze
124 źrodeł brltty przez doxygen.
126 %package -n brlapi-java
127 Summary: BrlAPI library for Java
128 Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy
130 Requires: brlapi = %{version}-%{release}
132 %description -n brlapi-java
133 BrlAPI library for Java.
135 %description -n brlapi-java -l pl.UTF-8
136 Biblioteka BrlAPI dla Javy.
144 cp -f /usr/share/automake/config.sub acdir
146 --with-install-root="$RPM_BUILD_ROOT" \
147 --disable-tainted-components \
152 mkdir -p "$directory"
153 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`
155 mkdir -p "$directory/${file%/*}"
156 cp -rp "$file" "$directory/$file"
160 rm -rf $RPM_BUILD_ROOT
162 install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
165 rm -rf $RPM_BUILD_ROOT
168 # The pre-install scriptlet.
170 # If a configuration file already exists then rpm installs the new one as
171 # <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
174 # There's no explicit way to tell if a configuration file has been installed
175 # as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
176 # erasing the .rpmnew file now so that we can see if it gets created later.
177 rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
180 # The post-install scriptlet.
182 # If BRLTTY's boot parameter has been specified then update the just installed
183 # configuration file template to reflect the options supplied thereby.
185 # First, we need to determine which file to update. If there's a .rpmnew file
186 # then update it since a previous configuration file must already have existed.
187 file="%{_sysconfdir}/brltty.conf"
189 [ -f "${new}" ] && file="${new}"
191 # Update the configuration file template via the Bootdisks/bp2cf script.
192 # Include it right within this scriptlet so that it needn't be installed.
193 # Imbed it within a subshell to ensure that it won't impact this scriptlet.
195 # First, set bp2cf's command line arguments.
196 set -- -u -f "${file}"
199 ###############################################################################
200 # BRLTTY - A background process providing access to the Linux console (when in
201 # text mode) for a blind person using a refreshable Braille display.
203 # Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
205 # BRLTTY comes with ABSOLUTELY NO WARRANTY.
207 # This is free software, placed under the terms of the
208 # GNU General Public License, as published by the Free Software
209 # Foundation. Please see the file COPYING for details.
211 # Web Page: http://mielke.cc/brltty/
213 # This software is maintained by Dave Mielke <dave@mielke.cc>.
214 ###############################################################################
216 # Convert the boot parameter to configuration file directives.
217 # If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
218 # If /proc is not mounted then use the brltty environment variable.
219 # Invoke with -h for usage information.
221 programName="${0##*/}"
224 echo 2>&1 "${programName}: ${1}"
228 programMessage "${1}"
233 programMessage "${1}"
238 requestedAction=create
239 deviceTranslation=none
240 requestedParameter=""
242 while getopts ":f:cundop:h" option
245 f) configurationFile="${OPTARG}";;
246 c) requestedAction=create;;
247 u) requestedAction=update;;
248 n) deviceTranslation=none;;
249 d) deviceTranslation=devfs;;
250 o) deviceTranslation=old;;
251 p) requestedParameter="${OPTARG}";;
254 Usage: ${programName} [option ...]
255 -f file The configuration file to create/update.
256 -c Create the configuration file (write to stdout if no -f).
257 -u Update the configuration file (copying from stdin to stdout if no -f).
258 -n Do not translate device paths.
259 -d Do old-style to devfs device path translation.
260 -o Do devfs to old-style device path translation.
261 -p [driver][,[device][,[table]]]
262 Explicitly specify the boot parameter.
263 -h Display this usage summary.
267 \?) syntaxError "unknown option: -${OPTARG}";;
268 :) syntaxError "missing value: -${OPTARG}";;
269 *) internalError "unimplemented option: -${option}";;
272 shift "`expr $OPTIND - 1`"
273 [ "${#}" -eq 0 ] || syntaxError "too many parameters."
275 case "${requestedAction}" in
277 putConfigurationLine()
279 echo "${1}" || exit 4
281 startConfigurationFile()
283 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
284 putConfigurationLine "`makeHeaderLine Created`"
285 putConfigurationLine "`makeParameterLine`"
286 putConfigurationLine ""
288 putConfigurationDirective()
290 putConfigurationLine "${1} ${2}"
292 finalizeConfigurationFile()
300 sedScript="${sedScript}
303 startConfigurationFile()
305 if [ -n "${configurationFile}" ]; then
306 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
307 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
308 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
309 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
310 outputFile="${configurationFile}.new"
311 exec <"${configurationFile}" >"${outputFile}"
315 `makeHeaderLine Updated`\\
316 `makeParameterLine`\\
319 putConfigurationDirective()
321 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
322 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
323 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
325 finalizeConfigurationFile()
327 sed -e "${sedScript}"
328 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
331 *) internalError "unimplemented action: ${requestedAction}";;
334 translateDevice_none()
338 translateDevice_devfs()
340 minor="${device#ttyS}"
341 if [ "${minor}" != "${device}" ]; then
342 device="tts/${minor}"
346 if [ "${minor}" != "${device}" ]; then
347 device="printers/${minor}"
350 programMessage "unsupported old-style device: ${device}"
352 translateDevice_old()
354 major="${device%%/*}"
355 if [ "${major}" != "${device}" ]; then
358 tts) devfs="ttyS${minor}";;
359 printers) devfs="lp${minor}";;
362 if [ -n "${devfs}" ]; then
365 programMessage "unsupported devfs device: ${device}"
371 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
375 echo "# Boot Parameter:${bootParameter}"
377 putConfigurationFile()
379 startConfigurationFile
380 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
381 [ -n "${brailleDevice}" ] && {
382 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
383 if [ "${device#/}" = "${device}" ]; then
384 translateDevice_${deviceTranslation}
386 putConfigurationDirective "braille-device" "${device}"
388 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
389 finalizeConfigurationFile
393 bootParameter="${bootParameter} ${1}"
395 while [ "${number}" -le 3 ]; do
396 cut="cut -d, -f${number}"
397 [ "${number}" -gt 1 ] && cut="${cut} -s"
398 operand="`echo ${1} | ${cut}`"
399 if [ -n "${operand}" ]; then
401 1) brailleDriver="${operand}";;
402 2) brailleDevice="${operand}";;
403 3) textTable="${operand}";;
406 number="`expr ${number} + 1`"
411 parseBootParameter "${1}"
417 while [ "${#}" -gt 0 ]; do
421 parseBootParameter "${1#*=}"
426 "${found}" && putConfigurationFile
432 bootCommandFile="/proc/cmdline"
433 if [ -n "${requestedParameter}" ]; then
434 putBootParameter "${requestedParameter}"
435 elif [ -f "${bootCommandFile}" ]; then
436 parseBootCommand `cat "${bootCommandFile}"`
437 elif [ -n "${brltty}" ]; then
438 putBootParameter "${brltty}"
443 %post -n brlapi -p /sbin/ldconfig
444 %postun -n brlapi -p /sbin/ldconfig
447 %defattr(644,root,root,755)
448 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
449 %doc doc/{Bindings,Bootdisks,BrailleDrivers,BrailleTables,ContractionTables,Patches,README,SpeechDrivers}
450 %attr(755,root,root) %{_bindir}/brltty
451 %attr(755,root,root) %{_bindir}/brltty-install
452 %attr(755,root,root) %{_bindir}/brltty-config
453 %attr(755,root,root) %{_bindir}/vstp
454 #attr(755,root,root) %{_bindir}/xbrlapi
455 %dir %{_libdir}/brltty
456 %attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
457 %attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
458 %attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
459 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
460 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
461 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
462 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
463 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
464 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
465 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
466 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
467 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
468 %attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
469 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
470 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
471 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
472 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
473 %attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
474 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
475 %attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
476 %attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
477 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
478 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
479 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
480 %attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
481 %attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
482 %attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
483 %attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
484 %attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so
485 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
486 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
487 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
488 %attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
489 %{_sysconfdir}/brltty
490 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
491 %{_mandir}/man1/brltty.1*
492 %{_mandir}/man1/vstp.1*
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5
497 %attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.1
499 %files -n brlapi-devel
500 %defattr(644,root,root,755)
501 %doc Documents/README.Gnopernicus
502 %doc Documents/Manual-BrlAPI/English/BrlAPI*
503 %attr(755,root,root) %{_libdir}/libbrlapi.so
504 %{_includedir}/brltty
505 %{_includedir}/brlapi*.h
508 %files -n brlapi-static
509 %defattr(644,root,root,755)
510 %{_libdir}/libbrlapi.a
513 %files -n brlapi-apidocs
514 %defattr(644,root,root,755)
515 %doc Documents/BrlAPIref/html/*
519 %files -n brlapi-java
520 %defattr(644,root,root,755)
521 %{_libdir}/java/libbrlapi_java.so
522 %{_javadir}/brlapi.jar