summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 089e3f6ae277b83acdb64e331d49ee0194cdd708 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pkgname=vscode-node-debug2
pkgver=1.43.0
pkgrel=1
pkgdesc="A VS Code debug adapter that supports debugging Node via the Chrome Debugging Protocol."
url="https://github.com/microsoft/vscode-node-debug2"
arch=('i686' 'x86_64')
license=('MIT')
makedepens=('git' 'npm')
source=(
	"https://github.com/microsoft/vscode-node-debug2/archive/refs/tags/v${pkgver}.tar.gz"
)
sha256sums=('3cb1440a381808a04c24b2a164de84e2d08ac5946f01b51ad0e52b4fd9f82cf0')

package() {

	# Copy a startup script to package directory
	mkdir -p "${pkgdir}/usr/lib/${pkgname}/"

	cd ${srcdir}/vscode-node-debug2-${pkgver}

	npm i
	npm run package

	# Copy the app files & dependency modules to package directory
	mkdir -p "${pkgdir}/usr/lib/${pkgname}/"
	cp -r ./* "${pkgdir}/usr/lib/${pkgname}/"

	# Copy a license file to package directory
	install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	# Remove references to $srcdir of node_modules directory
	#grep -l "${srcdir}" -r "${pkgdir}" | xargs sed -i "s#${_git_srcdir}#/usr/lib/${pkgname}#g"
}