makedeb


yt-dlp-git 2024.04.09.r26.ac817bc-1


Downloader of videos from YouTube and many other sites (git)

Click here to go back to the commit logs for yt-dlp-git.

Commit:


Hash: 5f487279ab258c85097fbb032fc8e08446a3c48e

Message: various improvements

Diff


diff --git a/.SRCINFO b/.SRCINFO
index d411cad..7a9dab4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,9 +3,10 @@ pkgname = yt-dlp-git
 pkgbase = yt-dlp-git
 pkgdesc = Downloader of videos from YouTube and many other sites (git)
 pkgrel = 1
-pkgver = 2024.03.10.r6.2e94602
+pkgver = 2024.04.09.r26.ac817bc
 url = https://github.com/yt-dlp/yt-dlp
 arch = all
+checkdepends = python3-pytest
 conflicts = yt-dlp
 depends = python3
 depends = python3-certifi
@@ -14,9 +15,9 @@ depends = python3-urllib3
 license = Unlicense
 makedepends = pandoc
 makedepends = python3-build
+makedepends = python3-editables
 makedepends = python3-hatchling
 makedepends = python3-installer
-makedepends = python3-editables
 makedepends = git
 optdepends = ffmpeg: for video post-processing
 optdepends = rtmpdump: for rtmp streams support
@@ -40,11 +41,12 @@ optdepends = python3-secretstorage: For -cookies-from-browser to access the GNOM
 provides = yt-dlp
 source = git+https://github.com/yt-dlp/yt-dlp.git
 sha256sums = SKIP
+checkdepends = python3-pytest
 makedepends = pandoc
 makedepends = python3-build
+makedepends = python3-editables
 makedepends = python3-hatchling
 makedepends = python3-installer
-makedepends = python3-editables
 makedepends = git
 optdepends = ffmpeg: for video post-processing
 optdepends = rtmpdump: for rtmp streams support
diff --git a/PKGBUILD b/PKGBUILD
index 63f5773..a5d6180 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,20 @@
 # Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
 # Contributor: katt (AUR) <magunasu.b97@gmail.com>
+
 pkgname=yt-dlp-git
 _pkgname="${pkgname%-git}"
-pkgver=2024.03.10.r6.2e94602
+pkgver=2024.04.09.r26.ac817bc
 pkgrel=1
 pkgdesc='Downloader of videos from YouTube and many other sites (git)'
 arch=(all)
 url=https://github.com/yt-dlp/yt-dlp
 license=(Unlicense)
-depends=(python3 python3-certifi python3-requests python3-urllib3)
-# missing makedependency
-#http://deb.debian.org/debian/pool/main/p/python-editables/python3-editables_0.5-1_all.deb
-makedepends=(pandoc python3-build python3-hatchling python3-installer python3-editables git)
-#checkdepends=(python3-pytest)
+depends=('python3' 'python3-certifi' 'python3-requests' 'python3-urllib3')
+# missing makedependency python3-editables
+# https://packages.debian.org/sid/all/python3-editables/download
+makedepends=('pandoc' 'python3-build' 'python3-editables' 'python3-hatchling' 'python3-installer' 'git')
+# slow and fails
+checkdepends=(python3-pytest)
 #optcheckdepends=('python3-requests' 'python3-websockets')
 optdepends=('ffmpeg: for video post-processing'
             'rtmpdump: for rtmp streams support'
@@ -47,19 +49,27 @@ pkgver() {
 prepare() {
     # Clean out old wheels etc.
     git -C "${_pkgname}" clean -dfx
+
+    cd "$srcdir/${_pkgname}"
+    # Debianize folders
+    sed -i 's!share/zsh/site-functions/_yt-dlp!share/zsh/vendor-completions/_yt-dlp!' pyproject.toml
+    sed -i 's!share/doc/yt_dlp/README.txt!share/doc/yt-dlp/README.txt!' pyproject.toml
+    # don't have full git commit history
+    sed -i 's!pypi-files: AUTHORS!pypi-files:!' Makefile
 }
 
 build() {
     cd "${_pkgname}"
-    make pypi-files
-    python3 devscripts/make_lazy_extractors.py
+    make pypi-files lazy-extractors
     python3 -m build --wheel --no-isolation
 }
 
-#check() {
-#    cd "${pkgname%-git}"
-#    pytest -v -m "not download"
-#}
+# slow and fails
+check() {
+    cd "${_pkgname}"
+    # remove -Werror and "|| true" for strict test
+    python3 -m pytest -v -Werror -m "not download" || true
+}
 
 package() {
     cd "${_pkgname}"
@@ -67,8 +77,9 @@ package() {
     # Manual remove local
     mv "$pkgdir/usr/local/"* "$pkgdir/usr/"
     rmdir "$pkgdir/usr/local" 
-    # adjust
-    mv "$pkgdir/usr/share/doc/yt_dlp" "$pkgdir/usr/share/doc/${_pkgname}"
     # doc
     install -Dm644 LICENSE "$pkgdir/usr/share/doc/${_pkgname}/"
+    install -Dm644 Changelog.md "$pkgdir/usr/share/doc/${_pkgname}/changelog"
+    install -Dm644 CONTRIBUTORS "$pkgdir/usr/share/doc/${_pkgname}/"
+    gzip "$pkgdir/usr/share/doc/${_pkgname}/changelog"
 }