Advertisement
patlefort

tagspaces aur nvm patch

Oct 18th, 2024
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.67 KB | Source Code | 0 0
  1. diff --git a/PKGBUILD b/PKGBUILD
  2. index 8884100..e30b0ff 100644
  3. --- a/PKGBUILD
  4. +++ b/PKGBUILD
  5. @@ -4,12 +4,13 @@ pkgname=tagspaces
  6.  pkgver=6.0.2
  7.  pkgrel=1
  8.  _electronversion=32
  9. +_nodeversion=20
  10.  pkgdesc="An offline, open source, document manager with tagging support"
  11.  arch=('x86_64')
  12.  url="https://www.tagspaces.org"
  13.  license=('AGPL-3.0-or-later')
  14.  depends=("electron${_electronversion}" 'libnotify' 'libsecret' 'xdg-utils')
  15. -makedepends=('git' 'libxcrypt-compat' 'npm')
  16. +makedepends=('git' 'libxcrypt-compat' 'npm' 'nvm')
  17.  source=("$pkgname-$pkgver.tar.gz::https://github.com/tagspaces/tagspaces/archive/refs/tags/v$pkgver.tar.gz"
  18.          "$pkgname.desktop"
  19.          "$pkgname.sh")
  20. @@ -17,10 +18,19 @@ sha256sums=('3107087d5dbf70a957bd27a75ce7bf4550423bec6df6c3503c305155fef5a7d0'
  21.              'a548e2b62a61a93d80482ebe43ef11e33e2c2bfef9db641fc583bd5539ac6948'
  22.              '6a0d3ca0f31afdd7587b3dc0ed819f252c350eaeafb17472fe4b7031d4130118')
  23.  
  24. +_ensure_local_nvm() {
  25. +  local NVM_DIR="${srcdir}/.nvm"
  26. +  source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
  27. +  nvm install "${_nodeversion}"
  28. +  nvm use "${_nodeversion}"
  29. +}
  30. +
  31.  prepare() {
  32.    cd "$pkgname-$pkgver"
  33.    export npm_config_cache="$srcdir/npm_cache"
  34.  
  35. +  _ensure_local_nvm
  36. +
  37.    # Modify build target
  38.    sed -i 's/"deb", "tar.gz", "appImage"/"deb"/g' resources/builder.json
  39.  
  40. @@ -46,6 +56,9 @@ build() {
  41.    electronDist="/usr/lib/electron${_electronversion}"
  42.    electronVer="$(sed s/^v// /usr/lib/electron${_electronversion}/version)"
  43.    export ELECTRON_SKIP_BINARY_DOWNLOAD=1
  44. +
  45. +  _ensure_local_nvm
  46. +
  47.    npm run install-ext-node-linux
  48.    npm exec -c "ts-node ./.erb/scripts/clean.js"
  49.    npm run build
  50.  
Tags: tagspaces
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement