diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | own3d-desktop.sh | 16 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..df6b417a973b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = own3d-desktop-bin + pkgdesc = Public Development Preview of the OWN3D Desktop App + pkgver = 2.0.0 + pkgrel = 1 + url = https://www.own3d.pro/ + arch = any + license = MIT + depends = electron29 + provides = own3d-desktop=2.0.0 + conflicts = own3d-desktop + source = own3d-desktop-2.0.0.deb::https://github.com/own3d/desktop/releases/download/2.0.0/own3d-desktop_2.0.0_amd64.deb + source = own3d-desktop.sh + sha256sums = c6015f235920c075f2e042e7b5d0872b1bf7b062c4e220d1ce8b444236444d63 + sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + +pkgname = own3d-desktop-bin diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c62e50feca30 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: zxp19821005 <zxp19821005 at 163 dot com> +pkgname=own3d-desktop-bin +_pkgname="OWN3D Pro Desktop" +pkgver=2.0.0 +_electronversion=29 +pkgrel=1 +pkgdesc="Public Development Preview of the OWN3D Desktop App" +arch=('any') +url="https://www.own3d.pro/" +_ghurl="https://github.com/own3d/desktop" +license=("MIT") +conflicts=("${pkgname%-bin}") +provides=("${pkgname%-bin}=${pkgver}") +depends=( + "electron${_electronversion}" +) +source=( + "${pkgname%-bin}-${pkgver}.deb::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}_${pkgver}_amd64.deb" + "${pkgname%-bin}.sh" +) +sha256sums=('c6015f235920c075f2e042e7b5d0872b1bf7b062c4e220d1ce8b444236444d63' + 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') +build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@runname@|app.asar|g" \ + -e "s|@options@|env ELECTRON_OZONE_PLATFORM_HINT=auto|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" + bsdtar -xf "${srcdir}/data."* +} +package() { + install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" + install -Dm644 "${srcdir}/usr/lib/${pkgname%-bin}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}" + install -Dm644 "${srcdir}/usr/share/pixmaps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" + install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" + install -Dm644 "${srcdir}/usr/share/doc/${pkgname%-bin}/copyright" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +}
\ No newline at end of file diff --git a/own3d-desktop.sh b/own3d-desktop.sh new file mode 100644 index 000000000000..7ddcaab8d734 --- /dev/null +++ b/own3d-desktop.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +_APPDIR="/usr/lib/@appname@" +_RUNNAME="${_APPDIR}/@runname@" +_OPTIONS="@options@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export ELECTRON_FORCE_IS_PACKAGED=true +export NODE_ENV=production +cd "${_APPDIR}" +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +else + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? +fi
\ No newline at end of file |