summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO46
-rw-r--r--PKGBUILD92
-rwxr-xr-xredisinsight.sh22
3 files changed, 107 insertions, 53 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 97f1414b19c9..cd78f1f73673 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,46 @@
pkgbase = redis-insight-bin
- pkgdesc = GUI for Redis
- pkgver = 2.20.0
+ pkgdesc = Redis Insight is a powerful desktop user interface that helps you visualize and optimize your data for Redis and Redis Stack. (Precompiled version)
+ pkgver = 2.48.0
pkgrel = 1
url = https://redis.com/redis-enterprise/redis-insight
arch = x86_64
- license = custom:SSPL
- makedepends = curl
- makedepends = yq
- makedepends = gendesk
+ license = LicenseRef-SSPL
+ depends = alsa-lib
+ depends = at-spi2-core
+ depends = bash
+ depends = cairo
+ depends = dbus
+ depends = expat
+ depends = gcc-libs
+ depends = glib2
+ depends = glibc
+ depends = gtk3
+ depends = hicolor-icon-theme
+ depends = libcups
+ depends = libdrm
+ depends = libsecret
+ depends = libx11
+ depends = libxcb
+ depends = libxcomposite
+ depends = libxdamage
+ depends = libxext
+ depends = libxfixes
+ depends = libxkbcommon
+ depends = libxrandr
+ depends = mesa
+ depends = nss
+ depends = nspr
+ depends = pango
+ provides = redisinsight
provides = redis-insight
conflicts = redisinsight
- source = redis-insight-bin-2.20.0.AppImage::https://download.redisinsight.redis.com/latest/RedisInsight-v2-linux-x86_64.AppImage
- cksums = SKIP
+ replaces = redisinsight-deb
+ options = !strip
+ source = redis-insight-bin-2.48.0.deb::https://download.redisinsight.redis.com/latest/RedisInsight-linux-amd64.deb
+ source = redisinsight.sh
+ source = https://github.com/RedisInsight/RedisInsight/raw/main/LICENSE
+ sha256sums = eb5cb7d606cab24a7ee82267f78a61364bfff6050ff3d39baf7acd7262ea3b31
+ sha256sums = 3d08bac7103a94b058567b3cc7580766a8c35229eb3c6b019d45083faebadf67
+ sha256sums = 34e94c5087ba6e9fb34f35ae71df5e6533c5fc7cbbf6c44186a71e82806b69e1
pkgname = redis-insight-bin
diff --git a/PKGBUILD b/PKGBUILD
index 88a038b55170..8e9da0aadc48 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,56 +1,58 @@
+# Maintainer: BryanLiang <liangrui.ch at gmail dot com>
+
pkgname=redis-insight-bin
-pkgver=2.20.0
+pkgver=2.48.0
pkgrel=1
-pkgdesc="GUI for Redis"
+pkgdesc="Redis Insight is a powerful desktop user interface that helps you visualize and optimize your data for Redis and Redis Stack. (Precompiled version)"
arch=('x86_64')
url='https://redis.com/redis-enterprise/redis-insight'
-conflicts=(redisinsight)
-provides=(redis-insight)
-license=('custom:SSPL')
-depends=()
-makedepends=(
-curl
-yq
-gendesk
+provides=('redisinsight' 'redis-insight')
+conflicts=('redisinsight')
+replaces=('redisinsight-deb')
+license=('LicenseRef-SSPL')
+options=('!strip')
+depends=('alsa-lib'
+ 'at-spi2-core'
+ 'bash'
+ 'cairo'
+ 'dbus'
+ 'expat'
+ 'gcc-libs'
+ 'glib2'
+ 'glibc'
+ 'gtk3'
+ 'hicolor-icon-theme'
+ 'libcups'
+ 'libdrm'
+ 'libsecret'
+ 'libx11'
+ 'libxcb'
+ 'libxcomposite'
+ 'libxdamage'
+ 'libxext'
+ 'libxfixes'
+ 'libxkbcommon'
+ 'libxrandr'
+ 'mesa'
+ 'nss'
+ 'nspr'
+ 'pango'
)
-_static_image=RedisInsight-v2-linux-x86_64.AppImage
-_static_meta=latest-linux.yml
-source=("$pkgname-$pkgver.AppImage::https://download.redisinsight.redis.com/latest/${_static_image}")
+source=("${pkgname}-${pkgver}.deb::https://download.redisinsight.redis.com/latest/RedisInsight-linux-amd64.deb"
+ "redisinsight.sh"
+ "https://github.com/RedisInsight/RedisInsight/raw/main/LICENSE")
+sha256sums=('eb5cb7d606cab24a7ee82267f78a61364bfff6050ff3d39baf7acd7262ea3b31'
+ '3d08bac7103a94b058567b3cc7580766a8c35229eb3c6b019d45083faebadf67'
+ '34e94c5087ba6e9fb34f35ae71df5e6533c5fc7cbbf6c44186a71e82806b69e1')
-cksums=(SKIP)
+package() {
+ bsdtar -xf data.tar.xz -C "${pkgdir}"
-pkgver() {
- curl -s https://download.redisinsight.redis.com/latest/${_static_meta} | yq -r '.version'
-}
+ mv "${pkgdir}/opt/Redis Insight" "${pkgdir}/opt/RedisInsight"
-prepare() {
- _sha=$(curl -s https://download.redisinsight.redis.com/latest/${_static_meta} | yq -r '.sha512' | base64 -d | od -t x1 -An | tr -d ' \n')
- echo "${_sha} ${pkgname}-${pkgver}.AppImage" > csum.txt
- sha512sum -c csum.txt
- rm csum.txt
- chmod +x ${pkgname}-${pkgver}.AppImage
- rm -rf squashfs-root
- ./${pkgname}-${pkgver}.AppImage --appimage-extract
-}
+ install -Dm755 redisinsight.sh "${pkgdir}/usr/bin/redisinsight"
-package() {
- cd squashfs-root
+ sed -i 's|"/opt/Redis Insight/redisinsight"|/usr/bin/redisinsight|g' "${pkgdir}/usr/share/applications/redisinsight.desktop"
- install -Dm644 usr/share/icons/hicolor/512x512/apps/redisinsight.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
- gendesk -f -n --pkgname "${pkgname}" \
- --pkgdesc "$pkgdesc" \
- --name "RedisInsight" \
- --comment "$pkgdesc" \
- --exec "${pkgname%-bin}" \
- --categories 'Development' \
- --icon "${pkgname}"
- msg2 "${pkgname%-bin}.desktop"
- install -Dm644 "${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
- install -Dm644 resources/LICENSE.redisinsight.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -d "${pkgdir}/usr/bin"
- install -d "${pkgdir}/opt"
- cp -avR . "${pkgdir}/opt/${pkgname}"
- ln -s /opt/${pkgname}/AppRun "${pkgdir}/usr/bin/${pkgname%-bin}"
- find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 {} +
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/redisinsight/LICENSE"
}
-
diff --git a/redisinsight.sh b/redisinsight.sh
new file mode 100755
index 000000000000..8c706bdefbbf
--- /dev/null
+++ b/redisinsight.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -euo pipefail
+
+flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/redisinsight-flags.conf"
+
+declare -a redisinsight_flags
+
+if [[ -f "${flags_file}" ]]
+then
+ mapfile -t < "${flags_file}" REDISINSIGHT_MAP_FILE
+fi
+
+for line in "${REDISINSIGHT_MAP_FILE[@]}"
+do
+ if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]
+ then
+ redisinsight_flags+=("${line}")
+ fi
+done
+
+exec /opt/RedisInsight/redisinsight "${redisinsight_flags[@]}" "$@"