Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:       nodejs-commander
Version:    1.2.0
Release:    1%{?dist}
Summary:    Node.js command-line interfaces made easy
# License text is included in Readme.md
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/visionmedia/commander.js
Source0:    http://registry.npmjs.org/commander/-/commander-%{version}.tgz
# The test files are not included in the npm tarball.
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:    tests-%{version}.tar.bz2
Source10:   dl-tests.sh

BuildArch:  noarch
ExclusiveArch: %{nodejs_arches} noarch

# Dep generator bug which adds a trailing dot in the nodejs(engine) requires.
Patch0:     nodejs-commander-1.1.1-deps.patch

BuildRequires:  nodejs-devel

%if 0%{?enable_tests}
BuildRequires:  npm(keypress)
BuildRequires:  npm(should)
%endif

%description
The complete solution for Node.js command-line interfaces,
inspired by Ruby's commander.


%prep
%setup -q -n package
%setup -T -D -a 1 -q -n package
%patch0 -p1


%build
#nothing to do


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

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
ln -sf %{nodejs_sitelib} .
find test/test.*.js -exec ./test/run '{}' \;
%endif


%files
%doc History.md Readme.md
%{nodejs_sitelib}/commander


%changelog
* Fri Jul 05 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.2.0-1
- restrict to compatible arches
- update to upstream release 1.2.0

* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.1-2
- rebuild for missing npm(commander) provides on EL6

* Tue Feb 12 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.1.1-1
- update to upstream release 1.1.1
- remove patch that disables a known broken test

* Mon Feb 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.6.1-1
- initial package