summaryrefslogtreecommitdiff
path: root/mpv-plugin/open-in-mpv/open-in-mpv-2.4.1.ebuild
blob: 099dd4c6b40561440412eaac46b36e8bf4a5c767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module desktop xdg

DESCRIPTION="Simple host script (in Go) for simple web extension to open videos in mpv"
HOMEPAGE="https://github.com/Baldomo/open-in-mpv https://addons.mozilla.org/en-US/firefox/addon/iina-open-in-mpv"
SRC_URI="https://github.com/Baldomo/open-in-mpv/releases/download/v${PV}/open-in-mpv_${PV}.tar.gz"
S="${WORKDIR}/${PN}_${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	media-video/mpv
	net-misc/yt-dlp
"

src_compile() {
	CGO_ENABLED=0 ego build -ldflags="-s -w -X main.Version=${PV}" -o ${PN} ./cmd/open-in-mpv/
}

src_test() {
	ego test ./...
}

src_install() {
	domenu scripts/open-in-mpv.desktop
	dobin ${PN}
}