Gentoo Archives: gentoo-commits

From: Nicola Smaniotto <smaniotto.nicola@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: mpv-plugin/mpv_sponsorblock/
Date: Tue, 31 May 2022 13:14:49
Message-Id: 1654002801.47ddbd0abf290c1c6e37d632b5ddd73f88d5c338.smaniotto.nicola@gentoo
1 commit: 47ddbd0abf290c1c6e37d632b5ddd73f88d5c338
2 Author: Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
3 AuthorDate: Tue May 31 13:11:57 2022 +0000
4 Commit: Nicola Smaniotto <smaniotto.nicola <AT> gmail <DOT> com>
5 CommitDate: Tue May 31 13:13:21 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=47ddbd0a
7
8 mpv-plugin/mpv_sponsorblock: initial import
9
10 Signed-off-by: Nicola Smaniotto <smaniotto.nicola <AT> gmail.com>
11
12 mpv-plugin/mpv_sponsorblock/Manifest | 1 +
13 mpv-plugin/mpv_sponsorblock/metadata.xml | 8 ++++
14 .../mpv_sponsorblock-20211223.ebuild | 48 ++++++++++++++++++++++
15 3 files changed, 57 insertions(+)
16
17 diff --git a/mpv-plugin/mpv_sponsorblock/Manifest b/mpv-plugin/mpv_sponsorblock/Manifest
18 new file mode 100644
19 index 000000000..b2e00684c
20 --- /dev/null
21 +++ b/mpv-plugin/mpv_sponsorblock/Manifest
22 @@ -0,0 +1 @@
23 +DIST mpv_sponsorblock-20211223.tar.gz 19424 BLAKE2B 33e9f83ae36cd04363401edf030350f8e47ac296ef904e084a4c4d8c01192492b904720dbb45262fee813299d72def0314c3551a3c43b7c91d2a31bc842c3a4c SHA512 7bbda9999ff1954ab3992d37d0633cc31b94517d42d32c32196b8343c8b8151f2f5ce01fcec9c19e50b29fd4088a140488b54c5e6ca42afc47f63d51107756e0
24
25 diff --git a/mpv-plugin/mpv_sponsorblock/metadata.xml b/mpv-plugin/mpv_sponsorblock/metadata.xml
26 new file mode 100644
27 index 000000000..be3f1030e
28 --- /dev/null
29 +++ b/mpv-plugin/mpv_sponsorblock/metadata.xml
30 @@ -0,0 +1,8 @@
31 +<?xml version="1.0" encoding="UTF-8"?>
32 +<!DOCTYPE pkgmetadata SYSTEM 'https://www.gentoo.org/dtd/metadata.dtd'>
33 +<pkgmetadata>
34 + <maintainer type="person">
35 + <email>smaniotto.nicola@×××××.com</email>
36 + <name>Nicola Smaniotto</name>
37 + </maintainer>
38 +</pkgmetadata>
39
40 diff --git a/mpv-plugin/mpv_sponsorblock/mpv_sponsorblock-20211223.ebuild b/mpv-plugin/mpv_sponsorblock/mpv_sponsorblock-20211223.ebuild
41 new file mode 100644
42 index 000000000..ce442491c
43 --- /dev/null
44 +++ b/mpv-plugin/mpv_sponsorblock/mpv_sponsorblock-20211223.ebuild
45 @@ -0,0 +1,48 @@
46 +# Copyright 2022 Gentoo Authors
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=8
50 +
51 +USE_MPV="rdepend"
52 +MPV_REQ_USE="lua"
53 +PYTHON_COMPAT=( python3_{8..10} )
54 +inherit mpv-plugin python-any-r1
55 +
56 +COMMIT="6743bd47d4cfce3ae3d5dd4f587f3193bd4fb9b2"
57 +MY_P="${PN}-${COMMIT}"
58 +
59 +DESCRIPTION="mpv script to skip sponsored segments of YouTube videos"
60 +HOMEPAGE="https://github.com/po5/mpv_sponsorblock"
61 +
62 +SRC_URI="https://github.com/po5/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
63 +
64 +LICENSE="GPL-3"
65 +KEYWORDS="~amd64"
66 +
67 +DEPEND="
68 + ${PYTHON_DEPS}
69 +"
70 +
71 +S="${WORKDIR}/${MY_P}"
72 +
73 +MPV_PLUGIN_FILES=(
74 + sponsorblock_shared
75 + sponsorblock.lua
76 +)
77 +
78 +src_prepare() {
79 + default
80 +
81 + # we install in the system folder
82 + sed -e 's|scripts_dir =.*|scripts_dir = "/etc/mpv/scripts"|' \
83 + -i sponsorblock.lua || die
84 +}
85 +
86 +pkg_postinst() {
87 + # will make use of the correct user folders
88 + # ref: https://github.com/po5/mpv_sponsorblock/pull/17
89 + ewarn "This version of the plugin is not meant to be installed for"
90 + ewarn "the whole system. It is advised to add \"local_database = no\""
91 + ewarn "in script-opts/sponsorblock.conf to avoid trying to write"
92 + ewarn "inside root-owned directories."
93 +}