summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcorey drew bruce2019-11-02 18:44:31 +1100
committercorey drew bruce2019-11-02 18:44:31 +1100
commit1542812b8d890d1a0d85f96bf296b0e63003d6ad (patch)
tree7f39bef42a53853bb47cdf1c2224e031f4e13009
parent24c85650884f49cbbc56692f61f26f31b063a7c6 (diff)
downloadaur-1542812b8d890d1a0d85f96bf296b0e63003d6ad.tar.gz
Applying recommended PKGBUILD fix
-rw-r--r--PKGBUILD47
1 files changed, 26 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index dfdd4fa83b4a..f8b8b4137084 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,40 @@
-# Maintainer: Corey Bruce <cdfrosty@gmail.com>
-
-pkgname=gamerworld
-_pkgname=GamerWorld-linux-x64
+pkgname=gamerworld-git
+_pkgname=GamerWorld
pkgver=1.1.4
pkgrel=1
pkgdesc="Play games all in one place"
arch=('x86_64')
url="https://gitlab.com/gamerworld/application"
license=('GPL')
-depends=(nss gtk3 libxss)
-makedepends=('nodejs' 'npm' 'git')
-provides=('gamerworld')
-conflicts=()
-source=("git+https://gitlab.com/gamerworld/application.git")
+depends=('nss' 'gtk3' 'libxss')
+makedepends=('npm' 'git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=('git+https://gitlab.com/gamerworld/application.git')
+sha256sums=('SKIP')
-md5sums=("SKIP")
+pkgver() {
+ cd "$srcdir/application"
+ node -pe "require('./package.json').version" | head --bytes -3
+}
build() {
- cd "$srcdir/application"
- npm i electron jquery electron-packager
- ./node_modules/.bin/electron-packager .
+ cd "$srcdir/application"
+ npm --cache "$srcdir/npm-cache" i electron jquery electron-packager
+ ./node_modules/.bin/electron-packager .
}
package() {
- cd "$srcdir/application/${_pkgname}"
- mkdir -p $pkgdir/opt/GamerWorld/
- # Exec bit
- chmod 755 "$pkgdir/opt/GamerWorld/"
- cp -r ./ $pkgdir/opt/GamerWorld/
+ cd "$srcdir/application/$_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%-git}"
-# Desktop Entry
- install -Dm 644 "$srcdir/application/GamerWorld.desktop" "${pkgdir}/usr/share/applications/GamerWorld.desktop"
- sed -i s%/usr/share%/opt% ${pkgdir}/usr/share/applications/GamerWorld.desktop
+ # Desktop Entry
+ install -Dm644 "$srcdir/application/$_pkgname.desktop" \
+ "$pkgdir/usr/share/applications/$_pkgname.desktop"
+ sed -i s%/usr/share%/opt% "$pkgdir/usr/share/applications/$_pkgname.desktop"
}