Build with a specific Node.js version using nvm

master
willemw12 2019-04-06 08:25:19 +02:00
parent ea3e602383
commit 78976f7635
2 changed files with 19 additions and 5 deletions

View File

@ -1,14 +1,13 @@
# Generated by mksrcinfo v8
# Fri Apr 6 16:17:06 UTC 2018
pkgbase = cpod-git
pkgdesc = A simple, beautiful podcast app
pkgver = 1.22.6.r0.ge4362cb
pkgver = 1.27.0.r42.g98c1a1b
pkgrel = 1
url = https://github.com/z-------------/cumulonimbus
arch = x86_64
license = Apache
makedepends = git
makedepends = gulp
makedepends = nvm
makedepends = python2
makedepends = yarn
depends = gconf

View File

@ -2,20 +2,23 @@
_pkgname=cpod
pkgname=$_pkgname-git
pkgver=1.22.6.r0.ge4362cb
pkgver=1.27.0.r42.g98c1a1b
pkgrel=1
pkgdesc="A simple, beautiful podcast app"
arch=('x86_64')
url="https://github.com/z-------------/cumulonimbus"
license=('Apache')
depends=('gconf' 'gtk-update-icon-cache')
makedepends=('git' 'gulp' 'python2' 'yarn')
makedepends=('git' 'gulp' 'nvm' 'python2' 'yarn')
provides=($_pkgname)
conflicts=($_pkgname)
replaces=('cumulonimbus')
source=($pkgname::git+https://github.com/z-------------/cumulonimbus.git)
sha256sums=('SKIP')
# Latest of a supported major version
_nodejsver=9.11.2
pkgver() {
cd $pkgname
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
@ -23,7 +26,19 @@ pkgver() {
build() {
cd $pkgname
# Keep all Node.js files inside the package build folder
export HOME="$srcdir/$pkgname"
# Use a specific Node.js version
export NVM_DIR="$srcdir/$pkgname/.nvm"
source /usr/share/nvm/nvm.sh
nvm install $_nodejsver
nvm use $_nodejsver
#yarn config set python /usr/bin/python2
yarn
gulp
}