File emacs-vm.spec of Package emacs-vm

# spec file for package emacs-vm
# Copyright (c) 2017 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

Name:           emacs-vm
Version:        8.2.0b
Release:        0
Summary:        VM - a mail reader for GNU Emacs
License:        GPL-2.0+
Group:          Productivity/Text/Editors
Source2:        emacs-vm-autoload.el
# PATCH-FIX-UPSTREAM U_rev-1313.patch bsc#939497 -- Fix Launchpad lp#793541 and lp#907286
Patch1:         U_rev-1313.patch
Patch2:         U_Require-vm-reply.el-from-vm-compose-mail.patch
BuildRequires:  emacs-nox
BuildRequires:  makeinfo
Requires:       ed
Requires:       emacs
Requires(post): %{install_info_prereq}
Requires(pre):  %{install_info_prereq}

VM (View Mail) is an Emacs subsystem that allows UNIX mail to be read
and disposed of within Emacs.  Commands exist to do the normal things
expected of a mail user agent, such as generating replies, saving
messages to folders, deleting messages and so on.  There are other more
advanced commands that do tasks like bursting and creating digests,
message forwarding, and organizing message presentation according to
various criteria.

%define _sitedir %{_prefix}/share/emacs/site-lisp
%define _vmdir  %{_sitedir}/vm
%define _infodir %{_prefix}/share/info
%define _vmetcdir %{_prefix}/share/emacs/${emacs_ver}/etc/vm
%define _vmdocdir %{_prefix}/share/doc/packages/%{name}

%setup -q -n vm-%{version}
%patch2 -p1

export LC_CTYPE=ISO-8859-1
EMACS="emacs --no-site"
emacs_ver=$(rpm -q --qf '%%{VERSION}' emacs)
rm -rf lisp/*.elc
%configure FLAGS="-batch -q -no-site-file -no-init-file -l \$(srcdir)/vm-build.el" --with-etcdir=%{_vmetcdir} --with-docdir=%{_vmdocdir}
make %{?_smp_mflags} DESTDIR=%{buildroot} MAKEINFO="makeinfo --force"

mkdir -p %{buildroot}
  echo ";; %{_datadir}/emacs/site-lisp/suse-start-%{name}.el"
  cat %{SOURCE2}
  echo ";; %{_datadir}/emacs/site-lisp/suse-start-%{name}.el ends here"
} > %{buildroot}%{_sitedir}/suse-start-%{name}.el

%install_info --info-dir=%{_infodir} %{_infodir}/{ext_info}

%install_info_delete --info-dir=%{_infodir} %{_infodir}/{ext_info}

%docdir %{_vmdocdir}
%dir %{_sitedir}
%dir %{_vmdir}
%dir %{_datadir}/emacs/*%{_sysconfdir}/vm
%exclude %{_datadir}/emacs/*%{_sysconfdir}/vm/README
%exclude %{_datadir}/emacs/*%{_sysconfdir}/vm/CHANGES
%exclude %{_datadir}/emacs/*%{_sysconfdir}/vm/COPYING
%exclude %{_datadir}/emacs/*%{_sysconfdir}/vm/NEWS
%exclude %{_datadir}/emacs/*%{_sysconfdir}/vm/TODO

openSUSE Build Service is sponsored by