Help with go spec file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm fairly new to go and am looking to make a spec file and build jsonnet (https://github.com/google/go-jsonnet/, https://jsonnet.org/).

The go2rpm utility has proven very helpful, but there appear to be two irregularities with building this package that I don't know offhand how to address (including from reading https://docs.fedoraproject.org/en-US/packaging-guidelines/Golang/).

1) What is the preferred way to ignore (or remove) unnecessary BUILD.bazel files? There is one in cmd/ which is obviously not a buildable command, and so this results in an error in the naive use case.

2) How should nested folders in cmd/ be built? Here, again, the basic template throws an error since cmd/internal contains no *.go files, only a BUILD.bezel file and a nested cmd directory.

Thank you all,
fuller

--
Mark E. Fuller, Ph.D.
fuller@xxxxxxxxxxxxxxxxx
fuller@xxxxxxxxxxxxx
@fuller:one.ems.host
https://www.stossrohr.net
PGP Fingerprint: 73F1 A30C BDF4 DB4B C75F FD0F D599 E76C FFCA BF60
# Generated by go2rpm 1.6.0
%bcond_without check

# https://github.com/google/go-jsonnet
%global goipath         github.com/google/go-jsonnet
Version:                0.18.0

%gometa

%global common_description %{expand:
This an implementation of Jsonnet in pure Go.
It is a feature complete, production-ready implementation.
It is compatible with the original Jsonnet C++ implementation.
Bindings to C and Python are available (but not battle-tested yet).}

%global golicenses      LICENSE
%global godocs          README.md linter/README.md

Name:           %{goname}
Release:        %autorelease
Summary:        None

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            %{gourl}
Source0:        %{gosource}

%description
%{common_description}

%gopkg

%prep
%goprep

%generate_buildrequires
%go_generate_buildrequires

%build
for cmd in cmd/* ; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
for cmd in c-bindings; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done

%install
%gopkginstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/

%if %{with check}
%check
%gocheck
%endif

%files
%license LICENSE
%doc README.md linter/README.md
%{_bindir}/*

%gopkgfiles

%changelog
%autochangelog
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux