summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgameslayer2020-06-11 01:21:34 +1000
committergameslayer2020-06-11 01:21:34 +1000
commit8026942d857a863c69a897dff773adafca866742 (patch)
treeff98cc5bf3d2ab19bcd9a5ae562d15147fb99742
downloadaur-8026942d857a863c69a897dff773adafca866742.tar.gz
Twitch unofficial MAKEPKG
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD41
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..31fdb520915f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = twitch
+ pkgdesc = Unofficial Twitch desktop application.
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://gitlab.com/coreybruce/twitch-desktop
+ arch = any
+ license = GPL
+ makedepends = npm
+ makedepends = git
+ makedepends = unzip
+ depends = nss
+ depends = gtk3
+ depends = libxss
+ provides = twitch
+ conflicts = twitch
+ source = git+https://gitlab.com/coreybruce/twitch-desktop.git
+ sha256sums = SKIP
+
+pkgname = twitch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d8e31df5e8d7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+pkgname=twitch
+_pkgname=Twitch
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="Unofficial Twitch desktop application."
+arch=('any')
+url="https://gitlab.com/coreybruce/twitch-desktop"
+license=('GPL')
+depends=('nss' 'gtk3' 'libxss')
+makedepends=('npm' 'git' 'unzip')
+provides=("${pkgname%}")
+conflicts=("${pkgname%}")
+source=('git+https://gitlab.com/coreybruce/twitch-desktop.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ node -pe "require('./package.json').version"
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+ npm --cache "$srcdir/npm-cache" i electron electron-packager
+ ./node_modules/.bin/electron-packager . --overwrite
+ rm -rf "$srcdir/$pkgname/$_pkgname-linux-x64/resources/app/node_modules"
+}
+
+package() {
+ cd "$srcdir/$pkgname/$_pkgname-linux-x64"
+ install -dm755 "$pkgdir/opt/$_pkgname"
+ cp -r ./ "$pkgdir/opt/$_pkgname"
+
+ # Link to binary
+ install -dm755 "$pkgdir/usr/bin"
+ ln -s "/opt/$_pkgname/$_pkgname" "$pkgdir/usr/bin/${pkgname%}"
+
+ # Desktop Entry
+ install -Dm644 "$srcdir/$pkgname/$_pkgname.desktop" \
+ "$pkgdir/usr/share/applications/$_pkgname.desktop"
+ sed -i s%/usr/share%/opt% "$pkgdir/usr/share/applications/$_pkgname.desktop"
+}