# 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/X11 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.