Mailinglist Archive: opensuse-buildservice (244 mails)

< Previous Next >
Re: [opensuse-buildservice] Re: %goprep macro not found by rpm-build
  • From: Graham Anderson <graham@xxxxxxxxxx>
  • Date: Fri, 08 Jun 2012 17:17:57 +0200
  • Message-id: <9850415.MCnUFKqfdT@excession>
On Friday 08 Jun 2012 07:33:39 Michał Papis wrote:
I was using this instruction:

is there any way that could be updated with proper example?

Thanks for bringing this up, I'll add some lines to show an example with a
real world package.

In the meantime a quick explanation. The %goprep macro prepares a directory
structure inside the build that mimicks the the expected locations that the Go
toolchain build tool "go" expects to see.

On the wiki page, where it shows the following entry in the .spec recipe:


You should replace $IMPORTPATH_NAMESPACE with the package import path you
would use to import the package into a go source file. For example if I was
importing the protocol buffer package in my go source I would have:

import ""

Thus, in the .spec file for the protocol buffer package on OBS, this becomes:


In your case, this should be:


Hope this helps, let me know if you have any further questions about building
go packages on OBS.

Cheers the noo,
< Previous Next >