makedeb
A minimal script to skip sponsored segments of YouTube videos
Click here to go back to the commit logs for mpv-sponsorblock-minimal-git.
Hash: 03f72e2fe827cf74838123f8f8a64e739720e091
Message: Initial mpr release
diff --git a/.SRCINFO b/.SRCINFO
index a9432c8..4cf4efe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,19 @@
-pkgbase = mpv-sponsorblock-minimal-git
- pkgdesc = A minimal script to skip sponsored segments of YouTube videos
- pkgver = r39.ca2844b
- pkgrel = 1
- url = https://codeberg.org/jouni/mpv_sponsorblock_minimal
- arch = any
- license = GPL3
- makedepends = git
- depends = mpv
- depends = curl
- provides = mpv-sponsorblock
- conflicts = mpv-sponsorblock
- source = mpv-sponsorblock-minimal::git+https://codeberg.org/jouni/mpv_sponsorblock_minimal
- sha256sums = SKIP
-
+generated-by = makedeb
pkgname = mpv-sponsorblock-minimal-git
+pkgbase = mpv-sponsorblock-minimal-git
+pkgdesc = A minimal script to skip sponsored segments of YouTube videos
+pkgrel = 1
+pkgver = 0.r1.ca2844b
+url = https://codeberg.org/jouni/mpv_sponsorblock_minimal
+arch = all
+conflicts = mpv-sponsorblock
+depends = mpv
+depends = curl
+depends = coreutils
+license = GPL3
+makedepends = git
+provides = mpv-sponsorblock
+provides = mpv-sponsorblock-minimal
+source = mpv-sponsorblock-minimal::git+https://codeberg.org/jouni/mpv_sponsorblock_minimal
+b2sums = SKIP
+makedepends = git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1666962
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+mpv-sponsorblock-minimal*
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
index 2f2be60..e9d5ab6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,45 @@
-# Contributor: lmartinez-mirror
+# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
+# Contributor: lmartinez-mirror (AUR)
+# OFF by default
+#_DEFAULTON=0
pkgname=mpv-sponsorblock-minimal-git
_pkgname=${pkgname%-git}
-pkgver=r39.ca2844b
+pkgver=0.r1.ca2844b
pkgrel=1
pkgdesc="A minimal script to skip sponsored segments of YouTube videos"
-arch=('any')
+arch=('all')
url="https://codeberg.org/jouni/mpv_sponsorblock_minimal"
license=('GPL3')
-depends=('mpv' 'curl')
+depends=('mpv' 'curl' 'coreutils')
makedepends=('git')
-provides=('mpv-sponsorblock')
+provides=('mpv-sponsorblock' "${pkgname%-git}")
conflicts=('mpv-sponsorblock')
-source=("$_pkgname::git+$url")
-sha256sums=('SKIP')
+source=("${_pkgname}::git+$url")
+b2sums=('SKIP')
pkgver() {
- cd "$_pkgname"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "${_pkgname}"
+ printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${_pkgname}"
+ # Use sha256sum on video id
+ sed -i 's!hash = ""!hash = "true"!' "sponsorblock_minimal.lua"
+ # ON by default
+ [ -z "$_DEFAULTON" ] && sed -i 's!local ON = false!local ON = true!' "sponsorblock_minimal.lua" || :
}
package() {
- cd "$_pkgname"
- install -Dm644 sponsorblock_minimal.lua -t "$pkgdir/etc/mpv/scripts/"
+ cd "${_pkgname}"
+ # Script installation
+ install -Dm644 sponsorblock_minimal.lua -t "$pkgdir/usr/share/mpv/scripts/"
+ # Script loaded by default
+ install -dm755 "${pkgdir}/etc/mpv/scripts/"
+ ln -s "/usr/share/mpv/scripts/sponsorblock_minimal.lua" "$pkgdir/etc/mpv/scripts/"
+ # Doc
install -Dm644 README -t "$pkgdir/usr/share/doc/$_pkgname"
- install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname"
+ _license_path="/usr/share/common-licenses/GPL-3"
+ install -dm755 "${pkgdir}/usr/share/doc/$_pkgname"
+ ln -s "$_license_path" "${pkgdir}/usr/share/doc/$_pkgname/"
}
-