File emacs-magit.spec of Package emacs-magit

#
# spec file for package emacs-magit
#
# 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 http://bugs.opensuse.org/
#


Name:           emacs-magit
Version:        2.11.0
Release:        0
Summary:        Git interaction mode for emacs
License:        GPL-3.0+
Group:          Productivity/Editors/Emacs
Url:            https://github.com/magit/magit/
Source0:        https://github.com/magit/magit/archive/%{version}.tar.gz
BuildRequires:  emacs-dash
#BuildRequires:  emacs-magit-popup
BuildRequires:  emacs-nox
BuildRequires:  emacs-with-editor > 2.5.0
BuildRequires:  git-core
BuildRequires:  make
BuildRequires:  makeinfo
Requires:       emacs
Requires:       emacs-dash
#Requires:       emacs-magit-popup
Requires:       emacs-with-editor > 2.5.0
Requires:       git-core
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%define _lispdir %{_datadir}/emacs/site-lisp/
%define _magit_make make PREFIX=%{_prefix} DESTDIR=%{buildroot} lispdir=%{_lispdir} LOAD_PATH="-L %{_lispdir} -L ./lisp -L ."

%description
Magit is an interface to the version control system Git, implemented as an
Emacs package. Magit aspires to be a complete Git porcelain. While we
cannot (yet) claim that Magit wraps and improves upon each and every Git
command, it is complete enough to allow even experienced Git users to perform
almost all of their daily version control tasks directly from within Emacs.

%prep
%setup -q -n magit-%{version}

%build
%{_magit_make} -C lisp magit-version.el
%{_magit_make} all

%check
env GIT_AUTHOR_NAME="Joe Doe" GIT_AUTHOR_EMAIL="joe@example.org" GIT_COMMITTER_NAME="Joe Doe" GIT_COMMITTER_EMAIL="joe@example.org" LANG=en_US.UTF-8 %{_magit_make} test

%install
%{_magit_make} install
rm %{buildroot}/%{_datadir}/doc/magit/AUTHORS.md

%post
%install_info --info-dir=%{_infodir} %{_infodir}/magit.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/magit-popup.info.gz

%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/magit.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/magit-popup.info.gz

%files
%defattr(-,root,root,-)
%doc README.md
%doc COPYING
%doc Documentation/AUTHORS.md
%{_lispdir}/magit*.el
%{_lispdir}/magit*.elc
%{_lispdir}/git-commit.el
%{_lispdir}/git-commit.elc
%{_lispdir}/git-rebase.el
%{_lispdir}/git-rebase.elc
%{_infodir}/magit.info.gz
%{_infodir}/magit-popup.info.gz

%changelog
openSUSE Build Service is sponsored by