]> git.pld-linux.org Git - packages/brltty.git/blobdiff - brltty.spec
automatic change: use py_build/py_install macros
[packages/brltty.git] / brltty.spec
index 0bcc0e09bb108ab38945027a55dd9cad90bf351d..5fbf17879d8d124a43be459feb23f12a39e45c75 100644 (file)
@@ -6,29 +6,36 @@
 %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_without at_spi                  # AtSpi screen 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.5.7
+%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.4
-Release:       1
+Version:       5.2
+Release:       7
 Group:         Daemons
 License:       GPL v2+ (brltty and drivers), LGPL v2.1+ (APIs)
-Source0:       http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 8ebe96efe679f5f6ccff08928fec5b26
-Patch0:                %{name}-stat.patch
+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: alsa-lib-devel
 %{?with_at_spi:BuildRequires:  at-spi-devel}
@@ -40,16 +47,22 @@ BuildRequires:      bluez-libs-devel
 %{?with_at_spi2:BuildRequires: dbus-devel >= 1.0}
 %{?with_apidocs:BuildRequires: doxygen}
 %{?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_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
@@ -57,17 +70,11 @@ BuildRequires:      xorg-lib-libXext-devel
 BuildRequires: xorg-lib-libXt-devel
 BuildRequires: xorg-lib-libXtst-devel
 %endif
-%{?with_libbraille:BuildRequires:      libbraille-devel}
-%{?with_flite:BuildRequires:   flite-devel}
-# libbrlttysmp
-#BR: Mikropuhe-devel (-lmikropuhe <mpwrfile.h>)
-%{?with_speech_dispatcher:BuildRequires:       speech-dispatcher-devel}
-# libbrlttyssw
-#BR: Swift-devel (-lswift <swift.h>)
-# libbrlttysth
-#BR: Theta-devel (-ltheta <theta.h>)
-# libbrlttysvv
-#BR: ViaVoice-devel (-libmeci50 <eci.h>)
+BuildRequires: xz
+#%{?with_mikropuhe:BuildRequires:      Mikropuhe-devel (-lmikropuhe <mpwrfile.h>)}
+#%{?with_swift:BuildRequires:  Swift-devel (-lswift <swift.h>)}
+#%{?with_theta:BuildRequires:  Theta-devel (-ltheta <theta.h>)}
+#%{?with_viavoice:BuildRequires:       ViaVoice-devel (-libmeci50 <eci.h>)}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -201,17 +208,30 @@ OCaml binding for BrlAPI - development files.
 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
@@ -229,10 +249,14 @@ Biblioteka BrlAPI dla Tcl.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -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} \
@@ -248,6 +272,13 @@ CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
 
 %{__make} -j1
 
+%if %{with python3}
+cd Bindings/Python
+%py3_build \
+       -b build-3
+cd ../..
+%endif
+
 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`
@@ -262,6 +293,27 @@ rm -rf $RPM_BUILD_ROOT
 %{__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
@@ -269,6 +321,11 @@ cat >$RPM_BUILD_ROOT/usr/lib/tmpfiles.d/brltty.conf <<EOF
 d /var/run/brltty 0755 root root -
 EOF
 
+# no sign in source wheter it is zh_CN or zh_TW so just remove it
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh
+
+%find_lang %{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -551,16 +608,16 @@ exit 0
 %post  -n brlapi -p /sbin/ldconfig
 %postun        -n brlapi -p /sbin/ldconfig
 
-%files
+%files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc Documents/{Manual-BRLTTY/English/BRLTTY*,ChangeLog,HISTORY,TODO}
-%doc doc/{Bindings,Bootdisks,Drivers,Patches,Tables,README,nsistrings.txt}
+%doc doc/{Bindings,Bootdisks,Drivers,Patches,Tables,README}
 %attr(755,root,root) %{_bindir}/brltty
 %attr(755,root,root) %{_bindir}/brltty-config
 %attr(755,root,root) %{_bindir}/brltty-ctb
-%attr(755,root,root) %{_bindir}/brltty-install
 %attr(755,root,root) %{_bindir}/brltty-trtxt
 %attr(755,root,root) %{_bindir}/brltty-ttb
+%attr(755,root,root) %{_bindir}/eutp
 %attr(755,root,root) %{_bindir}/vstp
 %{?with_x:%attr(755,root,root) %{_bindir}/xbrlapi}
 %dir %{_libdir}/brltty
@@ -574,18 +631,20 @@ exit 0
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbm.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybbn.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybcb.so
+%attr(755,root,root) %{_libdir}/brltty/libbrlttybce.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybec.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybeu.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybfs.so
+%attr(755,root,root) %{_libdir}/brltty/libbrlttybhd.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybhm.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybht.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybhw.so
-%attr(755,root,root) %{_libdir}/brltty/libbrlttybil.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybir.so
 %{?with_libbraille:%attr(755,root,root) %{_libdir}/brltty/libbrlttyblb.so}
 %attr(755,root,root) %{_libdir}/brltty/libbrlttyblt.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmb.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmd.so
+%attr(755,root,root) %{_libdir}/brltty/libbrlttybmm.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmn.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybmt.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttybnp.so
@@ -608,11 +667,11 @@ exit 0
 %{?with_flite:%attr(755,root,root) %{_libdir}/brltty/libbrlttysfl.so}
 %attr(755,root,root) %{_libdir}/brltty/libbrlttysfv.so
 %attr(755,root,root) %{_libdir}/brltty/libbrlttysgs.so
-#%{?with_mikropuhe:%attr(755,root,root) %{_libdir}/brltty/libbrlttysmp.so}
+%{?with_mikropuhe:%attr(755,root,root) %{_libdir}/brltty/libbrlttysmp.so}
 %{?with_speech_dispatcher:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssd.so}
-#%{?with_swift:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssw.so}
-#%{?with_theta:%attr(755,root,root) %{_libdir}/brltty/libbrlttysth.so}
-#%{?with_viavoice:%attr(755,root,root) %{_libdir}/brltty/libbrlttysvv.so}
+%{?with_swift:%attr(755,root,root) %{_libdir}/brltty/libbrlttyssw.so}
+%{?with_theta:%attr(755,root,root) %{_libdir}/brltty/libbrlttysth.so}
+%{?with_viavoice:%attr(755,root,root) %{_libdir}/brltty/libbrlttysvv.so}
 %attr(755,root,root) %{_libdir}/brltty/libbrlttysxs.so
 # screen drivers
 %{?with_at_spi2:%attr(755,root,root) %{_libdir}/brltty/libbrlttyxa2.so}
@@ -625,13 +684,19 @@ exit 0
 %dir /var/lib/BrlAPI
 %dir /var/run/brltty
 %{_mandir}/man1/brltty.1*
+%{_mandir}/man1/eutp.1*
 %{_mandir}/man1/vstp.1*
 %{?with_x:%{_mandir}/man1/xbrlapi.1*}
 
+%if %{with x}
+# gdm autostart - subpackage?
+#%{_datadir}/gdm/greeter/autostart/xbrlapi.desktop
+%endif
+
 %files -n brlapi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libbrlapi.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libbrlapi.so.0.5
+%attr(755,root,root) %ghost %{_libdir}/libbrlapi.so.0.6
 
 %files -n brlapi-devel
 %defattr(644,root,root,755)
@@ -662,7 +727,6 @@ exit 0
 %files -n ocaml-brlapi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so
-%{_libdir}/ocaml/stublibs/dllbrlapi_stubs.so.owner
 
 %files -n ocaml-brlapi-devel
 %defattr(644,root,root,755)
@@ -678,6 +742,13 @@ exit 0
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/brlapi.so
 %{py_sitedir}/Brlapi-%{brlapi_ver}-py*.egg-info
+
+%if %{with python3}
+%files -n python3-brlapi
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/brlapi.cpython-*.so
+%{py3_sitedir}/Brlapi-%{brlapi_ver}-py*.egg-info
+%endif
 %endif
 
 %if %{with tcl}
This page took 0.379079 seconds and 4 git commands to generate.