File emacs-haskell-mode.spec of Package emacs-haskell-mode
#
# spec file for package emacs-haskell-mode
#
# 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/
#
Name: emacs-haskell-mode
Version: 16.1
Release: 0
Summary: Haskell mode for EMACS
License: GPL-3.0-or-later
Group: Productivity/Text/Editors
URL: http://haskell.github.io/haskell-mode/
Source: http://github.com/haskell/haskell-mode/archive/v%{version}.tar.gz#/haskell-mode-%{version}.tar.gz
Source1: suse-start-haskell-mode.el
# PATCH-FIX-UPSTREAM GHCi8.2.1-response.patch ptrommler@icloud.com -- Accept new GHCi response when reloading modules
Patch1: GHCi8.2.1-response.patch
BuildRequires: emacs-nox
BuildRequires: git
BuildRequires: makeinfo
Requires: emacs
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
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}
%patch1 -p1
%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
%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