yt-cli


Logs | Files | README | README | LICENSE | GitLab


1
commit f91c63d1284c36094aec702db662991463da1ab6
2
Author: Connor Etherington <[email protected]>
3
Date:   Fri May 26 10:08:11 2023 +0200
4
5
    Auto-Commit Update - 20230526
6
---
7
 PKGBUILD | 22 ++++++++++++++++------
8
 1 file changed, 16 insertions(+), 6 deletions(-)
9
10
diff --git a/PKGBUILD b/PKGBUILD
11
index 19b6822..216866f 100644
12
--- a/PKGBUILD
13
+++ b/PKGBUILD
14
@@ -1,7 +1,7 @@
15
 # Maintainer: Connor Etherington <[email protected]>
16
 # ---
17
 pkgname=yt-cli
18
-pkgver=0.2.2
19
+pkgver=0.2.3
20
 pkgrel=1
21
 pkgdesc="An easy to use CLI YouTube client"
22
 arch=('any')
23
@@ -24,12 +24,22 @@ validpgpkeys=(
24
 
25
 package() {
26
 
27
-  echo "${srcdir}/${pkgname}-${pkgver}-${pkgrel}-${arch}"
28
-  [ -d "${srcdir}/${pkgname}-${pkgver}-${pkgrel}-${arch}" ] &&
29
-    cd "${srcdir}/${pkgname}-${pkgver}-${pkgrel}-${arch}" ||
30
-    cd "${srcdir}/${pkgname}"
31
+  echo "${srcdir}/${pkgname}-${pkgver}-${pkgrel}-${arch}/usr/lib/node_modules/${pkgname}"
32
+  [ -d "${srcdir}/${pkgname}-${pkgver}-${pkgrel}-${arch}/usr/lib/node_modules/${pkgname}" ] &&
33
+    cd "${srcdir}/${pkgname}-${pkgver}-${pkgrel}-${arch}/usr/lib/node_modules/${pkgname}" ||
34
+    cd "${srcdir}/${pkgname}/usr/lib/node_modules/${pkgname}"
35
 
36
-  make install PKGDIR="${pkgdir}" || return 1
37
+  which yarn >/dev/null 2>&1 && yarn install || npm install
38
 
39
+  cd ../../../../
40
+
41
+  install -dm0755 "${pkgdir}"/usr/lib/node_modules/${pkgname}
42
+  install -Dm0644 usr/share/licenses/${pkgname}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
43
+  install -Dm0644 usr/share/zsh/site-functions/_${pkgname} "$pkgdir/usr/share/zsh/site-functions/_${pkgname}"
44
+
45
+  [ -z `which ytcli` ] && install -Dm0755 usr/bin/* -t "${pkgdir}/usr/bin/" ||
46
+    install -Dm0755 usr/bin/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
47
+
48
+  cp -ar usr/lib/node_modules/${pkgname}/* "${pkgdir}"/usr/lib/node_modules/${pkgname}
49
 
50
 }