pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

My little script for port vscode on web



Need nodejs and ripgrep for depency
#!/usr/bin/bash
#find . -name *.node
pkgname=code-server
pkgver=4.8.2
path=/usr/pkg/bin #for netbsd
path=/opt/local/bin #for smartos
pkgdir=${pkgname}-$pkgver-linux-armv7l
cd $pkgdir
rm lib/node
ln -s $path/node lib/
rm lib/vscode/node_modules/\@vscode/ripgrep/bin/rg
ln -s $path/rg lib/vscode/node_modules/\@vscode/ripgrep/bin/rg
rm -r node_modules/argon2/build-tmp-napi-v3/
rm -r lib/vscode/node_modules/native-watchdog/build/Release/obj.target
rm -r lib/vscode/node_modules/\@parcel/watcher/prebuilds
rm -r lib/vscode/node_modules/\@parcel/watcher/build/Release/obj.target
rm -r lib/vscode/node_modules/\@parcel/watcher/build/Release/node-addon-api
rm -r lib/vscode/node_modules/spdlog/build/Release/obj.target
cd -
mkdir code-native
cd code-native
npm install argon2\@0.29.0 spdlog node-pty node-gyp native-watchdog \@parcel\/watcher
cd node_modules/\@parcel\/watcher
node ../../node-gyp/bin/node-gyp.js configure
node ../../node-gyp/bin/node-gyp.js build
cd -
cp code-native/node_modules/argon2/lib/binding/napi-v3/argon2.node \
$pkgdir/node_modules/argon2/lib/binding/napi-v3/
cp code-native/node_modules/spdlog/build/Release/spdlog.node \
$pkgdir/lib/vscode/node_modules/spdlog/build/Release/
cp code-native/node_modules/node-pty/build/Release/pty.node \
$pkgdir/lib/vscode/node_modules/node-pty/build/Release/
cp code-native/node_modules/native-watchdog/build/Release/watchdog.node \
$pkgdir/lib/vscode/node_modules/native-watchdog/build/Release/
cp code-native/node_modules/\@parcel/watcher/build/Release/watcher.node \
$pkgdir/lib/vscode/node_modules/@parcel/watcher/build/Release/




Home | Main Index | Thread Index | Old Index