Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I create ebuilds for programs that depend on github?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Tue Dec 10, 2019 10:53 am    Post subject: How do I create ebuilds for programs that depend on github? Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31674
Location: here

PostPosted: Tue Dec 10, 2019 10:56 am    Post subject: Reply with quote

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
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Tue Dec 10, 2019 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31674
Location: here

PostPosted: Tue Dec 10, 2019 1:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum