Packaging golang-github-vmware-govmomi - usage of makros


I am trying to build a package for govmomi:
The project can be found here:

I have seen that there is package available for Fedora so I grabbed the spec-file, but noticed, that Fedora uses different go-makros:

I tried lot of things but I cannot get the binaries to be built as used in Fedora’s spec-file:

%if %{with binary}
for cmd in govc toolbox/toolbox vcsim; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
mv %{gobuilddir}/bin/toolbox %{gobuilddir}/bin/govmomi-toolbox

Can someone help here? I have no experience in go or packaging go.

Thx in advance!

I would have a look here to see what macros are used with openSUSE and building go applications;

Next I would look in the golang devel repository at some of the packages to see what is what :wink:

Hi Malcolm,

thank you for the links but I would not have asked if I would not have been read the manuals :wink:
Anyway: With documentation and try-and-error I managed to get the package and its dependencies be built. The binaries seem to work so far :slight_smile: