Go packaging guidelines?

Panu Matilainen pmatilai at laiskiainen.org
Tue Jan 14 15:07:25 UTC 2014

On 01/14/2014 01:06 PM, Florian Weimer wrote:
> On 01/13/2014 04:11 PM, H. Guémar wrote:
>> there's a draft, i suggest that you start checking it.
>> http://fedoraproject.org/wiki/PackagingDrafts/Go
> A couple of questions and comments.  I think overall, the approach works.
> # Packaging Libraries
> This does not mention libraries which use cgo.  Should they be handled
> the same way?  What about additional C wrappers?
> # Libraries and Arch
> Is it really a good idea to hard-code the list of supported
> architectures in spec files?  Is there a way to avoid this?

The de facto standard way is adding a lang-arch macro to 
redhat-rpm-config, for example:

[pmatilai at mursu ~]$ cat /etc/rpm/macros.ocaml-srpm
# arches that ocaml runs on
%ocaml_arches alpha %{arm} %{ix86} ia64 x86_64 ppc  sparc sparcv9 ppc64
[pmatilai at mursu ~]$ cat /etc/rpm/macros.ghc-srpm
# macro defining the archs that ghc runs on in fedora
%ghc_arches %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 
%ghc_arches_with_ghci %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel
[pmatilai at mursu ~]$ cat /etc/rpm/macros.mono-srpm
# arches that mono builds on
%mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} alpha s390x ppc ppc64

	- Panu -

More information about the devel mailing list