# Contributor: Corey Oliver # Maintainer: Corey Oliver global pkgname := 'node-sodium' global _pkgname := 'sodium' global pkgver := '1.2.3' global pkgrel := '2' global pkgdesc := '"Port of the lib sodium encryption library to Node.js'" global url := '"https://github.com/paixaop/node-sodium'" global arch := '"x86 x86_64'" global license := '"MIT'" global depends := '"nodejs'" global makedepends := '"libsodium-dev=1.0.11-r0 python2 nodejs-npm'" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/paixaop/$pkgname/archive/$pkgver.tar.gz fix-gyp-binding.patch remove-preinstall.patch "" global builddir := ""$srcdir/$pkgname-$pkgver"" proc prepare { default_prepare || return 1 update_config_guess || return 1 } proc build { cd $builddir npm install && npm test && npm prune --production } proc package { global 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" } global md5sums := '"78e091e1dddc608d337d430b635b12ad node-sodium-1.2.3.tar.gz fb3a540514a13bc7038bf477a1388d6c fix-gyp-binding.patch e973e94eaed192b294ac73386c1c5296 remove-preinstall.patch'" global sha256sums := '"b9f370542a66fc3bdd0c588adbbef38ff517a386cdcfee7178d8c3ac153efca7 node-sodium-1.2.3.tar.gz 0f7170ecd9ccf3fd3a22c58d1238b2b6ccadf9bcb87b0b8009c1d78a9f5e208b fix-gyp-binding.patch 6be7fd58c2298de8266e47bf8861d387300a3a79f54c31436ea770bb5e1588fe remove-preinstall.patch'" global sha512sums := '"60dd7e5bf07a87d22d25099caa3814a59175281a352c03cd7d589ba2163013e946e9853609f77be9d4115a0c2fd7a9463afaa1f42f954f6e89a6b6f2fbb238a8 node-sodium-1.2.3.tar.gz 95b18085d8d2143987dd011dfbd9b3386dae3254f936290f77565788cafb9c98ceb757354cba5a4866d0c6d3d4b95fa9dc9e1de985544358d6446cf0cbf29372 fix-gyp-binding.patch f3b90002182d0f1f01fea450469e9d04cd4312479cf57a9742523bc60289704d70ae1e3356d9dee69e291bc86a0d091eee6ce41c288b30b5cbbcd20c44727f83 remove-preinstall.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(node-sodium)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:_pkgname) op:Equal rhs:{(sodium)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.2.3)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(2)} spids:[15])] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Port of the lib sodium encryption library to Node.js"))} spids: [18] ) ] spids: [18] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://github.com/paixaop/node-sodium"))} spids: [23] ) ] spids: [23] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ ("x86 x86_64"))} spids:[28])] spids: [28] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (MIT))} spids:[33])] spids: [33] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ (nodejs))} spids:[38])] spids: [38] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("libsodium-dev=1.0.11-r0 python2 nodejs-npm"))} spids: [43] ) ] spids: [43] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz::https://github.com/paixaop/") ($ VSub_Name "$pkgname") (/archive/) ($ VSub_Name "$pkgver") (".tar.gz\n") ("fix-gyp-binding.patch\n") ("remove-preinstall.patch\n") ) } spids: [48] ) ] spids: [48] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver"))} spids: [62] ) ] spids: [62] ) (FuncDef name: prepare body: (BraceGroup children: [ (AndOr children: [ (C {(default_prepare)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(update_config_guess)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [76] ) spids: [72 75] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (AndOr children: [ (C {(npm)} {(install)}) (AndOr children: [(C {(npm)} {(test)}) (C {(npm)} {(prune)} {(--production)})] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [103] ) spids: [99 102] ) (FuncDef name: package body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:moduledir) op: Equal rhs: {(DQ ($ VSub_Name "$pkgdir") (/usr/lib/node_modules/) ($ VSub_Name "$_pkgname"))} spids: [141] ) ] spids: [141] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$moduledir"))}) (C {(cp)} {(DQ ($ VSub_Name "$builddir") (/index.js))} {(DQ ($ VSub_Name "$moduledir") (/index.js))} ) (C {(cp)} {(DQ ($ VSub_Name "$builddir") (/package.json))} {(DQ ($ VSub_Name "$moduledir") (/package.json))} ) (C {(cp)} {(-r)} {(DQ ($ VSub_Name "$builddir") (/node_modules))} {(DQ ($ VSub_Name "$moduledir") (/node_modules))} ) (C {(cp)} {(-r)} {(DQ ($ VSub_Name "$builddir") (/build))} {(DQ ($ VSub_Name "$moduledir") (/build))} ) (C {(cp)} {(-r)} {(DQ ($ VSub_Name "$builddir") (/lib))} {(DQ ($ VSub_Name "$moduledir") (/lib))} ) ] spids: [138] ) spids: [134 137] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:md5sums) op: Equal rhs: { (DQ ("78e091e1dddc608d337d430b635b12ad node-sodium-1.2.3.tar.gz\n") ("fb3a540514a13bc7038bf477a1388d6c fix-gyp-binding.patch\n") ("e973e94eaed192b294ac73386c1c5296 remove-preinstall.patch") ) } spids: [232] ) ] spids: [232] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha256sums) op: Equal rhs: { (DQ ( "b9f370542a66fc3bdd0c588adbbef38ff517a386cdcfee7178d8c3ac153efca7 node-sodium-1.2.3.tar.gz\n" ) ("0f7170ecd9ccf3fd3a22c58d1238b2b6ccadf9bcb87b0b8009c1d78a9f5e208b fix-gyp-binding.patch\n") ( "6be7fd58c2298de8266e47bf8861d387300a3a79f54c31436ea770bb5e1588fe remove-preinstall.patch" ) ) } spids: [239] ) ] spids: [239] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "60dd7e5bf07a87d22d25099caa3814a59175281a352c03cd7d589ba2163013e946e9853609f77be9d4115a0c2fd7a9463afaa1f42f954f6e89a6b6f2fbb238a8 node-sodium-1.2.3.tar.gz\n" ) ( "95b18085d8d2143987dd011dfbd9b3386dae3254f936290f77565788cafb9c98ceb757354cba5a4866d0c6d3d4b95fa9dc9e1de985544358d6446cf0cbf29372 fix-gyp-binding.patch\n" ) ( "f3b90002182d0f1f01fea450469e9d04cd4312479cf57a9742523bc60289704d70ae1e3356d9dee69e291bc86a0d091eee6ce41c288b30b5cbbcd20c44727f83 remove-preinstall.patch" ) ) } spids: [246] ) ] spids: [246] ) ] )