From 7ab3214621430773ba3a62eba7fce7006c4d9328 Mon Sep 17 00:00:00 2001 From: Ondřej Lysoněk Date: Feb 26 2018 22:22:59 +0000 Subject: [PATCH 1/3] Disable parallel build It does indeed fail sometimes. This partially reverts commit b61d90716. --- diff --git a/brltty.spec b/brltty.spec index 80cf81d..3bed343 100644 --- a/brltty.spec +++ b/brltty.spec @@ -229,13 +229,13 @@ export PYTHONCOERCECLOCALE=0 # First build everything with Python 2 support %configure $configure_opts PYTHON=%{__python2} # Parallel build seems broken, thus disabling it -make %{?_smp_mflags} +make %if 0%{?with_python3} # ... and then do it again for the Python 3 module pushd %{py3dir} %configure $configure_opts PYTHON=%{__python3} -make %{?_smp_mflags} +make popd %endif From 255c83021f40fa407a1fd86eb6c525c878db3f9f Mon Sep 17 00:00:00 2001 From: Ondřej Lysoněk Date: Feb 26 2018 22:23:01 +0000 Subject: [PATCH 2/3] Use versioned python macros This fixes the following errors during mockbuild: sh: /usr/bin/python: No such file or directory --- diff --git a/brltty.spec b/brltty.spec index 3bed343..a29cb61 100644 --- a/brltty.spec +++ b/brltty.spec @@ -399,8 +399,8 @@ fi %{tcl_sitearch}/brlapi-%{api_version} %files -n python2-brlapi -%{python_sitearch}/brlapi.so -%{python_sitearch}/Brlapi-%{api_version}-*.egg-info +%{python2_sitearch}/brlapi.so +%{python2_sitearch}/Brlapi-%{api_version}-*.egg-info %if 0%{?with_python3} %files -n python3-brlapi From d01cd093557acb231d620dc45f38903be46c27a7 Mon Sep 17 00:00:00 2001 From: Ondřej Lysoněk Date: Feb 27 2018 10:24:14 +0000 Subject: [PATCH 3/3] Fix generating the brltty-debugsource package The debugsource was not correctly picked up, because brltty built the python3 subpackage outside the assigned build directory. The build now follows http://fedoraproject.org/wiki/Packaging:Python_Appendix#Using_separate_build_directories --- diff --git a/brltty.spec b/brltty.spec index a29cb61..e896f3f 100644 --- a/brltty.spec +++ b/brltty.spec @@ -22,7 +22,7 @@ Name: brltty Version: %{pkg_version} -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://mielke.cc/brltty/ Source0: http://mielke.cc/brltty/archive/%{name}-%{version}.tar.xz @@ -185,17 +185,20 @@ This package provides the OCaml binding for BrlAPI. %define version %{pkg_version} %prep -%setup -q +%setup -qc +mv %{name}-%{version} python2 + +pushd python2 %patch1 -p1 -b .loadLibrary %patch2 -p1 -b .libspeechd # remove packaged binary file rm -f Programs/brltty-ktb +popd %if 0%{?with_python3} # Make a copy of the source tree for building the Python 3 module -rm -rf %{py3dir} -cp -a . %{py3dir} +cp -a python2 python3 %endif %build @@ -227,26 +230,21 @@ configure_opts=" \ export PYTHONCOERCECLOCALE=0 # First build everything with Python 2 support +pushd python2 %configure $configure_opts PYTHON=%{__python2} # Parallel build seems broken, thus disabling it make +popd %if 0%{?with_python3} # ... and then do it again for the Python 3 module -pushd %{py3dir} +pushd python3 %configure $configure_opts PYTHON=%{__python3} make popd %endif -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 - +pushd python2 find . -name '*.sgml' | while read file; do iconv -f iso8859-1 -t utf-8 $file > $file.conv && mv -f $file.conv $file @@ -260,6 +258,14 @@ while read file; do iconv -f iso8859-1 -t utf-8 $file > $file.conv && mv -f $file.conv $file done +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 +popd %install %if 0%{?with_ocaml} @@ -267,29 +273,45 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs %endif # Python 2 +pushd python2 make install JAVA_JAR_DIR=%{_jnidir} \ JAVA_JNI_DIR=%{_libdir}/brltty \ JAVA_JNI=yes +popd %if 0%{?with_python3} # Python 3 -pushd %{py3dir} +pushd python3 make install JAVA_JAR_DIR=%{_jnidir} \ JAVA_JNI_DIR=%{_libdir}/brltty \ JAVA_JNI=yes popd %endif +pushd python2 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 install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/brltty.service +cp -p LICENSE* ../ + # clean up the manuals: rm Documents/Manual-*/*/{*.mk,*.made,Makefile*} mv Documents/BrlAPIref/{html,BrlAPIref} +for i in Drivers/Speech/SpeechDispatcher/README \ + Documents/ChangeLog Documents/TODO \ + Documents/Manual-BRLTTY \ + Drivers/Braille/XWindow/README \ + Drivers/Braille/XWindow/README \ + Documents/Manual-BrlAPI \ + Documents/BrlAPIref/BrlAPIref \ +; do + mkdir -p ../${i%/*} && cp -rp $i ../$i || exit 1 +done + # Don't want static lib rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a @@ -304,11 +326,12 @@ chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/brltty-config # handle locales %find_lang %{name} +cp -p %{name}.lang ../ #Use python 3 for latex-access, BZ 1465657. /usr/bin/2to3 -wn ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb sed -i 's|/usr/bin/python|/usr/bin/python3|g' ${RPM_BUILD_ROOT}/etc/brltty/Contraction/latex-access.ctb - +popd %post %systemd_post brltty.service @@ -419,6 +442,9 @@ fi %endif %changelog +* Mon Feb 26 2018 Ondřej Lysoněk - 5.6-3 +- Fix generating the brltty-debugsource package + * Mon Feb 12 2018 Gwyn Ciesla - 5.6-2 - Flag fixes.