Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:go
golang-github-nsf-gocode
golang-github-nsf-gocode.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File golang-github-nsf-gocode.spec of Package golang-github-nsf-gocode
# # spec file for package golang # # Copyright (c) 2015-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/ # %global provider github %global provider_tld com %global project nsf %global repo gocode %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global git_sha b672b49f # emacs really requires auto-complete and company-mode to be installed. # Presently, these are not available as a package - in which case we # retain the original behavior and install go-autocomplete into the # site-lisp directory and rely on the user to get auto-complete from # another source (MELPA) %bcond_with have_autocomplete %bcond_with have_company Name: golang-%{provider}-%{project}-%{repo} Version: 0.0.0+git20170907.%{git_sha} Release: 0 Summary: An autocompletion daemon for the Go programming language License: MIT Group: Development/Languages/Golang Url: https://%{provider_prefix} Source0: https://codeload.%{provider_prefix}/tar.gz/%{git_sha}#/%{repo}-%{version}.tar.gz Source1: %{name}-rpmlintrc BuildRequires: golang-packaging BuildRequires: xz BuildRequires: vim %{go_nostrip} %{go_provides} %description Gocode is a helper tool which is intended to be integrated with your source code editor such as vim or emacs. It uses a client-server architecture for caching purposes (hence "daemon") and provides context-sensitive autocompletion. %package -n gocode Summary: An autocompletion daemon for the Go programming language Group: Development/Languages/Golang AutoReqProv: Off %{go_exclusivearch} %description -n gocode Gocode is a helper tool which is intended to be integrated with your source code editor such as vim or emacs. It uses a client-server architecture for caching purposes (hence "daemon") and provides context-sensitive autocompletion. %package -n vim-completion-golang Summary: Golang autocompletion files for Vim Group: Productivity/Text/Editors BuildArch: noarch AutoReqProv: Off Requires: gocode = %{version} Requires: vim Provides: vim-plugin-gocode = %{version} %description -n vim-completion-golang Vim autocompletion for the Go programming language. %package -n emacs-completion-golang Summary: Golang autocompletion files for Emacs Group: Productivity/Text/Editors BuildArch: noarch AutoReqProv: Off Requires: gocode = %{version} Requires: emacs %if %{with have_autocomplete} BuildRequires: emacs-nox BuildRequires: emacs-auto-complete Requires: emacs-auto-complete %endif %description -n emacs-completion-golang Emacs autocompletion for the Go programming language. %if %{without have_autocomplete} Add the following to your emacs-config: ```lisp (require 'go-autocomplete) ; load go autocompletion backend ``` %endif %package -n emacs-company-go Summary: Golang company files for Emacs Group: Productivity/Text/Editors BuildArch: noarch AutoReqProv: Off Requires: gocode = %{version} Requires: emacs %if %{with have_company} BuildRequires: emacs-nox BuildRequires: emacs-company-mode BuildRequires: emacs-golang-mode Requires: emacs-company-mode Requires: emacs-golang-mode %endif %description -n emacs-company-go Emacs company mode for the Go programming language. %define _sitedir %{_datadir}/emacs/site-lisp %define _lispdir %{_sitedir}/gocode %define _startdir %{_sitedir}/site-start.d %prep %setup -q -n %{repo}-%{git_sha} go mod init %{import_path} go mod tidy %goprep %{import_path} %build %if %{with have_autocomplete} cd emacs emacs -L . -batch -f batch-byte-compile go-autocomplete.el emacs -Q -L . -batch --eval "(update-file-autoloads \"go-autocomplete.el\" t \"$PWD/go-autocomplete-autoload.el\")" cd - %endif %if %{with have_company} cd emacs-company emacs -L . -batch -f batch-byte-compile emacs-company/company-go.el emacs -Q -L . -batch --eval "(update-file-autoloads \"company-go.el\" t \"$PWD/company-go-autoload.el\")" cd - %endif %gobuild ... %install %goinstall %gosrc %gofilelist # vim-completion-golang mkdir -p %{buildroot}%{_datadir}/vim/site/autoload/ install -Dm644 %{_builddir}/gocode-%{git_sha}/vim/autoload/gocomplete.vim \ %{buildroot}%{_datadir}/vim/site/autoload/gocomplete.vim install -Dm644 %{_builddir}/gocode-%{git_sha}/vim/ftplugin/go/gocomplete.vim \ %{buildroot}%{_datadir}/vim/site/ftplugin/go/gocomplete.vim # emacs-completion-golang %if %{with have_autocomplete} || %{with have_company} install -pm 755 -d %{buildroot}/%{_lispdir} install -pm 755 -d %{buildroot}/%{_startdir} %endif %if %{without have_autocomplete} install -pm 755 -d %{buildroot}/%{_sitedir} install -m 644 emacs/go-autocomplete.el %{buildroot}/%{_sitedir} %else install -m 644 emacs/go-autocomplete.el{,c} %{buildroot}/%{_lispdir} install -m 644 emacs/go-autocomplete-autoload.el %{buildroot}/%{_lispdir} cat <<EOF > %{buildroot}/%{_startdir}/go-autocomplete-init.el (add-to-list 'load-path "%{_lispdir}") (require 'go-autocomplete-autoload) EOF %endif %if %{with have_company} install -m 644 emacs-company/company-go.el{,c} %{buildroot}/%{_lispdir} install -m 644 emacs-company/company-go-autoload.el %{buildroot}/%{_lispdir} cat <<EOF > %{buildroot}/%{_startdir}/company-go-init.el (add-to-list 'load-path "%{_lispdir}") (require 'company-go-autoload) EOF %endif %check %gotest --mode=vendor %{import_path}... %files -f file.lst %doc README.md LICENSE %files -n gocode %{_bindir}/gocode %files -n vim-completion-golang %{_datadir}/vim/site/autoload/gocomplete.vim %dir %{_datadir}/vim/site/ftplugin %dir %{_datadir}/vim/site/ftplugin/go %{_datadir}/vim/site/ftplugin/go/gocomplete.vim %files -n emacs-completion-golang %if %{without have_autocomplete} %{_sitedir}/go-autocomplete.el %else %dir %{_lispdir} %{_lispdir}/go-autocomplete.el{,c} %{_lispdir}/go-autocomplete-autoload.el %{_startdir}/go-autocomplete-init.el %endif %if %{with have_company} %files -n emacs-company-go %doc emacs-company/README.md %dir %{_lispdir} %{_lispdir}/company-go.el{,c} %{_lispdir}/company-go-autoload.el %{_startdir}/company-go-init.el %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor