File emacspeak.spec of Package emacspeak
#
# spec file for package emacspeak
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define eroot %{_datadir}/emacs/site-lisp/%{name}
Name: emacspeak
Version: 48.0
Release: 0
Summary: Emacspeak - The Complete Audio Desktop
License: GPL-2+
#Group: System/Daemons
Url: http://emacspeak.sf.net
Source0: https://github.com/tvraman/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2
BuildRequires: emacs-nox
BuildRequires: gcc-c++
BuildRequires: espeak-devel
BuildRequires: tcl-devel
Requires: emacs
Requires: tclx
Recommends: %{name}-server-espeak
%description
Emacspeak is a speech interface that allows visually impaired users to
interact independently and efficiently with the computer. Audio formatting
--a technique pioneered by AsTeR-- and full support for W3C's Aural CSS
(ACSS) allows Emacspeak to produce rich aural presentations of electronic
information. By seamlessly blending all aspects of the Internet such as
Web-surfing and messaging, Emacspeak speech-enables local and remote
information via a consistent and well-integrated user interface.
%package doc
Summary: Manual for emacspeak
BuildArch: noarch
Supplements: emacspeak
%description doc
The texinfo documentation provided with emacspeak.
%prep
%setup -q
for i in `find . -type f -exec grep -q /usr/bin/tcl$ '{}' ';' -print` ; do
sed -i -e "s%#!/usr/bin/tcl$%#!/usr/bin/tclsh\npackage require Tclx%" $i
done
sed -i s/FLAVOR/emacs/ etc/emacspeak.sh
sed -i s=$servers/linux-espeak=%{_libdir}/%{name}/linux-espeak= servers/espeak
sed -i s=ELCDIR=%{eroot}= etc/emacspeak.sh
%build
make config
make
make espeak
rm lisp/emacspeak-loaddefs.el~
# Remove sym links
rm info/applications.html info/tips.html
%install
install -d %{buildroot}%{eroot}
cp -a . %{buildroot}%{eroot}
install -d %{buildroot}%{_bindir}
mv %{buildroot}%{eroot}/etc/emacspeak.sh %{buildroot}%{_bindir}/emacspeak
rm %{buildroot}%{eroot}/servers/*/*.cpp
rm %{buildroot}%{eroot}/servers/*/*.h
rm %{buildroot}%{eroot}/servers/*/*.o
install -d %{buildroot}%{_libdir}/%{name}
mv %{buildroot}%{eroot}/servers/linux-espeak %{buildroot}%{_libdir}/%{name}
install -d %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{eroot}/etc/NEWS* %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{eroot}/etc/*.html %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{eroot}/info/*.html %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{eroot}/info/*.info* %{buildroot}%{_docdir}/%{name}
rm -r %{buildroot}%{eroot}/info
%files
%defattr(-, root, root)
%{_bindir}/%{name}
%{_docdir}/%{name}/
%exclude %{_docdir}/%{name}/*.info
%{_libdir}/%{name}/
%{eroot}/
%files doc
%{_docdir}/%{name}/*.info
%changelog