diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | fairshare.sh | 23 |
3 files changed, 29 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = fairshare-bin pkgdesc = Simplifying the curation and sharing of biomedical research data and software according to applicable FAIR guidelines pkgver = 2.1.0 - pkgrel = 3 + pkgrel = 4 url = https://fairdataihub.org/fairshare arch = x86_64 license = MIT @@ -16,10 +16,10 @@ pkgbase = fairshare-bin provides = fairshare=2.1.0 conflicts = fairshare source = fairshare-2.1.0.AppImage::https://github.com/fairdataihub/FAIRshare/releases/download/v2.1.0/FAIRshare-2.1.0.AppImage - source = LICENSE::https://raw.githubusercontent.com/fairdataihub/FAIRshare/v2.1.0/LICENSE + source = LICENSE-2.1.0::https://raw.githubusercontent.com/fairdataihub/FAIRshare/v2.1.0/LICENSE source = fairshare.sh sha256sums = 9c6bf87ec638dcb3dc44de81e268a57453f26c4e345023a3664ed0f744c2a7c3 sha256sums = f53ab2779598ebdd8bef9425c402eed3cac0e2a6dc3ec5cbda5a07de0bdcf7dc - sha256sums = 6c9d24c3359c40af842c946c5430b94c5abffc6b206476a4ec0b4b7c155c6f3c + sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf pkgname = fairshare-bin @@ -2,16 +2,17 @@ pkgname=fairshare-bin _appname=FAIRshare pkgver=2.1.0 -pkgrel=3 +_electronversion=25 +pkgrel=4 pkgdesc="Simplifying the curation and sharing of biomedical research data and software according to applicable FAIR guidelines" arch=('x86_64') url="https://fairdataihub.org/fairshare" -_githuburl="https://github.com/fairdataihub/FAIRshare" +_ghurl="https://github.com/fairdataihub/FAIRshare" license=('MIT') conflicts=("${pkgname%-bin}") provides=("${pkgname%-bin}=${pkgver}") depends=( - 'electron25' + "electron${_electronversion}" 'libx11' 'gdk-pixbuf2' 'libxext' @@ -23,14 +24,18 @@ makedepends=( 'squashfuse' ) source=( - "${pkgname%-bin}-${pkgver}.AppImage::${_githuburl}/releases/download/v${pkgver}/${_appname}-${pkgver}.AppImage" - "LICENSE::https://raw.githubusercontent.com/fairdataihub/FAIRshare/v${pkgver}/LICENSE" + "${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_appname}-${pkgver}.AppImage" + "LICENSE-${pkgver}::https://raw.githubusercontent.com/fairdataihub/FAIRshare/v${pkgver}/LICENSE" "${pkgname%-bin}.sh" ) sha256sums=('9c6bf87ec638dcb3dc44de81e268a57453f26c4e345023a3664ed0f744c2a7c3' 'f53ab2779598ebdd8bef9425c402eed3cac0e2a6dc3ec5cbda5a07de0bdcf7dc' - '6c9d24c3359c40af842c946c5430b94c5abffc6b206476a4ec0b4b7c155c6f3c') + '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf') build() { + sed -e "s|@electronversion@|${_electronversion}|g" \ + -e "s|@appname@|${pkgname%-bin}|g" \ + -e "s|@appasar@|app.asar|g" \ + -i "${srcdir}/${pkgname%-bin}.sh" chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null sed "s|AppRun --no-sandbox %U|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" @@ -43,5 +48,5 @@ package() { install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib" install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps" install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop" - install -Dm644 "${srcdir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }
\ No newline at end of file diff --git a/fairshare.sh b/fairshare.sh index b60b64c9bcf7..c77c53567639 100644 --- a/fairshare.sh +++ b/fairshare.sh @@ -1,12 +1,17 @@ -#!/bin/bash -_ELECTRON=/usr/bin/electron25 -APPDIR=/usr/lib/fairshare -export PATH="${APPDIR}:${PATH}" -export LD_LIBRARY_PATH="${APPDIR}/lib:${LD_LIBRARY_PATH}" -_ASAR="${APPDIR}/app.asar" -cd $APPDIR && ./api 7632 +#!/bin/sh +set -e +_APPDIR="/usr/lib/@appname@" +_ASAR="${_APPDIR}/@appasar@" +export PATH="${_APPDIR}:${PATH}" +export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}" +export ELECTRON_IS_DEV=0 +export NODE_ENV=production if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec ${_ELECTRON} ${_ASAR} "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" "$@" + exit else - exec ${_ELECTRON} ${_ASAR} --no-sandbox "$@" + cd "${_APPDIR}" + exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@" + exit fi
\ No newline at end of file |