%define pkg_version 5.2 %define api_version 0.6.3 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?pyver: %define pyver %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v")} %{!?python3_sitearch: %define python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)} #define _exec_prefix %{nil} #define _libdir /%{_lib} # with speech dispatcher iff on Fedora: %define with_speech_dispatcher 1 %define with_ocaml 1 Name: brltty Version: %{pkg_version} Release: 3%{?_dist_release} Summary: Braille display driver for Linux/Unix License: GPLv2+ Group: System Environment/Daemons URL: http://mielke.cc/brltty/ Source: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.xz Patch4: brltty-loadLibrary.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: bluez-libs-devel BuildRequires: byacc BuildRequires: gettext BuildRequires: glibc-kernheaders # work around a bug in the install process: Requires(post): coreutils %description BRLTTY is a background process (daemon) which provides access to the Linux/Unix console (when in text mode) for a blind person using a refreshable braille display. It drives the braille display and provides complete screen review functionality. %if %{with_speech_dispatcher} BRLTTY can also work with speech synthetizers; if you want to use it with Speech Dispatcher, please install also package %{name}-speech-dispatcher. %package speech-dispatcher Summary: Speech Dispatcher driver for BRLTTY Group: System Environment/Daemons License: GPLv2+ BuildRequires: speech-dispatcher-devel Requires: %{name} = %{pkg_version}-%{release} %description speech-dispatcher This package provides the Speech Dispatcher driver for BRLTTY. %endif %package docs Summary: Documentation for BRLTTY Summary(ja): BRLTTY のドキュメント Group: Documentation License: GPLv2+ Requires: %{name} = %{pkg_version}-%{release} BuildArch: noarch %description docs This package provides the documentation for BRLTTY. %package xw Summary: XWindow driver for BRLTTY Group: System Environment/Daemons License: GPLv2+ BuildRequires: libSM-devel BuildRequires: libICE-devel BuildRequires: libX11-devel BuildRequires: libXaw-devel BuildRequires: libXext-devel BuildRequires: libXt-devel BuildRequires: libXtst-devel Requires: %{name} = %{pkg_version}-%{release} %description xw This package provides the XWindow driver for BRLTTY. %package at-spi Summary: AtSpi driver for BRLTTY Group: System Environment/Daemons # The data files are licensed under LGPLv2+, see the README file. License: GPLv2+ and LGPLv2+ BuildRequires: at-spi-devel Requires: %{name} = %{pkg_version}-%{release} %description at-spi This package provides the AtSpi driver for BRLTTY. %package -n brlapi Summary: Appliation Programming Interface for BRLTTY Summary(ja): BRLTTY の API Version: %{api_version} Group: Applications/System License: LGPLv2+ Requires: %{name} = %{pkg_version}-%{release} %description -n brlapi This package provides the run-time support for the Application Programming Interface to BRLTTY. Install this package if you have an application which directly accesses a refreshable braille display. %package -n brlapi-devel Summary: Headers, static archive, and documentation for BrlAPI Summary(ja): BrlAPI の開発用ファイル Version: %{api_version} Group: Development/Libraries License: LGPLv2+ Requires: brlapi = %{api_version}-%{release} %description -n brlapi-devel This package provides the header files, static archive, shared object linker reference, and reference documentation for BrlAPI (the Application Programming Interface to BRLTTY). It enables the implementation of applications which take direct advantage of a refreshable braille display in order to present information in ways which are more appropriate for blind users and/or to provide user interfaces which are more specifically atuned to their needs. Install this package if you are developing or maintaining an application which directly accesses a refreshable braille display. %package -n tcl-brlapi Summary: Tcl binding for BrlAPI Summary(ja): BrlAPI の Tcl バインディング Version: %{api_version} Group: Development/Libraries License: LGPLv2+ BuildRequires: tcl-devel Requires: brlapi = %{api_version}-%{release} %description -n tcl-brlapi This package provides the Tcl binding for BrlAPI. %package -n python-brlapi Summary: Python binding for BrlAPI Summary(ja): BrlAPI の Python バインディング Version: %{api_version} Group: Development/Libraries License: LGPLv2+ BuildRequires: Cython BuildRequires: python-devel BuildRequires: python-setuptools Requires: brlapi = %{api_version}-%{release} %description -n python-brlapi This package provides the Python binding for BrlAPI. %package -n python3-brlapi Summary: Python 3 binding for BrlAPI Summary(ja): BrlAPI の Python バインディング Version: %{api_version} Group: Development/Libraries License: LGPLv2+ Requires: brlapi = %{api_version}-%{release} BuildRequires: Cython BuildRequires: python3-devel %description -n python3-brlapi This package provides the Python 3 binding for BrlAPI. %package -n brlapi-java Summary: Java binding for BrlAPI Summary(ja): BrlAPI の Java バインディング Version: %{api_version} Group: Development/Libraries License: LGPLv2+ Requires: brlapi = %{api_version}-%{release} ## temporary work around, java-devel is not resolved consistently acrss archs BuildRequires: java-devel #BuildRequires: java-1.5.0-gcj-devel %description -n brlapi-java This package provides the Java binding for BrlAPI. %if %{with_ocaml} %package -n ocaml-brlapi Summary: OCaml binding for BrlAPI Summary(ja): BrlAPI の OCaml バインディング Version: %{api_version} Group: Development/Libraries License: LGPLv2+ Requires: brlapi = %{api_version}-%{release} BuildRequires: ocaml BuildRequires: ocaml-findlib %description -n ocaml-brlapi This package provides the OCaml binding for BrlAPI. %endif %define version %{pkg_version} %prep %setup -q %patch4 -p1 -b .loadLibrary #patch5 -p1 # Make a copy of the source tree for building the Python 3 module rm -rf ../python3 cp -a . ../python3 %build # If MAKEFLAGS=-jN is set it would break local builds. unset MAKEFLAGS # Add the openjdk include directories to CPPFLAGS for i in -I/usr/lib/jvm/java/include{,/linux}; do java_inc="$java_inc $i" done export CPPFLAGS="$java_inc" export CFLAGS="%{optflags} -I%{_includedir}/speech-dispatcher -fno-strict-aliasing" export CXXFLAGS="%{optflags} -I%{_includedir}/speech-dispatcher -fno-strict-aliasing" # there is no curses packages in BuildRequires, so the package builds # without them in mock; let's express this decision explicitly configure_opts=" \ --disable-stripping \ --without-curses \ %if %{with_speech_dispatcher} --with-speechd=%{_prefix} \ %endif --with-install-root=$RPM_BUILD_ROOT \ JAVA_JAR_DIR=%{_jnidir} \ JAVA_JNI_DIR=%{_libdir}/brltty \ JAVA_JNI=yes" # First build everything with Python 2 support %configure $configure_opts PYTHON=%{__python} # Parallel build seems broken, thus disabling it make # ... and then do it again for the Python 3 module pushd ../python3 %configure $configure_opts PYTHON=%{_bindir}/python3 # Parallel build seems broken, thus disabling it make popd find . \( -path ./doc -o -path ./Documents \) -prune -o \ \( -name 'README*' -o -name '*.txt' -o -name '*.html' -o \ -name '*.sgml' -o -name '*.patch' -o \ \( -path './Bootdisks/*' -type f -perm /ugo=x \) \) -print | while read file; do mkdir -p doc/${file%/*} && cp -rp $file doc/$file || exit 1 done find . -name '*.sgml' | while read file; do iconv -f iso8859-1 -t utf-8 $file > $file.conv && mv -f $file.conv $file done find . -name '*.txt' | while read file; do iconv -f iso8859-1 -t utf-8 $file > $file.conv && mv -f $file.conv $file done find . -name 'README*' | while read file; do iconv -f iso8859-1 -t utf-8 $file > $file.conv && mv -f $file.conv $file done # backup Documents cp -a Documents Documents.buildsnap %install rm -rf $RPM_BUILD_ROOT rm -rf Documents cp -a Documents.buildsnap Documents %if %{with_ocaml} mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs %endif make install JAVA_JAR_DIR=%{_jnidir} \ JAVA_JNI_DIR=%{_libdir}/brltty \ JAVA_JNI=yes pushd ../python3 make install JAVA_JAR_DIR=%{_jnidir} \ JAVA_JNI_DIR=%{_libdir}/brltty \ JAVA_JNI=yes popd rm -rf ../python3 install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir} $RPM_BUILD_ROOT%{_mandir}/man5 install -m 644 Documents/brltty.conf ${RPM_BUILD_ROOT}%{_sysconfdir} echo ".so man1/brltty.1" > $RPM_BUILD_ROOT%{_mandir}/man5/brltty.conf.5 # clean up the manuals: rm Documents/Manual-*/*/{*.mk,*.made,Makefile*} mv Documents/BrlAPIref/{html,BrlAPIref} # Don't want static lib rm -rf $RPM_BUILD_ROOT%{_libdir}/libbrlapi.a # ghost brlapi.key touch $RPM_BUILD_ROOT%{_sysconfdir}/brlapi.key # disable xbrlapi gdm autostart, there is already orca rm -f $RPM_BUILD_ROOT%{_datadir}/gdm/greeter/autostart/xbrlapi.desktop # handle locales %find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT %post devices="/dev/vcsa /dev/vcsa0 /dev/vcc/a" install=true for device in ${devices} do if [ -c "${device}" ] then install=false break fi done if $install then device="$(set -- ${devices} && echo "${1}")" mkdir -p "${device%/*}" mknod -m o= "${device}" c 7 128 chmod 660 "${device}" chown root.tty "${device}" fi exit 0 %pre -n brlapi getent group brlapi >/dev/null || groupadd -r brlapi >/dev/null %post -n brlapi if [ ! -e %{_sysconfdir}/brlapi.key ]; then mcookie > %{_sysconfdir}/brlapi.key chgrp brlapi %{_sysconfdir}/brlapi.key chmod 0640 %{_sysconfdir}/brlapi.key fi /sbin/ldconfig %postun -n brlapi -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root) %doc LICENSE-GPL LICENSE-LGPL %config(noreplace) %{_sysconfdir}/brltty.conf %{_sysconfdir}/brltty/ %{_bindir}/brltty %{_bindir}/brltty-* %{_libdir}/brltty/ %exclude %{_libdir}/brltty/libbrlttybba.so %exclude %{_libdir}/brltty/libbrlttybxw.so %exclude %{_libdir}/brltty/libbrlapi_java.so %if %{with_speech_dispatcher} %exclude %{_libdir}/brltty/libbrlttyssd.so %endif %exclude %{_libdir}/brltty/libbrlttyxas.so %{_mandir}/man[15]/brltty.* %if %{with_speech_dispatcher} %files speech-dispatcher %defattr(-,root,root) %doc Drivers/Speech/SpeechDispatcher/README %{_libdir}/brltty/libbrlttyssd.so %endif %files docs %defattr(-,root,root) %doc Documents/ChangeLog Documents/TODO %doc Documents/Manual-BRLTTY/ %doc doc/* %files xw %defattr(-,root,root) %doc Drivers/Braille/XWindow/README %{_libdir}/brltty/libbrlttybxw.so %files at-spi %defattr(-,root,root) %{_libdir}/brltty/libbrlttyxas.so %files -n brlapi %defattr(-,root,root) %doc Drivers/Braille/XWindow/README %doc Documents/Manual-BrlAPI/ %ghost %{_sysconfdir}/brlapi.key %{_bindir}/vstp %{_bindir}/eutp %{_bindir}/xbrlapi %{_libdir}/brltty/libbrlttybba.so %{_libdir}/libbrlapi.so.* %{_mandir}/man1/xbrlapi.* %{_mandir}/man1/vstp.* %{_mandir}/man1/eutp.* %files -n brlapi-devel %defattr(-,root,root) %doc Documents/BrlAPIref/BrlAPIref/ %{_libdir}/libbrlapi.so %{_includedir}/brltty %{_includedir}/brlapi*.h %{_mandir}/man3/brlapi_*.3* %files -n tcl-brlapi %defattr(-,root,root) %{_libdir}/tcl%{tcl_version}/brlapi-%{api_version} %files -n python-brlapi %defattr(-,root,root) %{python_sitearch}/brlapi.so %{python_sitearch}/Brlapi-%{api_version}-py%{pyver}.egg-info %files -n python3-brlapi %defattr(-,root,root) %{python3_sitearch}/brlapi.cpython-*.so %{python3_sitearch}/Brlapi-%{api_version}-*.egg-info %files -n brlapi-java %defattr(-,root,root) %{_libdir}/brltty/libbrlapi_java.so %{_jnidir}/brlapi.jar %if %{with_ocaml} %files -n ocaml-brlapi %defattr(-,root,root) %{_libdir}/ocaml/brlapi/ %{_libdir}/ocaml/stublibs/ %endif %changelog * Tue Jun 28 2016 Yoji TOYODA 5.2-3 - rebuild with python3-3.5.2 * Wed Apr 01 2015 Yoji TOYODA 5.2-2 - add BuildRequires: python3-devel - create python3-brlapi subpackage * Tue Feb 17 2015 Ryoichi INAGAKI 5.2-1 - updated to 5.2 - added speech-dispatcher, doc, and ocaml subpackages * Sun Feb 19 2012 Yoji TOYODA 4.2-2 - rebuild with python-2.7.2 * Fri Nov 04 2011 Yoji TOYODA 4.2-1 - initial build for Vine Linux * Mon Feb 07 2011 Fedora Release Engineering - 4.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 21 2010 David Malcolm - 4.2-3 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Fri May 21 2010 Tom "spot" Callaway - 4.2-2 - rework parallel patch slightly and reapply * Fri May 21 2010 Tom "spot" Callaway - 4.2-1 - update to 4.2 - drop static lib (bz 556041) - fix undefined S_ISCHR call * Wed Jan 20 2010 Stepan Kasal - 4.1-5 - requires(post): coreutils to work around an installator bug - Resolves: #540437 * Wed Jan 13 2010 Stepan Kasal - 4.1-4 - limit building against speech-dispatcher to Fedora - Resolves: rhbz#553795 * Sun Nov 1 2009 Stepan Kasal - 4.1-3 - build the TTY driver (it was disabled since it first appered in 3.7.2-1) - build with speech-dispatcher, packed into a separate sub-package * Fri Oct 30 2009 Stepan Kasal - 4.1-2 - move data-directory back to default: /etc/brltty - move brltty to /bin and /lib, so that it can be used to repair the system without /usr mounted (#276181) - move vstp and libbrlttybba.so to brlapi - brltty no longer requires brlapi - brlapi now requires brltty from the same build * Wed Oct 28 2009 Stepan Kasal - 4.1-1 - new upstream version - use --disable-stripping instead of make variable override - install the default brltty-pm.conf to docdir only (#526168) - remove the duplicate copies of rhmkboot and rhmkroot from docdir - patch configure so that the dirs in summary are not garbled: brltty-autoconf-quote.patch - move data-directory to ${datadir}/brltty * Tue Oct 20 2009 Stepan Kasal - 4.0-2 - escape rpm macros in the rpm change log - add requires to bind subpackages from one build together * Wed Oct 7 2009 Stepan Kasal - 4.0-1 - new upstream version - drop upstreamed patches; ./autogen not needed anymore - pack the xbrlapi server; move its man page to brlapi package - add man-page for brltty.conf (#526168) * Fri Jul 24 2009 Fedora Release Engineering - 3.10-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue May 12 2009 Stepan Kasal - 3.10-5 - rebuild after java-1.5.0-gcj rebuild * Thu Apr 30 2009 Stepan Kasal - 3.10-4 - own the tcl subdirectory (#474032) - set CPPFLAGS to java include dirs, so that the java bindings build with any java implementation (#498964) - add --without-curses; there is no curses package BuildRequired anyway * Mon Feb 23 2009 Fedora Release Engineering - 3.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 3.10-2 - Rebuild for Python 2.6 * Sat Sep 13 2008 Stepan Kasal - 3.10-1 - new upstream release - drop brltty-3.9-java-svn.patch, brltty-3.9-tcl85path.patch, and brltty-3.9-pyxfix.patch, they are upstream - fix BuildRoot - fix many sub-packages' Requires on brlapi * Wed Sep 10 2008 Stepan Kasal - 3.9-3 - add brltty-3.9-autoconf.patch to fix to build with Autoconf 2.62 - add brltty-3.9-parallel.patch to fix race condition with parallel make - add brltty-3.9-pyxfix.patch to fix build with current pyrex - Summary lines shall not end with a dot * Thu Feb 28 2008 Tomas Janousek - 3.9-2.2 - glibc build fixes - applied java reorganisations from svn * Wed Feb 20 2008 Fedora Release Engineering - 3.9-2.1 - Autorebuild for GCC 4.3 * Wed Jan 09 2008 Tomas Janousek - 3.9-1.1 - specfile update to comply with tcl packaging guidelines * Mon Jan 07 2008 Tomas Janousek - 3.9-1 - update to latest upstream (3.9) * Tue Sep 18 2007 Tomas Janousek - 3.8-2.svn3231 - update to r3231 from svn - added java binding subpackage * Wed Aug 29 2007 Tomas Janousek - 3.8-2.svn3231 - update to r3231 from svn * Tue Aug 21 2007 Tomas Janousek - 3.8-1 - update to latest upstream - added the at-spi driver, tcl and python bindings - fixed the license tags * Mon Mar 05 2007 Tomas Janousek - 3.7.2-3 - added the XWindow driver - build fix for newer byacc * Tue Jan 30 2007 Tomas Janousek - 3.7.2-2.1 - quiet postinstall scriptlet, really fixes #224570 * Tue Jan 30 2007 Tomas Janousek - 3.7.2-2 - failsafe postinstall script, fixes #224570 - makefile fix - debuginfo extraction now works * Thu Jan 25 2007 Tomas Janousek - 3.7.2-1.1 - fix building with newer kernel-headers (#224149) * Wed Jul 12 2006 Petr Rockai - 3.7.2-1 - upgrade to latest upstream version - split off brlapi and brlapi-devel packages * Wed Jul 12 2006 Jesse Keating - 3.2-12.1 - rebuild * Sun Jul 02 2006 Florian La Roche - for the post script require coreutils * Mon Jun 05 2006 Jesse Keating - 3.2-11 - Added byacc BuildRequires, removed prereq, coreutils is always there * Fri Feb 10 2006 Jesse Keating - 3.2-10.2.1 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jesse Keating - 3.2-10.2 - rebuilt for new gcc4.1 snapshot and glibc changes * Fri Dec 09 2005 Jesse Keating - rebuilt * Wed Mar 16 2005 Bill Nottingham 3.2-10 - rebuild * Fri Nov 26 2004 Florian La Roche - add a %%clean into .spec * Thu Oct 14 2004 Adrian Havill 3.2-5 - chmod a-x for conf file (#116244) * Tue Jun 15 2004 Elliot Lee - rebuilt * Tue Mar 02 2004 Elliot Lee - rebuilt * Fri Feb 13 2004 Elliot Lee - rebuilt * Tue Sep 30 2003 Florian La Roche - prereq coreutils for mknod/chown/chmod * Mon Jul 07 2003 Adrian Havill 3.2-2 - changed spec "Copyright" to "License" - use %%configure macro, %%{_libdir} for non-ia32 archs - removed unnecessary set and unset, assumed/default spec headers - fixed unpackaged man page, duplicate /bin and /lib entries - use plain install vs scripts for non-i386 buildsys