Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ebuild for ymuse
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
jpp_
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2009
Posts: 110
Location: Argentina

PostPosted: Fri Jan 14, 2022 5:08 pm    Post subject: ebuild for ymuse Reply with quote

Good day

Trying to make an ebuild for ymuse

https://github.com/yktoo/ymuse

With this it builds
Code:
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

EGIT_REPO_URI="https://github.com/yktoo/ymuse"
inherit go-module git-r3

DESCRIPTION="GTK client for Music Player Daemon (MPD) written in Go"
HOMEPAGE="https://github.com/yktoo/ymuse"

# Check go.sum and sync with this
# Use e.g.: cat go.sum | cut -d" " -f1,2 | awk '{print "\t\"" $0 "\""}'
# (Could maybe use dev-go/get-ego-vendor?)
EGO_SUM=(
   "github.com/fhs/gompd/v2 v2.2.0"
        "github.com/fhs/gompd/v2 v2.2.0/go.mod"
        "github.com/gotk3/gotk3 v0.6.1"
        "github.com/gotk3/gotk3 v0.6.1/go.mod"
        "github.com/op/go-logging v0.0.0-20160315200505-970db520ece7"
        "github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod"
        "github.com/pkg/errors v0.9.1"
        "github.com/pkg/errors v0.9.1/go.mod"
)

go-module_set_globals

SRC_URI="${EGO_SUM_SRC_URI}"

# TODO: use dev-go/go-licenses or dev-go/go-license-detector to populate this more
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="x11-libs/gtk+:3"

src_unpack() {
   git-r3_src_unpack
   go-module_src_unpack
}

src_compile() {
   go build || die
}

src_install() {
   dobin ymuse
}


it works also, But i miss some icons, the desktop file and maybe more.
Also i think the ebuild is not ok, because i adapt it from other go ebuild, maybe it has unnecesary part and miss important ones.

in github it describe the install as follow

Clone the source and compile:
Code:

git clone https://github.com/yktoo/ymuse.git
cd ymuse
go generate
go build


Copy over the icons and localisations:
Code:
sudo cp -r resources/icons/* /usr/share/icons/
sudo cp -r resources/i18n/generated/* /usr/share/locale/
sudo update-icon-caches /usr/share/icons/hicolor/*


How do i "translate" that to the ebuild?

i add to the src_install section this, with some other trys, but of course its wrong

Code:
doins -r resources/icons/
doins -r resources/i18n/generated/
doins update-icon-caches /usr/share/icons/hicolor/


Any help would be appreciated, thanks.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Fri Jan 14, 2022 5:24 pm    Post subject: Reply with quote

For icons look on doicon function from desktop.eclass, use this eclass also for move desktop file with domenu functon.
For localization you should convert .po file in .mo file with msgfmt command on compilation phase (see for example media-gfx/dcraw-9.28.0-r2.ebuild).
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1660

PostPosted: Fri Jan 14, 2022 5:49 pm    Post subject: Reply with quote

To update desktop/icon cache, inherit xdg and it adds functions to do it for you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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