File emacs-golang-mode.spec of Package emacs-golang-mode
#
# spec file for package emacs-golang-mode
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
Name: emacs-golang-mode
Version: 1.6.0
Release: 0
Summary: Emacs Mode for the Go Language
License: BSD-3-Clause
URL: https://github.com/dominikh/go-mode.el
Source: https://github.com/dominikh/go-mode.el/archive/refs/tags/v%{version}.tar.gz#/go-mode-%{version}.tar.gz
BuildRequires: emacs-nox
Requires: emacs
BuildArch: noarch
%description
Go-mode is a major Emacs mode for editing Go source code.
Besides to usual features like syntax-based navigation,
indentation, fontification it provides
* integration with gofmt, godoc, godef and the Go Playground
* manages Imports
* basic imenu support
* support for displaying code coverage calculated by 'go test'
* several functions to navigate inside functions
* GOPATH detection
%define _sitedir %{_datadir}/emacs/site-lisp
%define _lispdir %{_sitedir}/go-mode
%define _startdir %{_sitedir}/site-start.d
%prep
%setup -q -n go-mode.el-%{version}
%files
%license LICENSE
%doc NEWS AUTHORS README.md
%dir %{_lispdir}
%{_lispdir}/go-mode.el{,c}
%{_lispdir}/go-guru.el{,c}
%{_lispdir}/go-rename.el{,c}
%{_startdir}/go-mode-init.el{,c}
%{_lispdir}/go-mode-autoloads.el
%build
emacs -Q -L . -batch -f batch-byte-compile *.el
emacs -Q -L . -batch --eval "(require 'package)" --eval "(package-generate-autoloads \"go-mode\" \"$PWD\")"
%install
install -pm 755 -d %{buildroot}/%{_lispdir}
install -m 644 *.el{,c} %{buildroot}/%{_lispdir}
install -m 644 go-mode-autoloads.el %{buildroot}/%{_lispdir}
install -pm 755 -d %{buildroot}/%{_startdir}
cat << EOF > %{buildroot}/%{_startdir}/go-mode-init.el
(add-to-list 'load-path "%{_lispdir}")
(load "go-mode-autoloads")
EOF
%changelog