diff options
author | corey drew bruce | 2021-01-09 22:49:36 +1000 |
---|---|---|
committer | corey drew bruce | 2021-01-09 22:49:36 +1000 |
commit | 0581629c2749bfdb17d55dda44882475f6a5b427 (patch) | |
tree | d6e3cf391246f169e3e7dd2e71c87479ed0656ed | |
download | aur-0581629c2749bfdb17d55dda44882475f6a5b427.tar.gz |
Changing to git package as I will be making a -bin package
-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..f900910b735a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = gamerworld-git + pkgdesc = Play games all in one place + pkgver = 1.2.0 + pkgrel = 5 + url = https://gitlab.com/gamerworld/application + arch = any + license = GPL + makedepends = npm + makedepends = git + makedepends = unzip + depends = nss + depends = gtk3 + depends = libxss + provides = gamerworld-git + conflicts = gamerworld-git + source = git+https://gitlab.com/gamerworld/application.git#branch=Stable + sha256sums = SKIP + +pkgname = gamerworld-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1aaec8efbacd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +pkgname=gamerworld-git +_pkgname=GamerWorld-git +pkgver=1.2.0 +pkgrel=5 +pkgdesc="Play games all in one place" +arch=('any') +url="https://gitlab.com/gamerworld/application" +license=('GPL') +depends=('nss' 'gtk3' 'libxss') +makedepends=('npm' 'git' 'unzip') +provides=("${pkgname%}") +conflicts=("gamerworld-bin") +source=('git+https://gitlab.com/gamerworld/application.git#branch=Stable') +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 jquery electron-packager + ./node_modules/.bin/electron-packager . + for dir in $_pkgname-linux-*/ ; do mv "${dir}" "$_pkgname" ;done + rm -rf "$srcdir/$pkgname/$_pkgname/resources/app/node_modules" +} + +package() { + cd "$srcdir/application/$_pkgname" + 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/application/$_pkgname.desktop" \ + "$pkgdir/usr/share/applications/$_pkgname.desktop" + sed -i s%/usr/share%/opt% "$pkgdir/usr/share/applications/$_pkgname.desktop" +} |