File emacs-haskell-mode.spec of Package emacs-haskell-mode

#
# spec file for package emacs-haskell-mode
#
# Copyright (c) 2016 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-haskell-mode
Version:        13.18
Release:        0
Summary:        Haskell mode for EMACS
License:        GPL-3.0
Group:          Productivity/Text/Editors
Url:            http://projects.haskell.org/haskellmode-emacs/
Source:         https://github.com/haskell/haskell-mode/archive/v%{version}.tar.gz
Source1:        suse-start-haskell-mode.el
BuildRequires:  emacs-nox
BuildRequires:  git
BuildRequires:  makeinfo
Requires:       emacs
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Haskell-mode is a major Emacs mode for editing Haskell source code. It
provides syntax highlighting and automatic indentation and comes with
inf-haskell which allows interaction with an inferior Haskell interactive loop
such as the one of Hugs or GHCi.

%define _sitedir %{_datadir}/emacs/site-lisp
%define _lispdir %{_sitedir}/haskell-mode

%prep
%setup -q -n haskell-mode-%{version}

%build
make %{?_smp_mflags}

%install
emacs_version=$(emacs -Q --batch --eval '(princ emacs-version)')
install -pm 755 -d %{buildroot}%{_lispdir}/haskell-mode
install -pm 644 build-$emacs_version/*.elc %{buildroot}%{_lispdir}/
install -pm 644 haskell-mode-autoloads.el %{buildroot}%{_lispdir}/haskell-mode-autoloads.el
install -pm 644 %{SOURCE1} %{buildroot}%{_sitedir}/suse-start-haskell-mode.el
install -D -pm 644 haskell-mode.info %{buildroot}%{_infodir}/haskell-mode.info

%post
%install_info --info-dir=%{_infodir} %{_infodir}/haskell-mode.info

%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/haskell-mode.info

%files
%defattr(-,root,root,-)
%dir %{_lispdir}
%doc COPYING NEWS README.md
%{_infodir}/haskell-mode.info%{ext_info}
%{_lispdir}/*.elc
%{_lispdir}/haskell-mode-autoloads.el
%{_sitedir}/suse-start-haskell-mode.el

%changelog
openSUSE Build Service is sponsored by