Merge branch 'master' of ssh://pkgs.fedoraproject.org/brltty
Conflicts: brltty.spec
This commit is contained in:
commit
81241b8a90
62
brltty.spec
62
brltty.spec
@ -1,8 +1,14 @@
|
||||
%define pkg_version 4.5
|
||||
%define api_version 0.6.0
|
||||
|
||||
%global with_python3 1
|
||||
|
||||
%if 0%{?rhel}
|
||||
%global with_python3 0
|
||||
%endif
|
||||
|
||||
%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
|
||||
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
|
||||
%{!?tcl_sitearch: %global tcl_sitearch %{_prefix}/%{_lib}/tcl%{tcl_version}}
|
||||
|
||||
# with speech dispatcher iff on Fedora:
|
||||
%define with_speech_dispatcher 0%{?fedora}
|
||||
@ -49,6 +55,15 @@ Requires: %{name} = %{pkg_version}-%{release}
|
||||
This package provides the Speech Dispatcher driver for BRLTTY.
|
||||
%endif
|
||||
|
||||
%package docs
|
||||
Summary: Documentation for BRLTTY
|
||||
Group: System Environment/Daemons
|
||||
License: GPLv2+
|
||||
Requires: %{name} = %{pkg_version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description docs
|
||||
This package provides the documentation for BRLTTY.
|
||||
|
||||
%package xw
|
||||
Summary: XWindow driver for BRLTTY
|
||||
Group: System Environment/Daemons
|
||||
@ -121,6 +136,7 @@ Summary: Python binding for BrlAPI
|
||||
%description -n python-brlapi
|
||||
This package provides the Python binding for BrlAPI.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-brlapi
|
||||
Version: %{api_version}
|
||||
Group: Development/System
|
||||
@ -131,6 +147,7 @@ BuildRequires: python3-devel
|
||||
Summary: Python 3 binding for BrlAPI
|
||||
%description -n python3-brlapi
|
||||
This package provides the Python 3 binding for BrlAPI.
|
||||
%endif
|
||||
|
||||
%package -n brlapi-java
|
||||
Version: %{api_version}
|
||||
@ -162,9 +179,11 @@ This package provides the OCaml binding for BrlAPI.
|
||||
%setup -q
|
||||
%patch4 -p1 -b .loadLibrary
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# Make a copy of the source tree for building the Python 3 module
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
# Add the openjdk include directories to CPPFLAGS
|
||||
@ -193,11 +212,13 @@ configure_opts=" \
|
||||
%configure $configure_opts PYTHON=%{__python2}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# ... and then do it again for the Python 3 module
|
||||
pushd %{py3dir}
|
||||
%configure $configure_opts PYTHON=%{__python3}
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
%endif
|
||||
|
||||
find . \( -path ./doc -o -path ./Documents \) -prune -o \
|
||||
\( -name 'README*' -o -name '*.txt' -o -name '*.html' -o \
|
||||
@ -226,12 +247,14 @@ make install JAVA_JAR_DIR=%{_jnidir} \
|
||||
JAVA_JNI_DIR=%{_libdir}/brltty \
|
||||
JAVA_JNI=yes
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# Python 3
|
||||
pushd %{py3dir}
|
||||
make install JAVA_JAR_DIR=%{_jnidir} \
|
||||
JAVA_JNI_DIR=%{_libdir}/brltty \
|
||||
JAVA_JNI=yes
|
||||
popd
|
||||
%endif
|
||||
|
||||
install -d -m 755 "${RPM_BUILD_ROOT}%{_sysconfdir}" "$RPM_BUILD_ROOT%{_mandir}/man5"
|
||||
install -m 644 Documents/brltty.conf "${RPM_BUILD_ROOT}%{_sysconfdir}"
|
||||
@ -248,26 +271,6 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/libbrlapi.a
|
||||
|
||||
%post
|
||||
%systemd_post brltty.service
|
||||
devices="/dev/vcsa /dev/vcsa0 /dev/vcc/a"
|
||||
install=true
|
||||
for device in ${devices}
|
||||
do
|
||||
if [ -c "${device}" ]
|
||||
then
|
||||
install=false
|
||||
break
|
||||
fi
|
||||
done
|
||||
if $install
|
||||
then
|
||||
device="$(set -- ${devices} && echo "${1}")"
|
||||
mkdir -p "${device%/*}"
|
||||
mknod -m o= "${device}" c 7 128
|
||||
chmod 660 "${device}"
|
||||
chown root.tty "${device}"
|
||||
fi
|
||||
exit 0
|
||||
|
||||
|
||||
%preun
|
||||
%systemd_preun brltty.service
|
||||
@ -293,9 +296,6 @@ exit 0
|
||||
%endif
|
||||
%exclude %{_libdir}/brltty/libbrlttyxas.so
|
||||
%doc LICENSE-GPL LICENSE-LGPL
|
||||
%doc Documents/ChangeLog Documents/TODO
|
||||
%doc Documents/Manual-BRLTTY/
|
||||
%doc doc/*
|
||||
%doc %{_mandir}/man[15]/brltty.*
|
||||
|
||||
%if %{with_speech_dispatcher}
|
||||
@ -304,6 +304,11 @@ exit 0
|
||||
%{_libdir}/brltty/libbrlttyssd.so
|
||||
%endif
|
||||
|
||||
%files docs
|
||||
%doc Documents/ChangeLog Documents/TODO
|
||||
%doc Documents/Manual-BRLTTY/
|
||||
%doc doc/*
|
||||
|
||||
%files xw
|
||||
%doc Drivers/Braille/XWindow/README
|
||||
%{_libdir}/brltty/libbrlttybxw.so
|
||||
@ -335,9 +340,11 @@ exit 0
|
||||
%{python_sitearch}/brlapi.so
|
||||
%{python_sitearch}/Brlapi-%{api_version}-*.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-brlapi
|
||||
%{python3_sitearch}/brlapi.cpython-*.so
|
||||
%{python3_sitearch}/Brlapi-%{api_version}-*.egg-info
|
||||
%endif
|
||||
|
||||
%files -n brlapi-java
|
||||
%{_libdir}/brltty/libbrlapi_java.so
|
||||
@ -350,8 +357,13 @@ exit 0
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Apr 30 2013 Jon Ciesla <limburgher@gmail.com> - 4.5-5
|
||||
* Fri May 10 2013 Jon Ciesla <limburgher@gmail.com> - 4.5-5
|
||||
- Add systemd unit file, BZ 916628.
|
||||
- Drop spurious post scripts.
|
||||
- Move eveything but man pages and license files top -docs.
|
||||
|
||||
* Thu May 9 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 4.5-4
|
||||
- Conditionally build python3
|
||||
|
||||
* Tue Apr 30 2013 Jon Ciesla <limburgher@gmail.com> - 4.5-3
|
||||
- Add bluetooth support, BZ 916628.
|
||||
|
Loading…
Reference in New Issue
Block a user