d9f4322
# This macro is needed at the start for building on EL6
d9f4322
%{?nodejs_find_provides_and_requires}
d9f4322
d9f4322
%global enable_tests 0
d9f4322
d9f4322
%global barename yargs
d9f4322
d9f4322
Name:               nodejs-yargs
b5c3f45
Version:            3.2.1
f7f0308
Release:            3%{?dist}
d9f4322
Summary:            Light-weight option parsing with an argv hash
d9f4322
d9f4322
Group:              Development/Libraries
d9f4322
License:            MIT
d9f4322
URL:                https://www.npmjs.org/package/yargs
d9f4322
Source0:            http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz
d9f4322
BuildArch:          noarch
d9f4322
%if 0%{?fedora} >= 19
d9f4322
ExclusiveArch:      %{nodejs_arches} noarch
d9f4322
%else
d9f4322
ExclusiveArch:      %{ix86} x86_64 %{arm} noarch
d9f4322
%endif
d9f4322
d9f4322
BuildRequires:      nodejs-packaging >= 6
d9f4322
d9f4322
%if 0%{?enable_tests}
d9f4322
BuildRequires:      npm(hashish)
d9f4322
BuildRequires:      npm(chai)
d9f4322
BuildRequires:      npm(mocha)
d9f4322
%endif
d9f4322
d9f4322
d9f4322
%description
d9f4322
Yargs be a node.js library fer hearties tryin' ter parse optstrings against
d9f4322
their will where even the boo box be not enough to coerce them. This here
d9f4322
module is fer scallywags lookin' ter plunder all the sunken -shipz of their
d9f4322
--treasures thru program usage but be tired of optstrings disincling to
d9f4322
acquiesce to yer requests.
d9f4322
d9f4322
With yargs, ye be havin' a map that leads straight to yer treasure! Treasure of
d9f4322
course, being a simple option hash.
d9f4322
d9f4322
%prep
d9f4322
%setup -q -n package
d9f4322
d9f4322
# Remove bundled node_modules if there are any..
d9f4322
rm -rf node_modules/
d9f4322
d9f4322
%nodejs_fixdep --caret
d9f4322
d9f4322
%build
d9f4322
%nodejs_symlink_deps --build
d9f4322
d9f4322
%install
d9f4322
mkdir -p %{buildroot}%{nodejs_sitelib}/yargs
d9f4322
cp -pr package.json lib index.js \
d9f4322
    %{buildroot}%{nodejs_sitelib}/yargs
d9f4322
d9f4322
%nodejs_symlink_deps
d9f4322
d9f4322
d9f4322
%check
d9f4322
%if 0%{?enable_tests}
d9f4322
%nodejs_symlink_deps --check
d9f4322
mocha -R nyan
d9f4322
%endif
d9f4322
d9f4322
d9f4322
%files
d9f4322
%doc README.md LICENSE
d9f4322
%{nodejs_sitelib}/yargs/
d9f4322
d9f4322
%changelog
f7f0308
* Sun Nov 15 2015 Piotr Popieluch <piotr1212@gmail.com> - 3.2.1-3
f7f0308
- Remove unused dependency
f7f0308
1f2a7a4
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
1f2a7a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1f2a7a4
b5c3f45
* Sun Feb 22 2015 Ralph Bean <rbean@redhat.com> - 3.2.1-1
b5c3f45
- new version
b5c3f45
8952819
* Fri Feb 20 2015 Ralph Bean <rbean@redhat.com> - 3.1.0-1
8952819
- new version
8952819
a605722
* Fri Jan 09 2015 Ralph Bean <rbean@redhat.com> - 1.3.3-1
a605722
- Update to latest upstream for RHBZ#1177619.
a605722
d9f4322
* Tue Jul 22 2014 Ralph Bean <rbean@redhat.com> - 1.2.6-1
d9f4322
- Initial packaging for Fedora.