Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 5158934e3ed639901e1009ede83ee0c1 > files > 3

nodejs-argparse-0.1.15-1.mga5.src.rpm

%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:       nodejs-argparse
Version:    0.1.15
Release:    %mkrel 1
Summary:    A native port of Python's argparse, an options parsing library
License:    MIT
Group:      System/Libraries
URL:        https://github.com/nodeca/argparse
Source0:    http://registry.npmjs.org/argparse/-/argparse-%{version}.tgz
# The test/ directory is not included in the npm tarball.
# Source1 is generated by running Source10, which pulls from the upstream
# revision control repository.
Source1:    tests-%{version}.tar.bz2
Source10:   dl-tests.sh

BuildArch:  noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
BuildRequires:  npm(underscore)
BuildRequires:  npm(underscore.string)
%endif

%description
This is a native port of Python's argparse, an options parsing library.
It's a full port, except some very rare options. Method names have been
changed to CamelCase.


%prep
%setup -q -n package
%setup -q -D -T -a 1 -n package
chmod -x examples/*.js

%nodejs_fixdep underscore '~1.4'


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/argparse
cp -pr package.json index.js lib/ \
    %{buildroot}%{nodejs_sitelib}/argparse

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
NODE_ENV=test %{nodejs_sitelib}/mocha/bin/mocha
%endif


%files
%doc HISTORY.md LICENSE README.md examples/
%{nodejs_sitelib}/argparse




%changelog
* Wed Oct 29 2014 tv <tv> 0.1.15-1.mga5
+ Revision: 794479
- imported package nodejs-argparse