View previous topic :: View next topic |
Author |
Message |
jpp_ Tux's lil' helper
Joined: 23 Oct 2009 Posts: 110 Location: Argentina
|
Posted: Wed Dec 22, 2021 9:53 pm Post subject: ebuild for unflac |
|
|
Good day, need some help, trying to create an ebuild for this app.
https://git.sr.ht/~ft/unflac
I have no experience in writing ebuild, only modyfing some lines.
Trying to do it, I fail miserably, any help would be aprecciated.
Thanks
Code: | # Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="A command line tool for fast frame accurate audio image + cue sheet splitting."
HOMEPAGE="https://git.sr.ht/~ft/unflac"
EGO_SUM=(
"git.sr.ht/~ft/cue v0.0.0-20200508193024-48a5e773bbae"
"git.sr.ht/~ft/cue v0.0.0-20200508193024-48a5e773bbae/go.mod"
"github.com/asdfsx/gochardet v0.0.0-20170222172924-16496b196583"
"github.com/asdfsx/gochardet v0.0.0-20170222172924-16496b196583/go.mod"
"github.com/gammazero/deque v0.1.0"
"github.com/gammazero/deque v0.1.0/go.mod"
"github.com/gammazero/workerpool v1.1.2"
"github.com/gammazero/workerpool v1.1.2/go.mod"
"github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca"
"github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod"
"golang.org/x/text v0.3.6"
"golang.org/x/text v0.3.6/go.mod"
"golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod"
)
go-module_set_globals
SRC_URI="https://git.sr.ht/~ft/unflac-9999.tar.gz
${EGO_SUM_SRC_URI}"
LICENSE="MIT"
SLOT="0"
src_install() {
dobin bin/unflac
insinto /usr/share/unflac
}
|
I cant figure how to download from that source, so i git clone the repo, tar the file and put inside /var/db/cache/distfiles with the name unflac-9999.tar.gz
Thanks |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6097 Location: Dallas area
|
Posted: Wed Dec 22, 2021 10:19 pm Post subject: |
|
|
I use cuetools (handles cue files)
shntools (split of files and other things)
flac (encode/decode)
This will split a single flac encoded file using the cue file into individual tracks.
cuebreakpoints file.cue | shnsplit -o flac file.flac _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
jpp_ Tux's lil' helper
Joined: 23 Oct 2009 Posts: 110 Location: Argentina
|
Posted: Wed Dec 22, 2021 11:25 pm Post subject: |
|
|
Hi Anon-E-moose
yes, i was using it, but doesnt support 24 bit flac files, as far i remember. Or it does?
Because of that the need to test that unflac app.
regards |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1678
|
Posted: Thu Dec 23, 2021 2:47 am Post subject: |
|
|
Here's an updated version of the ebuild.
Changes:
- I've made it use git-r3.eclass which fetches from git automatically.
- Add comments to ease maintenance/explain a bit more
- Adapt src_install to match where the binary is (I checked ls /var/tmp/portage/app-text/unflac-9999/work/unflac-9999/ once it was compiled)
- Added ffmpeg as a dependency
Hope it helps!
Code: |
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
EGIT_REPO_URI="https://git.sr.ht/~ft/unflac"
inherit go-module git-r3
DESCRIPTION="A command line tool for fast frame accurate audio image + cue sheet splitting"
HOMEPAGE="https://git.sr.ht/~ft/unflac"
# 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=(
"git.sr.ht/~ft/cue v0.0.0-20200508193024-48a5e773bbae"
"git.sr.ht/~ft/cue v0.0.0-20200508193024-48a5e773bbae/go.mod"
"github.com/asdfsx/gochardet v0.0.0-20170222172924-16496b196583"
"github.com/asdfsx/gochardet v0.0.0-20170222172924-16496b196583/go.mod"
"github.com/gammazero/deque v0.1.0"
"github.com/gammazero/deque v0.1.0/go.mod"
"github.com/gammazero/workerpool v1.1.2"
"github.com/gammazero/workerpool v1.1.2/go.mod"
"github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca"
"github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca/go.mod"
"golang.org/x/text v0.3.6"
"golang.org/x/text v0.3.6/go.mod"
"golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/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"
RDEPEND="media-video/ffmpeg"
src_unpack() {
git-r3_src_unpack
go-module_src_unpack
}
src_compile() {
go build || die
}
src_install() {
dobin unflac
}
|
|
|
Back to top |
|
|
jpp_ Tux's lil' helper
Joined: 23 Oct 2009 Posts: 110 Location: Argentina
|
Posted: Thu Dec 23, 2021 12:23 pm Post subject: |
|
|
Hi sam_
yes, it does. Thanks you very much.
Have a nice day |
|
Back to top |
|
|
|