mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-17 22:52:40 +01:00
npm is bundled in node.js, but it's a standalone project with its own release cycle. This aport provides LTS version of node.js, i.e. an old npm version. So it'd be better to extract it into a separate aport; this is a preparation for that.
49 lines
2.0 KiB
Plaintext
49 lines
2.0 KiB
Plaintext
# Contributor: Corey Oliver <coreyjonoliver@gmail.com>
|
|
# Maintainer: Corey Oliver <coreyjonoliver@gmail.com>
|
|
pkgname=node-sodium
|
|
_pkgname=sodium
|
|
pkgver=1.2.3
|
|
pkgrel=2
|
|
pkgdesc="Port of the lib sodium encryption library to Node.js"
|
|
url="https://github.com/paixaop/node-sodium"
|
|
arch="x86 x86_64"
|
|
license="MIT"
|
|
depends="nodejs"
|
|
makedepends="libsodium-dev=1.0.11-r0 python2 npm"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/paixaop/$pkgname/archive/$pkgver.tar.gz
|
|
fix-gyp-binding.patch
|
|
remove-preinstall.patch
|
|
"
|
|
builddir="$srcdir/$pkgname-$pkgver"
|
|
|
|
prepare() {
|
|
default_prepare || return 1
|
|
update_config_guess || return 1
|
|
}
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
npm install && npm test && npm prune --production
|
|
}
|
|
|
|
package() {
|
|
moduledir="$pkgdir/usr/lib/node_modules/$_pkgname"
|
|
|
|
mkdir -p "$moduledir"
|
|
cp "$builddir/index.js" "$moduledir/index.js"
|
|
cp "$builddir/package.json" "$moduledir/package.json"
|
|
cp -r "$builddir/node_modules" "$moduledir/node_modules"
|
|
cp -r "$builddir/build" "$moduledir/build"
|
|
cp -r "$builddir/lib" "$moduledir/lib"
|
|
}
|
|
|
|
md5sums="78e091e1dddc608d337d430b635b12ad node-sodium-1.2.3.tar.gz
|
|
fb3a540514a13bc7038bf477a1388d6c fix-gyp-binding.patch
|
|
e973e94eaed192b294ac73386c1c5296 remove-preinstall.patch"
|
|
sha256sums="b9f370542a66fc3bdd0c588adbbef38ff517a386cdcfee7178d8c3ac153efca7 node-sodium-1.2.3.tar.gz
|
|
0f7170ecd9ccf3fd3a22c58d1238b2b6ccadf9bcb87b0b8009c1d78a9f5e208b fix-gyp-binding.patch
|
|
6be7fd58c2298de8266e47bf8861d387300a3a79f54c31436ea770bb5e1588fe remove-preinstall.patch"
|
|
sha512sums="60dd7e5bf07a87d22d25099caa3814a59175281a352c03cd7d589ba2163013e946e9853609f77be9d4115a0c2fd7a9463afaa1f42f954f6e89a6b6f2fbb238a8 node-sodium-1.2.3.tar.gz
|
|
95b18085d8d2143987dd011dfbd9b3386dae3254f936290f77565788cafb9c98ceb757354cba5a4866d0c6d3d4b95fa9dc9e1de985544358d6446cf0cbf29372 fix-gyp-binding.patch
|
|
f3b90002182d0f1f01fea450469e9d04cd4312479cf57a9742523bc60289704d70ae1e3356d9dee69e291bc86a0d091eee6ce41c288b30b5cbbcd20c44727f83 remove-preinstall.patch"
|