diff options
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | dbgate.sh | 19 |
3 files changed, 24 insertions, 12 deletions
@@ -1,21 +1,20 @@ pkgbase = dbgate-bin pkgdesc = Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application pkgver = 5.2.7 - pkgrel = 6 + pkgrel = 7 url = https://dbgate.org/ arch = aarch64 arch = armv7h arch = x86_64 license = MIT makedepends = fuse2 - depends = electron25-bin - depends = hicolor-icon-theme + depends = electron17 provides = dbgate=5.2.7 conflicts = dbgate source = LICENSE-5.2.7::https://raw.githubusercontent.com/dbgate/dbgate/v5.2.7/LICENSE source = dbgate.sh sha256sums = 4ba7d897a31d45781b6bbc0b87e9a241873d61fff657af2f0c54608f652d235b - sha256sums = dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8 + sha256sums = 05762c556c85a4423b28600ccbbe7b7dcdd3d1be526ef4a588a510671fa6c62a source_aarch64 = dbgate-5.2.7-aarch64.AppImage::https://github.com/dbgate/dbgate/releases/download/v5.2.7/dbgate-5.2.7-linux_arm64.AppImage sha256sums_aarch64 = c0f659c4feb350067b29c202656669b3dabb19a9626f6a2df3a51a7116a56a22 source_armv7h = dbgate-5.2.7-armv7h.AppImage::https://github.com/dbgate/dbgate/releases/download/v5.2.7/dbgate-5.2.7-linux_armv7l.AppImage @@ -2,8 +2,8 @@ # Contributor: aulonsal <seraur at aulonsal dot com> pkgname=dbgate-bin pkgver=5.2.7 -_electronversion=25 -pkgrel=6 +_electronversion=17 +pkgrel=7 pkgdesc="Database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite and others. Runs under Windows, Linux, Mac or as web application" arch=( 'aarch64' @@ -16,8 +16,7 @@ license=('MIT') provides=("${pkgname%-bin}=${pkgver}") conflicts=("${pkgname%-bin}") depends=( - "electron${_electronversion}-bin" - 'hicolor-icon-theme' + "electron${_electronversion}" ) makedepends=( 'fuse2' @@ -30,7 +29,7 @@ source=( "${pkgname%-bin}.sh" ) sha256sums=('4ba7d897a31d45781b6bbc0b87e9a241873d61fff657af2f0c54608f652d235b' - 'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8') + '05762c556c85a4423b28600ccbbe7b7dcdd3d1be526ef4a588a510671fa6c62a') sha256sums_aarch64=('c0f659c4feb350067b29c202656669b3dabb19a9626f6a2df3a51a7116a56a22') sha256sums_armv7h=('cc0c7b59475a254bda665b835dcf7f145813f2daa5687dc41e2116b13195fd04') sha256sums_x86_64=('75801a25bcd13b1f1073f2c8c048f49c7ebe58eb1162f5105b486a0ce99a8696') @@ -43,6 +42,7 @@ build() { chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" + find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \; } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" diff --git a/dbgate.sh b/dbgate.sh index 7ddcaab8d734..5594e5380ba2 100644 --- a/dbgate.sh +++ b/dbgate.sh @@ -7,10 +7,23 @@ 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 ELECTRON_DISABLE_SECURITY_WARNINGS=true +export ELECTRON_OVERRIDE_DIST_PATH="/usr/bin/electron@electronversion@" export NODE_ENV=production +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +_FLAGS_FILE="${XDG_CONFIG_HOME}/@appname@-flags.conf" +declare -a flags +if [[ -f "${_FLAGS_FILE}" ]]; then + mapfile -t < "${_FLAGS_FILE}" +fi +for line in "${MAPFILE[@]}"; do + if [[ ! "${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "${line}" ]]; then + flags+=("${line}") + fi +done cd "${_APPDIR}" -if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $? +if [[ "${EUID}" -ne 0 ]] || [[ "${ELECTRON_RUN_AS_NODE}" ]]; then + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "${_USER_FLAGS}" "$@" || exit $? else - exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $? + exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "${_USER_FLAGS}" "$@" || exit $? fi
\ No newline at end of file |