summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Demin2020-08-04 15:23:56 +0500
committerTimur Demin2020-08-04 15:23:56 +0500
commit1c02185f4e188d148420e04d6dc9789895aa46e4 (patch)
treec72f15eb050be6194df2b05c581790ccbaa1578c
parentab9f7d1bb9a5fdf55a2cf6ebead8613173588aa1 (diff)
downloadaur-1c02185f4e188d148420e04d6dc9789895aa46e4.tar.gz
Stop making nvm Node default
-rw-r--r--PKGBUILD15
1 files changed, 5 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ee3f71577d70..066f0ff601c2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,25 +28,20 @@ build () {
# Use node 12
local node_version='12'
export npm_config_cache="$srcdir/$_pkgarchive/npm_cache"
- local npm_prefix=$(npm config get prefix)
- npm config delete prefix
source /usr/share/nvm/init-nvm.sh
- nvm install "$node_version" && nvm use "$node_version"
+ nvm install "$node_version"
# Run the build
cd "$srcdir/$_pkgarchive"
- npm ci
- npm run pack
- # Restore node config
- npm config set prefix "$npm_prefix"
- nvm unalias default
+ nvm exec $node_version npm ci
+ nvm exec $node_version npm run pack
}
package () {
# Set up package directories
install -d ${pkgdir}/{opt,usr/bin}
# Copy built files into the package
- find $srcdir/$_pkgarchive/dist/linux-unpacked -type f \
- -exec install -Dm 755 "{}" "$pkgdir/opt/$pkgname/{}" \;
+ ( cd $srcdir/$_pkgarchive/dist/linux-unpacked && find . -type f \
+ -exec install -Dm 755 "{}" "$pkgdir/opt/$pkgname/{}" \; )
# Symlink the executable path into the package
ln -s /opt/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname
}