|
@@ -1,9 +1,12 @@
|
|
|
%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}
|
|
@@ -15,7 +18,7 @@
|
|
|
|
|
|
Name: brltty
|
|
|
Version: %{pkg_version}
|
|
|
-Release: 1%{?_dist_release}
|
|
|
+Release: 2%{?_dist_release}
|
|
|
Summary: Braille display driver for Linux/Unix
|
|
|
|
|
|
License: GPLv2+
|
|
@@ -153,6 +156,20 @@ 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 バインディング
|
|
@@ -190,6 +207,11 @@ This package provides the OCaml binding for BrlAPI.
|
|
|
%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
|
|
@@ -205,7 +227,7 @@ export CXXFLAGS="%{optflags} -I%{_includedir}/speech-dispatcher -fno-strict-alia
|
|
|
|
|
|
# there is no curses packages in BuildRequires, so the package builds
|
|
|
# without them in mock; let's express this decision explicitly
|
|
|
-%configure \
|
|
|
+configure_opts=" \
|
|
|
--disable-stripping \
|
|
|
--without-curses \
|
|
|
%if %{with_speech_dispatcher}
|
|
@@ -214,11 +236,19 @@ export CXXFLAGS="%{optflags} -I%{_includedir}/speech-dispatcher -fno-strict-alia
|
|
|
--with-install-root=$RPM_BUILD_ROOT \
|
|
|
JAVA_JAR_DIR=%{_jnidir} \
|
|
|
JAVA_JNI_DIR=%{_libdir}/brltty \
|
|
|
- JAVA_JNI=yes \
|
|
|
- PYTHON=%{__python}
|
|
|
+ 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 \
|
|
@@ -257,6 +287,13 @@ 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
|
|
@@ -384,6 +421,11 @@ fi
|
|
|
%{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
|
|
@@ -398,6 +440,10 @@ fi
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Wed Apr 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.2-2
|
|
|
+- add BuildRequires: python3-devel
|
|
|
+- create python3-brlapi subpackage
|
|
|
+
|
|
|
* Tue Feb 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 5.2-1
|
|
|
- updated to 5.2
|
|
|
- added speech-dispatcher, doc, and ocaml subpackages
|
|
@@ -405,7 +451,7 @@ fi
|
|
|
* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.2-2
|
|
|
- rebuild with python-2.7.2
|
|
|
|
|
|
-* Sat Nov 04 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.2-1
|
|
|
+* Fri Nov 04 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.2-1
|
|
|
- initial build for Vine Linux
|
|
|
|
|
|
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2-4
|