# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 1 %global barename yargs Name: nodejs-yargs Version: 3.32.0 Release: 1%{?dist} Summary: Light-weight option parsing with an argv hash Group: Development/Libraries License: MIT URL: https://www.github.com/yargs/yargs Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz # The test files are not included in the npm tarball. # Source{1-9} are generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source2: examples-%{version}.tar.bz2 Source10: dl-tests.sh Patch0: nodejs-yargs_fix-default-locale.patch BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging >= 6 BuildRequires: npm(camelcase) BuildRequires: npm(cliui) BuildRequires: npm(decamelize) BuildRequires: npm(wrap-ansi) BuildRequires: npm(y18n) %if 0%{?enable_tests} BuildRequires: npm(chai) BuildRequires: npm(chalk) BuildRequires: npm(es6-promise) BuildRequires: npm(hashish) BuildRequires: npm(mocha) BuildRequires: npm(os-locale) BuildRequires: npm(which) BuildRequires: npm(win-spawn) %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 # setup the tests %setup -q -T -D -a 1 -n package # setup the examples %setup -q -T -D -a 2 -n package # Patch to fix default locale %patch0 -p1 # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep --caret %nodejs_fixdep camelcase %nodejs_fixdep window-size %nodejs_fixdep wordwrap %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/yargs cp -pr package.json lib/ locales/ index.js \ %{buildroot}%{nodejs_sitelib}/yargs %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} mocha -R nyan %endif %files %doc README.md LICENSE %{nodejs_sitelib}/yargs/ %changelog * Wed Jul 13 2016 Jared Smith - 3.32.0-1 - Update to upstream 3.32.0 release * Tue Feb 16 2016 Jared Smith - 3.2.1-5 - Relax version of npm(wordwrap) * Thu Feb 04 2016 Fedora Release Engineering - 3.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sun Nov 15 2015 Piotr Popieluch - 3.2.1-3 - Remove unused dependency * Wed Jun 17 2015 Fedora Release Engineering - 3.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Feb 22 2015 Ralph Bean - 3.2.1-1 - new version * Fri Feb 20 2015 Ralph Bean - 3.1.0-1 - new version * Fri Jan 09 2015 Ralph Bean - 1.3.3-1 - Update to latest upstream for RHBZ#1177619. * Tue Jul 22 2014 Ralph Bean - 1.2.6-1 - Initial packaging for Fedora.