blob: ef693dac1874a09b483d195eed3575b4de0b202a (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
DESCRIPTION="MPRIS plugin for mpv"
HOMEPAGE="https://github.com/hoyon/mpv-mpris"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/hoyon/${PN}.git"
else
SRC_URI="https://github.com/hoyon/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
fi
SLOT="0"
LICENSE="MIT"
IUSE="+autoload"
BDEPEND="virtual/pkgconfig"
RDEPEND="media-video/mpv:=[cplugins,libmpv]
dev-libs/glib"
DEPEND="${RDEPEND}"
DOCS=(
README.md
)
src_compile() {
emake CC="$(tc-getCC)"
}
src_install() {
insinto "/usr/$(get_libdir)/mpv"
doins mpris.so
use autoload && dosym "/usr/$(get_libdir)/mpv/mpris.so" "/etc/mpv/scripts/mpris.so"
einstalldocs
}
pkg_postinst() {
if ! use autoload; then
elog
elog "The plugin has not been installed to /etc/mpv/scripts for autoloading."
elog "You have to activate it manually by passing"
elog " \"/usr/$(get_libdir)/mpv/mpris.so\" "
elog "as script option to mpv or symlinking the library to \"scripts/\" in your mpv"
elog "config directory."
elog "Alternatively, activate the autoload use flag."
elog
fi
}
|