From d9f432279cef6467520a5ffc8b4a8d7bfe170a30 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Jul 23 2014 17:31:09 +0000 Subject: Initial import (#1122248) --- diff --git a/.gitignore b/.gitignore index e69de29..667fe0e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/yargs-1.2.6.tgz diff --git a/nodejs-yargs.spec b/nodejs-yargs.spec new file mode 100644 index 0000000..8b5fa77 --- /dev/null +++ b/nodejs-yargs.spec @@ -0,0 +1,80 @@ +# This macro is needed at the start for building on EL6 +%{?nodejs_find_provides_and_requires} + +%global enable_tests 0 + +%global barename yargs + +Name: nodejs-yargs +Version: 1.2.6 +Release: 1%{?dist} +Summary: Light-weight option parsing with an argv hash + +Group: Development/Libraries +License: MIT +URL: https://www.npmjs.org/package/yargs +Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: nodejs-packaging >= 6 + +BuildRequires: npm(minimist) + +Requires: npm(minimist) + +%if 0%{?enable_tests} +BuildRequires: npm(hashish) +BuildRequires: npm(chai) +BuildRequires: npm(mocha) +%endif + + +%description +Yargs be a node.js library fer hearties tryin' ter parse optstrings against +their will where even the boo box be not enough to coerce them. This here +module is fer scallywags lookin' ter plunder all the sunken -shipz of their +--treasures thru program usage but be tired of optstrings disincling to +acquiesce to yer requests. + +With yargs, ye be havin' a map that leads straight to yer treasure! Treasure of +course, being a simple option hash. + +%prep +%setup -q -n package + +# Remove bundled node_modules if there are any.. +rm -rf node_modules/ + +%nodejs_fixdep --caret +%nodejs_fixdep minimist ~0.x + +%build +%nodejs_symlink_deps --build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/yargs +cp -pr package.json lib index.js \ + %{buildroot}%{nodejs_sitelib}/yargs + +%nodejs_symlink_deps + + +%check +%if 0%{?enable_tests} +%nodejs_symlink_deps --check +mocha -R nyan +%endif + + +%files +%doc README.md LICENSE +%{nodejs_sitelib}/yargs/ + +%changelog +* Tue Jul 22 2014 Ralph Bean - 1.2.6-1 +- Initial packaging for Fedora. diff --git a/sources b/sources index e69de29..d10a09e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +bab73c688e366d651dea25d57dbff110 yargs-1.2.6.tgz