Blob Blame History Raw
%global enable_tests 0

Name:       nodejs-commander
Version:    1.1.1
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

# 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
cp -pr %{nodejs_sitelib} .
make test
%endif


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


%changelog
* 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