Created
November 26, 2020 16:04
-
-
Save Brli/7d3c712b6931e59ca1109e34da0f738d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 286414de7020c1310a8df891f17c849f70828a32 Mon Sep 17 00:00:00 2001 | |
From: BrLi <[email protected]> | |
Date: Sun, 1 Nov 2020 12:12:05 +0800 | |
Subject: [PATCH] use setup.py to install instead of make install | |
--- | |
PKGBUILD | 17 +++++++++++++---- | |
1 file changed, 13 insertions(+), 4 deletions(-) | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 0d14822..a545edb 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -8,8 +8,8 @@ pkgdesc="Fork of youtube-dl - download videos from youtube.com or other video pl | |
arch=('any') | |
url="https://github.com/blackjack4494/yt-dlc" | |
license=('custom') | |
-depends=('python' 'python-setuptools') | |
-makedepends=('git' 'pandoc' 'zip') | |
+depends=('python') | |
+makedepends=('git' 'pandoc' 'python-setuptools') | |
optdepends=('ffmpeg: for video post-processing' | |
'rtmpdump: for rtmp streams support' | |
'atomicparsley: for embedding thumbnails into m4a files' | |
@@ -25,11 +25,20 @@ prepare() { | |
build() { | |
cd ${_gitname}-${pkgver} | |
- make PREFIX="${pkgdir}/usr" | |
+ make PREFIX="${pkgdir}/usr" README.txt youtube-dlc.1 bash-completion zsh-completion fish-completion | |
+ export PYTHONHASHSEED=0 | |
+ python setup.py build | |
} | |
package() { | |
cd ${_gitname}-${pkgver} | |
- make install PREFIX="${pkgdir}/usr" | |
+ python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build | |
+ | |
+ # Completion fix | |
+ mv "${pkgdir}/usr/share/bash-completion/completions/youtube-dlc"{.bash-completion,} | |
+ mv "${pkgdir}/usr/share/fish/vendor_completions.d/youtube-dlc"{.fish,} | |
+ install -Dm644 youtube-dlc.zsh "${pkgdir}/usr/share/zsh/site-functions/_youtube-dlc" | |
+ | |
+ # License | |
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
} | |
-- | |
2.29.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks