View previous topic :: View next topic |
Author |
Message |
crocket Guru

Joined: 29 Apr 2017 Posts: 558
|
Posted: Tue Dec 10, 2019 10:53 am Post subject: How do I create ebuilds for programs that depend on github? |
|
|
Some go programs like lf fetch dependencies from github directly.
As far as I know, on gentoo, dependencies are supposed to be already installed before a program is built.
How would you package a program that depends on github? |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31674 Location: here
|
Posted: Tue Dec 10, 2019 10:56 am Post subject: |
|
|
You should use go-module eclass and EGO_VENDOR variable.
See for example /var/db/repos/gentoo/www-plugins/browserpass/browserpass-3.0.6-r1.ebuild _________________ Questions are guaranteed in life; Answers aren't.
"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968 |
|
Back to top |
|
 |
crocket Guru

Joined: 29 Apr 2017 Posts: 558
|
Posted: Tue Dec 10, 2019 12:10 pm Post subject: |
|
|
fedeliallalinea wrote: | You should use go-module eclass and EGO_VENDOR variable.
See for example /var/db/repos/gentoo/www-plugins/browserpass/browserpass-3.0.6-r1.ebuild |
I have successfully packaged and installed lf. That was good for my ego. |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31674 Location: here
|
Posted: Tue Dec 10, 2019 1:04 pm Post subject: |
|
|
For next time use
Code: | $ go list -f "{{.Deps}}" | tr "[" " " | tr "]" " " | xargs go list -f "{{if not .Standard}} \"{{.ImportPath}} {{.Module.Version}}\"{{end}}" | sed -e "1s/^/EGO_VENDOR=(\n/" -e "\$a)"
EGO_VENDOR=(
"github.com/mattn/go-runewidth v0.0.4"
"github.com/nsf/termbox-go v0.0.0-20190325093121-288510b9734e"
"gopkg.in/djherbis/times.v1 v1.2.0"
)
|
command for create automagically EGO_VENDOR entry _________________ Questions are guaranteed in life; Answers aren't.
"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968 |
|
Back to top |
|
 |
|