X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.alpinelinux.org (Postfix) with ESMTP id DBDFA5C415A for ; Sat, 7 Jan 2017 00:12:01 +0000 (GMT) Received: by mail-oi0-f49.google.com with SMTP id 128so438818581oig.0 for ; Fri, 06 Jan 2017 16:12:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=UVdb0W2xT+jF+0SEHuUh96oxrmNhuxfaoDIDSGstzq0=; b=diRmXVuqfp4ef/RTtx0+am9zvaYlLQtOBZPTrTAMNhrRtTJVcNvy7l6hbkh000M28Y +TFm2ts1/lvsLLg+fMOFlg54PDTjwA5ekwla9fCHkdMosW+UvEfBTtxvpAmvcGRVH3ff YHedeFbA25uTaIQTmIbRIeBvHRJ6OqmK8uwNHZui2aQaq0MxGp/hxc8wU8lpsY5xuS1x ZlC+O1ucArgOMx1cS6Ui/3VoNFLBnVsHAlIGcRB7ST3G4Sse9fw6h4oWONjUVxy3ERe+ lDHsWaszwricOkbQbsUfWKSw1dWrqQR+9g50wiK5dwCWbXtrv4gjQtDnE3A7CmUP77KT 5sGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UVdb0W2xT+jF+0SEHuUh96oxrmNhuxfaoDIDSGstzq0=; b=i5OSe9Xzgdyb5wQ6GjVsdDsZlk9tRoW4W3NPJxR+txjfg/d6ujX7orWSazBFldHxlE pGNgofGXt8XcjifsKkz1guZ46/yZBWqO7euJ8CoZtLNU6TyxKC/KeuJswkeV8KljK8rd WJREepl/P+jMmy70pvERXOg8QGDkXF956z5hW73+ih6FJJMBoJR77lwd8rCrDhJvu9Yg DodcrdoBjfNrHxsmEep9PFKg1DB7JKiDLgbk6veEY8PCrZSCQJ+YlsRk6lmrWm1mPe17 DKE0q8SQaFFKbdpVDM4PbTaOtLrTUiqQbNupwfc8XUeUwpesMuhXBLsO3NOzI6ZmEq6j T/6Q== X-Gm-Message-State: AIkVDXI6pAfcDJs1xZFs4wkS/7uoEP1uYZ2MY97AIn04m4CLgDY9aUifvgaB+dzjpKNaDw== X-Received: by 10.202.52.212 with SMTP id b203mr32371471oia.99.1483747921673; Fri, 06 Jan 2017 16:12:01 -0800 (PST) Received: from localhost.localdomain (104-180-35-43.lightspeed.wchtks.sbcglobal.net. [104.180.35.43]) by smtp.gmail.com with ESMTPSA id o51sm38325355oto.23.2017.01.06.16.12.00 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 06 Jan 2017 16:12:00 -0800 (PST) From: Corey Oliver To: alpine-aports@lists.alpinelinux.org Cc: Corey Oliver Subject: [alpine-aports] [PATCH v2] testing/node-sodium: new aport Date: Fri, 6 Jan 2017 18:10:54 -0600 Message-Id: <20170107001054.29747-1-corey.jon.oliver@gmail.com> X-Mailer: git-send-email 2.9.3 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- Changes v1 -> v2: - use the built-in abuild function default_prepare testing/node-sodium/APKBUILD | 48 +++++++++++++++++++++++++++++ testing/node-sodium/fix-gyp-binding.patch | 11 +++++++ testing/node-sodium/remove-preinstall.patch | 10 ++++++ 3 files changed, 69 insertions(+) create mode 100644 testing/node-sodium/APKBUILD create mode 100644 testing/node-sodium/fix-gyp-binding.patch create mode 100644 testing/node-sodium/remove-preinstall.patch diff --git a/testing/node-sodium/APKBUILD b/testing/node-sodium/APKBUILD new file mode 100644 index 0000000..b96b409 --- /dev/null +++ b/testing/node-sodium/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Corey Oliver +# Maintainer: Corey Oliver +pkgname=node-sodium +_pkgname=sodium +pkgver=1.2.3 +pkgrel=0 +pkgdesc="Port of the lib sodium encryption library to Node.js" +url="https://github.com/paixaop/node-sodium" +arch="all" +license="MIT" +depends="nodejs libsodium=1.0.11-r0" +makedepends="libsodium-dev=1.0.11-r0 python2" +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" diff --git a/testing/node-sodium/fix-gyp-binding.patch b/testing/node-sodium/fix-gyp-binding.patch new file mode 100644 index 0000000..0b32f9a --- /dev/null +++ b/testing/node-sodium/fix-gyp-binding.patch @@ -0,0 +1,11 @@ +--- src/binding.gyp ++++ src/binding.gyp +@@ -79,7 +79,7 @@ + }], + ['OS=="linux"', { + 'libraries': [ +- '../deps/build/lib/libsodium.a' ++ '/usr/lib/libsodium.so.18.1.1' + ] + }] + ] diff --git a/testing/node-sodium/remove-preinstall.patch b/testing/node-sodium/remove-preinstall.patch new file mode 100644 index 0000000..d9b5561 --- /dev/null +++ b/testing/node-sodium/remove-preinstall.patch @@ -0,0 +1,10 @@ +--- src/package.json ++++ src/package.json +@@ -18,7 +18,6 @@ + }, + "scripts": { + "test": "make test", +- "preinstall": "node install.js --preinstall", + "install": "node install.js --install" + }, + "repository": { -- 2.9.3 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---