X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=brltty.spec;h=3ff0c182e9a9ccac921fe6ff2c213ee339e0185a;hb=b6429e31ffe141bdf1cc2e53ca2b38c5460ea337;hp=78f96d6270fafc16debe6d7a343a4feb9c54cb07;hpb=5fa6377b7ceb2e19e1ed8d5cc6042b7bc31df482;p=packages%2Fbrltty.git diff --git a/brltty.spec b/brltty.spec index 78f96d6..3ff0c18 100644 --- a/brltty.spec +++ b/brltty.spec @@ -1,73 +1,81 @@ # 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.5 %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: 1 +Version: 5.4 +Release: 6 +License: GPL v2+ (brltty and drivers), LGPL v2.1+ (APIs) Group: Daemons -License: GPL -Source0: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz -# Source0-md5: 192af5e634210616928496645e392097 -Patch0: %{name}-stat.patch +Source0: http://mielke.cc/brltty/archive/%{name}-%{version}.tar.xz +# Source0-md5: cfedd365e6237d762ad8c35b4f6fb361 +Patch1: %{name}-speech-dispatcher.patch +Patch2: %{name}-python.patch +Patch3: make.patch URL: http://mielke.cc/brltty/ -BuildRequires: at-spi-devel -BuildRequires: autoconf >= 2.62 +BuildRequires: alsa-lib-devel +%{?with_at_spi:BuildRequires: at-spi-devel} +BuildRequires: autoconf >= 2.64 BuildRequires: automake BuildRequires: bison -#BuildRequires: bluez-devel +BuildRequires: rpmbuild(macros) >= 1.710 +# 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-devel} -%{?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: systemd-devel +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 +#%{?with_mikropuhe:BuildRequires: Mikropuhe-devel (-lmikropuhe )} +#%{?with_swift:BuildRequires: Swift-devel (-lswift )} +#%{?with_theta:BuildRequires: Theta-devel (-ltheta )} +#%{?with_viavoice:BuildRequires: ViaVoice-devel (-libmeci50 )} +BuildRequires: xz BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -88,7 +96,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 +116,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 +144,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} @@ -147,18 +158,22 @@ Ten pakiet zawiera statyczną wersję biblioteki BrlAPI. Summary: BrlAPI documentation Summary(pl.UTF-8): Documentacja BrlAPI Group: Documentation +%if "%{_rpmversion}" >= "5" +BuildArch: noarch +%endif %description -n brlapi-apidocs -Documentation for BrlAPI in HTML format generated from brltty -sources by doxygen. +Documentation for BrlAPI in HTML format generated from brltty sources +by doxygen. %description -n brlapi-apidocs -l pl.UTF-8 -Dokumentacja BrlAPI w formacie HTML generowane ze -źrodeł brltty przez doxygen. +Dokumentacja BrlAPI w formacie HTML generowane ze źrodeł brltty przez +doxygen. %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 +183,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} @@ -194,30 +252,81 @@ Biblioteka BrlAPI dla Tcl. %prep %setup -q -%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build +%{__autoconf} CFLAGS="%{rpmcflags} -I/usr/include/ncurses" %configure \ + %{?with_java:JAVA_HOME=%{java_home}} \ --with-install-root="$RPM_BUILD_ROOT" \ + %{!?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} -j1 -directory="doc" -mkdir -p "$directory" -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` -do - mkdir -p "$directory/${file%/*}" - cp -rp "$file" "$directory/$file" -done +%if %{with python} +cd Bindings/Python +%py_build +cd ../.. +%endif + +%if %{with python3} +cd Bindings/Python +%py3_build +cd ../.. +%endif %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 python} +cd Bindings/Python +%py_install +cd ../.. +%endif + +%if %{with python3} +cd Bindings/Python +%py3_install +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 <