removed getnvm step

master
Jef Roosens 2022-05-12 08:53:00 +02:00
parent e8f239da99
commit 6a978615a4
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 1 additions and 30 deletions

View File

@ -8,7 +8,7 @@ arch=(x86_64)
url="https://github.com/Mastermindzh/tidal-hifi"
license=("custom:MIT")
depends=(libxss nss gtk3 libxcrypt-compat)
makedepends=(git)
makedepends=(git nvm)
provides=(tidal-hifi)
conflicts=(tidal-hifi)
@ -17,39 +17,12 @@ source=("git+https://github.com/Mastermindzh/tidal-hifi.git"
sha512sums=('SKIP'
'31cf40fb3ac81c4a64a8410a78e97c268a440577bce54347ce62f8a9566c8897f8083cd1e5afa40b0fbe9a149fc4fb4f29cad91a12e5b47cf8e300e56351a4f1')
getnvm() {
if command -v nvm
then
echo "nvm command found, using system version.."
else
if test -f "/usr/share/nvm/init-nvm.sh"
then
echo "found init-nvm.sh in /usr/share/nvm, sourcing..."
unset npm_config_prefix
source "/usr/share/nvm/init-nvm.sh"
else
echo "nvm could not be found, installing"
unset npm_config_prefix
folderName=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 12)
git clone https://aur.archlinux.org/nvm.git "$folderName"
cd "$folderName" || exit
makepkg -si --asdeps
source /usr/share/nvm/init-nvm.sh
cd ../
rm -rf "$folderName"
fi
fi
}
pkgver() {
cd "${srcdir}/${pkgname%-git}" || exit
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
getnvm
cd "${srcdir}/${pkgname%-git}" || exit
# use correct nodejs/npm versions
@ -61,8 +34,6 @@ prepare() {
}
build() {
getnvm
cd "${srcdir}/${pkgname%-git}" || exit
# We are not using the systems Electron as we need castlab's Electron.