]> git.pld-linux.org Git - packages/brltty.git/blame - brltty.spec
- more verbose files
[packages/brltty.git] / brltty.spec
CommitLineData
3704768a
SS
1# TODO:
2# - check BR
3# - more packages (bindings)
4#
9b20373a 5Summary: Braille display driver for Linux/Unix
8731bfde 6Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a
91162002 7Name: brltty
18f080b9 8Version: 3.9
9Release: 1
9b20373a 10Group: Daemons
91162002 11License: GPL
9b20373a 12URL: http://mielke.cc/brltty/
91162002 13Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
18f080b9 14# Source0-md5: 7ce54ba2d38b7c220870e8c781f36743
91162002 15BuildRequires: autoconf >= 2.53
664a738b 16BuildRequires: automake
91162002 17BuildRequires: bison
3704768a
SS
18#BuildRequires: bluez-devel
19#BuildRequires: doxygen
20#BuildRequires: libtool
21#BuildRequires: gpm-devel
22#BuildRequires: java-?
23#BuildRequires: libusb-devel
24#BuildRequires: ncurses-devel
25#BuildRequires: ocaml-devel
26#BuildRequires: pkgconfig
27#BuildRequires: python-devel
28#BuildRequires: tcl-devel
29#BuildRequires: xorg-lib-libX*
91162002 30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33BRLTTY is a background process (daemon) which provides access to the
34Linux/Unix console (when in text mode) for a blind person using a
33e3c5f9 35refreshable Braille display. It drives the Braille display, and
3b0ec988 36provides complete screen review functionality. Some speech capability
91162002 37has also been incorporated.
38
54f59947
JR
39%description -l pl.UTF-8
40BRLTTY jest demonem, który udostępnia dostęp do linuksowej konsoli (w
41trybie tekstowym) dla niewidomych używających wyświetlaczy Braille'a z
42odświeżaniem (refreshable Braille display). BRLTTY steruje
43wyświetlaczem Braille'a i dostarcza funkcjonalność całkowitego
44przeglądu ekranu. Do tego pakietu została włączona możliwość syntezy
9b20373a 45mowy.
91162002 46
47%package -n brlapi
9b20373a 48Summary: Application Programming Interface for BRLTTY
8731bfde 49Summary(pl.UTF-8): API do BRLTTY
3b0ec988 50Group: Applications/System
91162002 51
52%description -n brlapi
53This package provides the run-time support for the Application
54Programming Interface to BRLTTY.
55
9b20373a 56Install this package if you have an application which directly
57accesses a refreshable Braille display.
91162002 58
54f59947
JR
59%description -n brlapi -l pl.UTF-8
60Ten pakiet zawiera środowisko uruchomieniowe dla programów
61korzystających z API BRLTTY.
91162002 62
54f59947
JR
63Zainstaluj ten pakiet jeśli masz aplikację, która bezpośrednio używa
64wyświetlacza Braille'a z odświeżaniem.
91162002 65
66%package -n brlapi-devel
9b20373a 67Summary: Headers and documentation for BrlAPI
8731bfde 68Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI
3b0ec988 69Group: Development/Libraries
664a738b 70Requires: brlapi = %{version}-%{release}
91162002 71
72%description -n brlapi-devel
9b20373a 73This package provides the header files, shared object linker
74reference, and reference documentation for BrlAPI (the Application
3b0ec988 75Programming Interface to BRLTTY). It enables the implementation of
9b20373a 76applications which take direct advantage of a refreshable Braille
77display in order to present information in ways which are more
78appropriate for blind users and/or to provide user interfaces which
79are more specifically atuned to their needs.
91162002 80
3b0ec988 81Install this package if you're developing or maintaining an
82application which directly accesses a refreshable Braille display.
91162002 83
54f59947
JR
84%description -n brlapi-devel -l pl.UTF-8
85Ten pakiet zawiera pliki nagłówkowe oraz dokumentację do BrlAPI (API
86do BRLTTY). BrlAPI pozwala implementować aplikacje, które bezpośrednio
87korzystają z wyświetlaczy Braille'a dostarczając interfejs użytkownika
88bardziej przystosowany dla osób niewidomych.
91162002 89
54f59947
JR
90Zainstaluj ten pakiet, jeśli tworzysz lub nadzorujesz aplikację
91korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a.
91162002 92
93%package -n brlapi-static
9b20373a 94Summary: Static BrlAPI library
8731bfde 95Summary(pl.UTF-8): Statyczna biblioteka BrlAPI
3b0ec988 96Group: Development/Libraries
664a738b 97Requires: brlapi-devel = %{version}-%{release}
91162002 98
99%description -n brlapi-static
9b20373a 100This is package with static BrlAPI library.
91162002 101
54f59947
JR
102%description -n brlapi-static -l pl.UTF-8
103Ten pakiet zawiera statyczną wersję biblioteki BrlAPI.
91162002 104
105%prep
106%setup -q
107
108%build
664a738b
JB
109%{__aclocal}
110%{__autoconf}
111cp -f /usr/share/automake/config.sub acdir
112%configure \
113 --with-install-root="$RPM_BUILD_ROOT" \
91162002 114 --disable-tainted-components \
115 --enable-api
116%{__make}
117
118directory="doc"
119mkdir -p "$directory"
120for 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`
121do
9b20373a 122 mkdir -p "$directory/${file%/*}"
123 cp -rp "$file" "$directory/$file"
91162002 124done
125
126%install
127rm -rf $RPM_BUILD_ROOT
128%{__make} install
3b0ec988 129install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir}
91162002 130
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%pre
135# The pre-install scriptlet.
136
137# If a configuration file already exists then rpm installs the new one as
138# <path>.rpmnew. If this is done then the .rpmnew file is overwritten if it
139# already exists.
140
141# There's no explicit way to tell if a configuration file has been installed
142# as itself or as a .rpmnew file. The way we'll figure it out, therefore, is by
3b0ec988 143# erasing the .rpmnew file now so that we can see if it gets created later.
91162002 144rm -f "%{_sysconfdir}/brltty.conf.rpmnew"
145
146%post
147# The post-install scriptlet.
148
149# If BRLTTY's boot parameter has been specified then update the just installed
150# configuration file template to reflect the options supplied thereby.
151
152# First, we need to determine which file to update. If there's a .rpmnew file
153# then update it since a previous configuration file must already have existed.
154file="%{_sysconfdir}/brltty.conf"
155new="${file}.rpmnew"
156[ -f "${new}" ] && file="${new}"
157
158# Update the configuration file template via the Bootdisks/bp2cf script.
159# Include it right within this scriptlet so that it needn't be installed.
160# Imbed it within a subshell to ensure that it won't impact this scriptlet.
161(
c247b245 162 # First, set bp2cf's command line arguments.
163 set -- -u -f "${file}"
91162002 164
165#!/bin/sh
166###############################################################################
167# BRLTTY - A background process providing access to the Linux console (when in
9b20373a 168# text mode) for a blind person using a refreshable Braille display.
91162002 169#
170# Copyright (C) 1995-2003 by The BRLTTY Team. All rights reserved.
171#
172# BRLTTY comes with ABSOLUTELY NO WARRANTY.
173#
174# This is free software, placed under the terms of the
175# GNU General Public License, as published by the Free Software
176# Foundation. Please see the file COPYING for details.
177#
178# Web Page: http://mielke.cc/brltty/
179#
180# This software is maintained by Dave Mielke <dave@mielke.cc>.
181###############################################################################
182
183# Convert the boot parameter to configuration file directives.
184# If /proc is mounted then use the brltty= boot parameter in /proc/cmdline.
185# If /proc is not mounted then use the brltty environment variable.
186# Invoke with -h for usage information.
187
188programName="${0##*/}"
189programMessage()
190{
c247b245 191 echo 2>&1 "${programName}: ${1}"
91162002 192}
193syntaxError()
194{
c247b245 195 programMessage "${1}"
196 exit 2
91162002 197}
198internalError()
199{
c247b245 200 programMessage "${1}"
201 exit 3
91162002 202}
203
204configurationFile=""
205requestedAction=create
206deviceTranslation=none
207requestedParameter=""
208OPTIND=1
209while getopts ":f:cundop:h" option
210do
c247b245 211 case "${option}" in
212 f) configurationFile="${OPTARG}";;
213 c) requestedAction=create;;
214 u) requestedAction=update;;
215 n) deviceTranslation=none;;
216 d) deviceTranslation=devfs;;
217 o) deviceTranslation=old;;
218 p) requestedParameter="${OPTARG}";;
219 h)
220 cat <<EOF
91162002 221Usage: ${programName} [option ...]
222-f file The configuration file to create/update.
223-c Create the configuration file (write to stdout if no -f).
224-u Update the configuration file (copying from stdin to stdout if no -f).
225-n Do not translate device paths.
226-d Do old-style to devfs device path translation.
227-o Do devfs to old-style device path translation.
228-p [driver][,[device][,[table]]]
229 Explicitly specify the boot parameter.
230-h Display this usage summary.
231EOF
c247b245 232 exit 0
233 ;;
234 \?) syntaxError "unknown option: -${OPTARG}";;
235 :) syntaxError "missing value: -${OPTARG}";;
236 *) internalError "unimplemented option: -${option}";;
237 esac
91162002 238done
239shift "`expr $OPTIND - 1`"
240[ "${#}" -eq 0 ] || syntaxError "too many parameters."
241
c247b245 242case "${requestedAction}" in
243 create)
244 putConfigurationLine()
245 {
246 echo "${1}" || exit 4
247 }
248 startConfigurationFile()
249 {
250 [ -n "${configurationFile}" ] && exec >"${configurationFile}"
251 putConfigurationLine "`makeHeaderLine Created`"
252 putConfigurationLine "`makeParameterLine`"
253 putConfigurationLine ""
254 }
255 putConfigurationDirective()
256 {
257 putConfigurationLine "${1} ${2}"
258 }
259 finalizeConfigurationFile()
260 {
261 :
262 }
263 ;;
264 update)
265 putSedCommand()
266 {
267 sedScript="${sedScript}
91162002 268${1}"
c247b245 269 }
270 startConfigurationFile()
271 {
106ddbb5 272 if [ -n "${configurationFile}" ]; then
c247b245 273 [ -e "${configurationFile}" ] || syntaxError "file not found: ${configurationFile}"
274 [ -f "${configurationFile}" ] || syntaxError "not a file: ${configurationFile}"
275 [ -r "${configurationFile}" ] || syntaxError "file not readable: ${configurationFile}"
276 [ -w "${configurationFile}" ] || syntaxError "file not writable: ${configurationFile}"
277 outputFile="${configurationFile}.new"
278 exec <"${configurationFile}" >"${outputFile}"
279 fi
280 sedScript=""
281 putSedCommand "1i\\
91162002 282`makeHeaderLine Updated`\\
283`makeParameterLine`\\
284"
c247b245 285 }
286 putConfigurationDirective()
287 {
288 value="`echo "${2}" | sed -e 's%\\([/\\]\\)%\\\\\\1%g'`"
289 putSedCommand "/^ *#\\(${1} .*\\)/s//\\1/"
290 putSedCommand "/^ *\\(${1}\\) .*/s//\\1 ${value}/"
291 }
292 finalizeConfigurationFile()
293 {
294 sed -e "${sedScript}"
295 [ -n "${outputFile}" ] && mv -f "${outputFile}" "${configurationFile}"
296 }
297 ;;
298 *) internalError "unimplemented action: ${requestedAction}";;
91162002 299esac
300
301translateDevice_none()
302{
c247b245 303 :
91162002 304}
305translateDevice_devfs()
306{
c247b245 307 minor="${device#ttyS}"
106ddbb5 308 if [ "${minor}" != "${device}" ]; then
c247b245 309 device="tts/${minor}"
310 return 0
311 fi
312 minor="${device#lp}"
106ddbb5 313 if [ "${minor}" != "${device}" ]; then
c247b245 314 device="printers/${minor}"
315 return 0
316 fi
317 programMessage "unsupported old-style device: ${device}"
91162002 318}
319translateDevice_old()
320{
c247b245 321 major="${device%%/*}"
106ddbb5 322 if [ "${major}" != "${device}" ]; then
c247b245 323 minor="${device#*/}"
324 case "${major}" in
325 tts) devfs="ttyS${minor}";;
326 printers) devfs="lp${minor}";;
327 esac
328 fi
106ddbb5 329 if [ -n "${devfs}" ]; then
c247b245 330 device="${devfs}"
331 else
332 programMessage "unsupported devfs device: ${device}"
333 fi
91162002 334}
335
336makeHeaderLine()
337{
c247b245 338 echo "# ${1} by brltty-bp2cf`date +' on %Y-%m-%d at %H:%M:%S %Z (UTC%z)'`."
91162002 339}
340makeParameterLine()
341{
c247b245 342 echo "# Boot Parameter:${bootParameter}"
91162002 343}
344putConfigurationFile()
345{
c247b245 346 startConfigurationFile
347 [ -n "${brailleDriver}" ] && putConfigurationDirective "braille-driver" "${brailleDriver}"
348 [ -n "${brailleDevice}" ] && {
349 device="`echo "${brailleDevice}" | sed -e 's%//*%/%g' -e 's%^/dev/%%'`"
106ddbb5 350 if [ "${device#/}" = "${device}" ]; then
c247b245 351 translateDevice_${deviceTranslation}
352 fi
353 putConfigurationDirective "braille-device" "${device}"
354 }
355 [ -n "${textTable}" ] && putConfigurationDirective "text-table" "${textTable}"
356 finalizeConfigurationFile
91162002 357}
358parseBootParameter()
359{
c247b245 360 bootParameter="${bootParameter} ${1}"
361 number=1
106ddbb5 362 while [ "${number}" -le 3 ]; do
c247b245 363 cut="cut -d, -f${number}"
364 [ "${number}" -gt 1 ] && cut="${cut} -s"
365 operand="`echo ${1} | ${cut}`"
106ddbb5 366 if [ -n "${operand}" ]; then
c247b245 367 case "${number}" in
368 1) brailleDriver="${operand}";;
369 2) brailleDevice="${operand}";;
370 3) textTable="${operand}";;
371 esac
372 fi
373 number="`expr ${number} + 1`"
374 done
91162002 375}
376putBootParameter()
377{
c247b245 378 parseBootParameter "${1}"
379 putConfigurationFile
91162002 380}
381parseBootCommand()
382{
c247b245 383 found=false
106ddbb5 384 while [ "${#}" -gt 0 ]; do
c247b245 385 case "${1}" in
386 "brltty="*)
387 found=true
388 parseBootParameter "${1#*=}"
389 ;;
390 esac
391 shift
392 done
393 "${found}" && putConfigurationFile
91162002 394}
395
396brailleDriver=""
397brailleDevice=""
398textTable=""
399bootCommandFile="/proc/cmdline"
106ddbb5 400if [ -n "${requestedParameter}" ]; then
c247b245 401 putBootParameter "${requestedParameter}"
106ddbb5 402elif [ -f "${bootCommandFile}" ]; then
c247b245 403 parseBootCommand `cat "${bootCommandFile}"`
106ddbb5 404elif [ -n "${brltty}" ]; then
c247b245 405 putBootParameter "${brltty}"
91162002 406fi
407exit 0
408)
409
9b20373a 410%post -n brlapi -p /sbin/ldconfig
411%postun -n brlapi -p /sbin/ldconfig
91162002 412
413%files
414%defattr(644,root,root,755)
c0ab824f
SS
415%doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
416%doc doc/{Bindings,Bootdisks,BrailleDrivers,BrailleTables,ContractionTables,Patches,README,SpeechDrivers}
91162002 417%attr(755,root,root) %{_bindir}/brltty
c0ab824f
SS
418%attr(755,root,root) %{_bindir}/brltty-install
419%attr(755,root,root) %{_bindir}/brltty-config
18f080b9 420%attr(755,root,root) %{_bindir}/vstp
c0ab824f 421#attr(755,root,root) %{_bindir}/xbrlapi
91162002 422%dir %{_libdir}/brltty
c0ab824f
SS
423%attr(755,root,root) %{_libdir}/brltty/libbrlttybal.so
424%attr(755,root,root) %{_libdir}/brltty/libbrlttybat.so
425%attr(755,root,root) %{_libdir}/brltty/libbrlttybba.so
426%attr(755,root,root) %{_libdir}/brltty/libbrlttybbd.so
427%attr(755,root,root) %{_libdir}/brltty/libbrlttybbl.so
428%attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
429%attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
430%attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
431%attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
432%attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
433%attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
434%attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
435%attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
436%attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
437%attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
438%attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
439%attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
440%attr(755,root,root) %{_libdir}/brltty/libbrlttybpm.so
441%attr(755,root,root) %{_libdir}/brltty/libbrlttybtn.so
442%attr(755,root,root) %{_libdir}/brltty/libbrlttybts.so
443%attr(755,root,root) %{_libdir}/brltty/libbrlttybtt.so
444%attr(755,root,root) %{_libdir}/brltty/libbrlttybvd.so
445%attr(755,root,root) %{_libdir}/brltty/libbrlttybvo.so
446%attr(755,root,root) %{_libdir}/brltty/libbrlttybvr.so
447%attr(755,root,root) %{_libdir}/brltty/libbrlttybvs.so
448%attr(755,root,root) %{_libdir}/brltty/libbrlttysal.so
449%attr(755,root,root) %{_libdir}/brltty/libbrlttysbl.so
450%attr(755,root,root) %{_libdir}/brltty/libbrlttyscb.so
451%attr(755,root,root) %{_libdir}/brltty/libbrlttyses.so
452%attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
453%attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
454%attr(755,root,root) %{_libdir}/brltty/libbrlttyxlx.so
455%attr(755,root,root) %{_libdir}/brltty/libbrlttyxsc.so
91162002 456%{_sysconfdir}/brltty
1c33f0ca 457%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/brltty.conf
c0ab824f
SS
458%{_mandir}/man1/brltty.1*
459%{_mandir}/man1/vstp.1*
91162002 460
461%files -n brlapi
462%defattr(644,root,root,755)
c0ab824f
SS
463%attr(755,root,root) %{_libdir}/libbrlapi.so.0.5
464%attr(755,root,root) %{_libdir}/libbrlapi.so.0.5.1
18f080b9 465%doc Documents/Manual-BrlAPI/English/BrlAPI*
91162002 466
467%files -n brlapi-devel
468%defattr(644,root,root,755)
18f080b9 469%doc Documents/BrlAPIref Documents/README.Gnopernicus
1c33f0ca 470%attr(755,root,root) %{_libdir}/libbrlapi.so
91162002 471%{_includedir}/brltty
18f080b9 472%{_includedir}/brlapi*.h
664a738b 473%{_mandir}/man3/*
91162002 474
475%files -n brlapi-static
476%defattr(644,root,root,755)
477%{_libdir}/libbrlapi.a
This page took 0.088691 seconds and 4 git commands to generate.