.spec file for GO package

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

 



I am writing a .spec file for an app built with go[0].
I first made a build following the official doc, then write a .spec file and built with it .rpm. Everything is OK but I have some doubts when I look at some other .spec files for application writen in GO, or create a spec file for my app using gofed[1], or even read Fedora wiki about GO packages[2].
Spec files are indeed much more complicated, with

At the beginig, one can usually see something similar to the following:

%if 0%{?fedora} || 0%{?rhel} == 6
%global with_debug 1
%global with_bundled 0
%global with_check 1
%else
%global with_debug 0
%global with_bundled 1
%global with_check 0
%endif

%if 0%{?with_debug}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package   %{nil}
%endif
---------------------------------------------------

Then in %build something invoking the <go build> command is used instead of gcc make:

%if 0%{?with_debug}
function gobuild { go build -a -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -v -x "$@"; }
%else
function gobuild { go build -a "$@" -ldflags "-X %{import_path}/version.GitSHA %{shortcommit}"; }
%endif

 Do I have to use go gcc or gobuild instead of make ? I am not cross compiling as the resulting package will be for my box, i.e. amd64.

Thank you for help/tips as doc is not easy to find.

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux