blob: 2c6488fd1da1691a63f57cade78c979f3ce41946 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
pkgbase=python-nodejs-wheel
pkgname=(python-nodejs-wheel python-nodejs-wheel-binaries)
pkgver=22.14.0
pkgrel=1
pkgdesc="Unoffical Node.js wheels"
arch=("x86_64")
url="https://pypi.org/project/nodejs-wheel/"
license=("MIT")
depends=("python")
options=(!lto)
makedepends=(
"python-installer" "python-build" "python-scikit-build-core" "python-setuptools-scm" "python-wheel"
"python-hatchling" "python-hatch-vcs")
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/njzjz/nodejs-wheel/archive/refs/tags/v$pkgver.tar.gz"
"nodejs-$pkgver.tar.gz::https://github.com/nodejs/node/archive/refs/tags/v$pkgver.tar.gz"
)
sha256sums=('8e02a55a4d06f4cb0c8763c76fec3ed852eccb57e9f5ccdcb469dc3bbcfb1ce4'
'ca1a2b5c0c7bc8343ccf1b4b6347a3cab093ed7ac642397189a15098105809c3')
noextract=("nodejs-$pkgver.tar.gz")
prepare() {
cd "$srcdir/nodejs-wheel-$pkgver"
sed -i "s|https://github.com/nodejs/node/archive/refs/tags/v|file://$srcdir/nodejs-|g" \
CMakeLists.txt
}
build() {
cd "$srcdir/nodejs-wheel-$pkgver"
echo "Building nodejs-wheel-binaries..."
python -m build --wheel --no-isolation
cd cmd
echo "Building nodejs-wheel cli tools..."
sed -i "s/source = \"vcs\"/source = \"vcs\"\nfallback-version = \"$pkgver\"/" \
pyproject.toml
python -m build --wheel --no-isolation
}
package_python-nodejs-wheel() {
depends+=("python-nodejs-wheel-binaries")
pkgdesc+=" (CLI tools)"
conflicts=("nodejs" "npm")
provides=("nodejs=$pkgver" "npm")
cd "$srcdir/nodejs-wheel-$pkgver"
python -m installer --destdir="$pkgdir" cmd/dist/*.whl
install -Dm644 cmd/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python-nodejs-wheel-binaries() {
cd "$srcdir/nodejs-wheel-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|