diff options
author | gameslayer | 2021-01-09 23:54:21 +1000 |
---|---|---|
committer | gameslayer | 2021-01-09 23:54:21 +1000 |
commit | a7bb476eb5b955cea600064c16559cb0c0839a4a (patch) | |
tree | 89d5d1bdbcca44d447486bbe35de001e9e46208e | |
download | aur-a7bb476eb5b955cea600064c16559cb0c0839a4a.tar.gz |
committing PKG file to AUR
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e301bc1b5bf7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = youtube-git + pkgdesc = Unnofficial Youtube desktop application + pkgver = 1.0.4 + pkgrel = 1 + url = https://gitlab.com/youtube-desktop/application + arch = any + license = GPL + makedepends = npm + makedepends = git + makedepends = unzip + depends = nss + depends = gtk3 + depends = libxss + provides = youtube-git + conflicts = youtube-bin + source = git+https://gitlab.com/youtube-desktop/application.git + sha256sums = SKIP + +pkgname = youtube-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6d0c633ac891 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +pkgname=youtube-git +_pkgname=Youtube-git +pkgver=1.0.4 +pkgrel=1 +pkgdesc="Unnofficial Youtube desktop application" +arch=('any') +url="https://gitlab.com/youtube-desktop/application" +license=('GPL') +depends=('nss' 'gtk3' 'libxss') +makedepends=('npm' 'git' 'unzip') +provides=("${pkgname%}") +conflicts=("youtube-bin") +source=(git+https://gitlab.com/youtube-desktop/application.git) +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/application" + node -pe "require('./package.json').version" +} + +build() { + cd "$srcdir/application" + npm --cache "$srcdir/npm-cache" i electron@11.0.4 electron-packager + ./node_modules/.bin/electron-packager . + for dir in Youtube-linux-*/ ; do mv "${dir}" "Youtube" ;done + rm -rf "$srcdir/application/Youtube/resources/app/node_modules" +} + +package() { + cd "$srcdir/application/Youtube" + install -dm755 "$pkgdir/opt/Youtube" + cp -r ./ "$pkgdir/opt/Youtube" + + # Link to binary + install -dm755 "$pkgdir/usr/bin" + ln -s "/opt/$_pkgname/Youtube" "$pkgdir/usr/bin/Youtube" + + # Desktop Entry + install -Dm644 "$srcdir/application/Youtube.desktop" \ + "$pkgdir/usr/share/applications/Youtube.desktop" + sed -i s%/usr/share%/opt% "$pkgdir/usr/share/applications/Youtube.desktop" +} |