X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=brltty.spec;h=5fbf17879d8d124a43be459feb23f12a39e45c75;hb=414dde53cabf20d4b2113b55cd8464d221cb66ef;hp=86860fa5e695fd3ddd9c9803bd08bf7ced395121;hpb=6c9c25b1040023456a33c4f739c681afe25a84a9;p=packages%2Fbrltty.git diff --git a/brltty.spec b/brltty.spec index 86860fa..5fbf178 100644 --- a/brltty.spec +++ b/brltty.spec @@ -1,73 +1,80 @@ # TODO: # - what is that huge %post script? -# - ocaml bcond is useless now: -# Cannot find ocamlfind. -# BrlAPI Caml bindings will be compiled but not installed. -# - check java stuff -# - create bcond to build with minimal deps (wo ncurses,gpm,at-spi*) -# -# warning: Installed (but unpackaged) file(s) found: -# /usr/lib/ocaml/brlapi/META -# /usr/lib/ocaml/brlapi/brlapi.cma -# /usr/lib/ocaml/brlapi/brlapi.cmi -# /usr/lib/ocaml/brlapi/brlapi.cmxa -# /usr/lib/ocaml/brlapi/brlapi.mli -# /usr/lib/ocaml/brlapi/libbrlapi_stubs.a -# /usr/lib/ocaml/stublibs/dllbrlapi_stubs.so -# /usr/lib/ocaml/stublibs/dllbrlapi_stubs.so.owner -# /usr/share/man/man1/xbrlapi.1.gz # # Conditional build: -%bcond_without apidocs # documentation generated with doxygen -%bcond_with java # java bindings -%bcond_with ocaml # ocaml bindings (NFY) -%bcond_without python # python bindings -%bcond_without tcl # tcl bindings -%bcond_without x # build X11-based utilities +%bcond_without apidocs # documentation generated with doxygen +%bcond_without java # Java bindings +%bcond_without ocaml # OCaml bindings +%bcond_without python # Python bindings +%bcond_without python3 # Python 3.x bindings +%bcond_without tcl # Tcl bindings +%bcond_without x # X11-based utilities +%bcond_without gpm # mouse tracking via GPM +%bcond_without libbraille # libbraille Braille driver +%bcond_without espeak # eSpeak synthesizer driver +%bcond_without flite # Flite synthesizer driver +%bcond_with mikropuhe # Mikropuhe synthesizer driver [commercial, Finnish] +%bcond_without speech_dispatcher # Speech Dispatcher synthesizer driver +%bcond_with swift # Swift synthesizer driver [commercial, from Cepstral] +%bcond_with theta # Theta synthesizer driver [commercial, from Cepstral] +%bcond_with viavoice # IBM ViaVoice synthesizer driver [commercial] +%bcond_with at_spi # AtSpi screen driver +%bcond_without at_spi2 # AtSpi2 screen driver +# +%define brlapi_ver 0.6.3 # %include /usr/lib/rpm/macros.java Summary: Braille display driver for Linux/Unix Summary(pl.UTF-8): Sterownik do wyświetlaczy Braille'a Name: brltty -Version: 4.2 -Release: 0.1 +Version: 5.2 +Release: 7 Group: Daemons -License: GPL -Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz -# Source0-md5: 192af5e634210616928496645e392097 -Patch0: %{name}-stat.patch +License: GPL v2+ (brltty and drivers), LGPL v2.1+ (APIs) +Source0: http://mielke.cc/brltty/archive/%{name}-%{version}.tar.xz +# Source0-md5: b484343461b5a45f95fedfb21d1ceca3 +Patch0: %{name}-java.patch +Patch1: %{name}-speech-dispatcher.patch +Patch2: %{name}-python.patch URL: http://mielke.cc/brltty/ -BuildRequires: at-spi-devel +BuildRequires: alsa-lib-devel +%{?with_at_spi:BuildRequires: at-spi-devel} BuildRequires: autoconf >= 2.62 BuildRequires: automake BuildRequires: bison -#BuildRequires: bluez-devel +# just headers +BuildRequires: bluez-libs-devel +%{?with_at_spi2:BuildRequires: dbus-devel >= 1.0} %{?with_apidocs:BuildRequires: doxygen} -BuildRequires: gpm-devel +%{?with_espeak:BuildRequires: espeak-devel} +%{?with_flite:BuildRequires: flite-devel} +%{?with_gpm:BuildRequires: gpm-devel} %{?with_java:BuildRequires: jdk} +%{?with_java:BuildRequires: jpackage-utils} +%{?with_libbraille:BuildRequires: libbraille-devel} +BuildRequires: libicu-devel BuildRequires: ncurses-devel %{?with_ocaml:BuildRequires: ocaml} BuildRequires: pkgconfig -%{?with_python:BuildRequires: python-Pyrex} +%{?with_python:BuildRequires: python-Cython} +%{?with_python3:BuildRequires: python3-Cython} %{?with_java:BuildRequires: rpm-javaprov} %{?with_python:BuildRequires: rpm-pythonprov} -%{?with_tcl:BuildRequires: tcl} -%{?with_x:BuildRequires: xorg-lib-libXaw-devel} -%{?with_x:BuildRequires: xorg-lib-libXtst-devel} -# libbrlttyblb -#BR: libbraile-devel (-lllibbraile ) -# libbrlttysfl -BuildRequires: flite-devel -# libbrlttysmp -#BR: Mikropuhe-devel (-lmikropuhe ) -# libbrlttyssd -#BuildRequires: speech-dispatcher-devel -# libbrlttyssw -#BR: Swift-devel (-lswift ) -# libbrlttysth -#BR: Theta-devel (-ltheta ) -# libbrlttysvv -#BR: ViaVoice-devel (-lviavoice ) +%{?with_speech_dispatcher:BuildRequires: speech-dispatcher-devel >= 0.8} +BuildRequires: tar >= 1:1.22 +%{?with_tcl:BuildRequires: tcl-devel >= 8.5} +%if %{with x} +BuildRequires: xorg-lib-libX11-devel +BuildRequires: xorg-lib-libXaw-devel +BuildRequires: xorg-lib-libXext-devel +BuildRequires: xorg-lib-libXt-devel +BuildRequires: xorg-lib-libXtst-devel +%endif +BuildRequires: xz +#%{?with_mikropuhe:BuildRequires: Mikropuhe-devel (-lmikropuhe )} +#%{?with_swift:BuildRequires: Swift-devel (-lswift )} +#%{?with_theta:BuildRequires: Theta-devel (-ltheta )} +#%{?with_viavoice:BuildRequires: ViaVoice-devel (-libmeci50 )} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -88,7 +95,8 @@ mowy. %package -n brlapi Summary: Application Programming Interface for BRLTTY Summary(pl.UTF-8): API do BRLTTY -Group: Applications/System +License: LGPL v2.1+ +Group: Libraries %description -n brlapi This package provides the run-time support for the Application @@ -107,6 +115,7 @@ wyświetlacza Braille'a z odświeżaniem. %package -n brlapi-devel Summary: Headers and documentation for BrlAPI Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja do BrlAPI +License: LGPL v2.1+ Group: Development/Libraries Requires: brlapi = %{version}-%{release} @@ -134,6 +143,7 @@ korzystającą bezpośrednio z odświeżalnych wyświetlaczy Braille'a. %package -n brlapi-static Summary: Static BrlAPI library Summary(pl.UTF-8): Statyczna biblioteka BrlAPI +License: LGPL v2.1+ Group: Development/Libraries Requires: brlapi-devel = %{version}-%{release} @@ -159,6 +169,7 @@ Dokumentacja BrlAPI w formacie HTML generowane ze %package -n java-brlapi Summary: BrlAPI library for Java Summary(pl.UTF-8): Biblioteka BrlAPI dla Javy +License: LGPL v2.1+ Group: Libraries Requires: brlapi = %{version}-%{release} @@ -168,21 +179,64 @@ BrlAPI library for Java. %description -n java-brlapi -l pl.UTF-8 Biblioteka BrlAPI dla Javy. +%package -n ocaml-brlapi +Summary: OCaml binding for BrlAPI +Summary(pl.UTF-8): Wiązania OCamla do BrlAPI +License: LGPL v2.1+ +Group: Libraries +Requires: brlapi = %{version}-%{release} +%requires_eq ocaml-runtime + +%description -n ocaml-brlapi +OCaml binding for BrlAPI. + +%description -n ocaml-brlapi -l pl.UTF-8 +Wiązania OCamla do BrlAPI. + +%package -n ocaml-brlapi-devel +Summary: OCaml binding for BrlAPI - development files +Summary(pl.UTF-8): Wiązania OCamla do BrlAPI - pliki programistyczne +License: LGPL v2.1+ +Group: Libraries +Requires: ocaml-brlapi = %{version}-%{release} +%requires_eq ocaml + +%description -n ocaml-brlapi-devel +OCaml binding for BrlAPI - development files. + +%description -n ocaml-brlapi-devel -l pl.UTF-8 +Wiązania OCamla do BrlAPI - pliki programistyczne. + %package -n python-brlapi -Summary: Python interface to BrlAPI -Summary(pl.UTF-8): Pythonowy interfejs do BrlAPI +Summary: Python 2.x interface to BrlAPI +Summary(pl.UTF-8): Interfejs Pythona 2.x do BrlAPI +License: LGPL v2.1+ Group: Libraries Requires: brlapi = %{version}-%{release} %description -n python-brlapi -Python interface to BrlAPI. +Python 2.x interface to BrlAPI. %description -n python-brlapi -l pl.UTF-8 -Pythonowy interfejs do BrlAPI. +Interfejs Pythona 2.x do BrlAPI. + +%package -n python3-brlapi +Summary: Python 3.x interface to BrlAPI +Summary(pl.UTF-8): Interfejs Pythona 3.x do BrlAPI +License: LGPL v2.1+ +Group: Libraries +Requires: brlapi = %{version}-%{release} + +%description -n python3-brlapi +Python 3.x interface to BrlAPI. + +%description -n python3-brlapi -l pl.UTF-8 +Interfejs Pythona 3.x do BrlAPI. %package -n brlapi-tcl Summary: BrlAPI library for Tcl Summary(pl.UTF-8): Biblioteka BrlAPI dla Tcl +License: LGPL v2.1+ Group: Libraries Requires: brlapi = %{version}-%{release} @@ -195,18 +249,35 @@ Biblioteka BrlAPI dla Tcl. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build -%{__aclocal} %{__autoconf} -cp -f /usr/share/automake/config.sub acdir CFLAGS="%{rpmcflags} -I/usr/include/ncurses" %configure \ + %{?with_java:JAVA_HOME=%{java_home}} \ --with-install-root="$RPM_BUILD_ROOT" \ - --disable-tainted-components \ + %{!?with_libbraille:--without-libbraille} \ + %{!?with_espeak:--without-espeak} \ + %{!?with_flite:--without-flite} \ + %{!?with_speech_dispatcher:--without-speechd} \ + %{!?with_ocaml:--disable-caml-bindings} \ + %{!?with_gpm:--disable-gpm} \ %{!?with_java:--disable-java-bindings} \ + %{!?with_python:--disable-python-bindings} \ + %{!?with_tcl:--disable-tcl-bindings} \ + %{!?with_x:--disable-x} \ --enable-api -%{__make} + +%{__make} -j1 + +%if %{with python3} +cd Bindings/Python +%py3_build \ + -b build-3 +cd ../.. +%endif directory="doc" mkdir -p "$directory" @@ -218,9 +289,43 @@ done %install rm -rf $RPM_BUILD_ROOT -%{__make} -j1 install + +%{__make} -j1 install \ + OCAML_INSTALL_TARGET=install-without-findlib + +# findlib-specific, useless in rpm +%{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so.owner + +%if %{with python3} +cd Bindings/Python +%{__python3} setup.py \ + build \ + -b build-3 \ + install \ + --optimize=2 \ + --skip-build \ + --root=$RPM_BUILD_ROOT +cd ../.. +%endif + +%if %{_lib} != "lib" + # Fix java plugin install path on 64-bit archs + install -d $RPM_BUILD_ROOT%{_libdir}/java + %{__mv} $RPM_BUILD_ROOT%{_prefix}/{lib,%{_lib}}/java/libbrlapi_java.so +%endif + install Documents/brltty.conf $RPM_BUILD_ROOT%{_sysconfdir} +install -d $RPM_BUILD_ROOT/usr/lib/tmpfiles.d +cat >$RPM_BUILD_ROOT/usr/lib/tmpfiles.d/brltty.conf <