summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreyson Christoforo2023-03-19 15:54:23 +0000
committerGreyson Christoforo2023-03-19 15:54:23 +0000
commite50942aa7cc5a93bf7940de5d821a520eb0835c3 (patch)
tree3776dac5e27a9def671e9309ec75798adcc2823e
parent6c84504ec242799a94ad1e6a7065e547cee24e39 (diff)
downloadaur-e50942aa7cc5a93bf7940de5d821a520eb0835c3.tar.gz
fix build, update deps
-rw-r--r--PKGBUILD54
1 files changed, 40 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 18a729337f3e..72fc56f76ec7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,54 @@
# Maintainer: Dan Walsh <dan@danwalsh.ca>
pkgname=redisinsight
pkgver=2.20.0
-pkgrel=1
+pkgrel=2
pkgdesc="Desktop manager that provides an intuitive and efficient GUI for Redis, allowing you to interact with your databases, monitor, and manage your data."
arch=('x86_64')
url='https://redis.com/redis-enterprise/redis-insight'
license=('custom:SSPL')
-depends=('dbus-glib'
- 'nss'
- 'libindicator-gtk2'
- 'gtk3'
- 'libdbusmenu-gtk2'
- 'alsa-lib')
-makedepends=('gendesk' 'nodejs' 'yarn')
-source=("$pkgname-$pkgver::https://github.com/RedisInsight/RedisInsight/archive/$pkgver.tar.gz")
+depends=()
+provides=(redis-insight)
+conflicts=(redis-insight-bin)
+makedepends=('gendesk' 'nodejs' 'yarn' 'npm' 'nvm')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/RedisInsight/RedisInsight/archive/$pkgver.tar.gz")
sha256sums=('f9e436bc20f566902e9291b6f45633ecd7b6d1110d22e0ee30a1a34e8d2216d6')
+_ensure_local_nvm() {
+ # let's be sure we are starting clean
+ which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload
+ export NVM_DIR="${srcdir}/.nvm"
+
+ # The init script returns 3 if version specified
+ # in ./.nvrc is not (yet) installed in $NVM_DIR
+ # but nvm itself still gets loaded ok
+ source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
+}
+
+prepare() {
+ cd RedisInsight-$pkgver
+
+ # unable to build some plugins for some reason, disable them here
+ sed -i -E '/^# Build ri-explain plugin/,$d' scripts/build-statics.sh
+
+ _ensure_local_nvm
+ nvm install 16.15.1
+}
+
build() {
- cd "$srcdir/RedisInsight-$pkgver"
+ cd RedisInsight-$pkgver
+ _ensure_local_nvm
+
+ mkdir electron
+ VERSION=$(jq -r ".version" redisinsight/package.json)
+ cp ./redisinsight/package.json ./electron/package.json
+ echo "$VERSION" > electron/version
+
+ yarn --cwd redisinsight/api/ install --ignore-optional
+ yarn --cwd redisinsight/ install --ignore-optional
yarn install
- yarn --cwd redisinsight/api/
- NODE_OPTIONS=--openssl-legacy-provider yarn build:prod
+ yarn build:statics
+ NODE_OPTIONS=--openssl-legacy-provider
+ yarn build:prod
yarn electron-builder build --dir -p never
}
@@ -39,8 +67,6 @@ package() {
install -d "${pkgdir}/usr/bin"
install -d "${pkgdir}/opt"
install -d "${pkgdir}/opt/${pkgname}"
- # Refer to https://aur.archlinux.org/packages/redisinsight#comment-906529
- install -d "${pkgdir}/opt/${pkgname}/resources/static/resources/plugins"
cp -avR * "${pkgdir}/opt/${pkgname}"
ln -s /opt/${pkgname}/redisinsight "${pkgdir}/usr/bin/redisinsight"
find "${pkgdir}/opt/${pkgname}" -type d -exec chmod 755 {} +