d5b3d3f
%{?nodejs_find_provides_and_requires}
d5b3d3f
81ca9e4
%global enable_tests 0
81ca9e4
81ca9e4
Name:       nodejs-commander
b307c81
Version:    1.2.0
09634cd
Release:    2%{?dist}
81ca9e4
Summary:    Node.js command-line interfaces made easy
81ca9e4
# License text is included in Readme.md
81ca9e4
License:    MIT
81ca9e4
Group:      System Environment/Libraries
81ca9e4
URL:        https://github.com/visionmedia/commander.js
81ca9e4
Source0:    http://registry.npmjs.org/commander/-/commander-%{version}.tgz
81ca9e4
# The test files are not included in the npm tarball.
81ca9e4
# Source1 is generated by running Source10, which pulls from the upstream
81ca9e4
# version control repository.
81ca9e4
Source1:    tests-%{version}.tar.bz2
81ca9e4
Source10:   dl-tests.sh
b307c81
81ca9e4
BuildArch:  noarch
09634cd
%if 0%{?fedora} >= 19
b307c81
ExclusiveArch: %{nodejs_arches} noarch
09634cd
%else
09634cd
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
09634cd
%endif
81ca9e4
81ca9e4
# Dep generator bug which adds a trailing dot in the nodejs(engine) requires.
81ca9e4
Patch0:     nodejs-commander-1.1.1-deps.patch
81ca9e4
09634cd
BuildRequires:  nodejs-packaging
81ca9e4
81ca9e4
%if 0%{?enable_tests}
81ca9e4
BuildRequires:  npm(keypress)
81ca9e4
BuildRequires:  npm(should)
81ca9e4
%endif
81ca9e4
81ca9e4
%description
81ca9e4
The complete solution for Node.js command-line interfaces,
81ca9e4
inspired by Ruby's commander.
81ca9e4
81ca9e4
81ca9e4
%prep
81ca9e4
%setup -q -n package
81ca9e4
%setup -T -D -a 1 -q -n package
81ca9e4
%patch0 -p1
81ca9e4
81ca9e4
81ca9e4
%build
81ca9e4
#nothing to do
81ca9e4
81ca9e4
81ca9e4
%install
81ca9e4
mkdir -p %{buildroot}%{nodejs_sitelib}/commander
81ca9e4
cp -pr package.json index.js \
81ca9e4
    %{buildroot}%{nodejs_sitelib}/commander
81ca9e4
81ca9e4
%nodejs_symlink_deps
81ca9e4
81ca9e4
81ca9e4
%if 0%{?enable_tests}
81ca9e4
%check
09634cd
%nodejs_symlink_deps --check
b307c81
find test/test.*.js -exec ./test/run '{}' \;
81ca9e4
%endif
81ca9e4
81ca9e4
81ca9e4
%files
81ca9e4
%doc History.md Readme.md
81ca9e4
%{nodejs_sitelib}/commander
81ca9e4
81ca9e4
81ca9e4
%changelog
09634cd
* Sat Jul 06 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.2.0-2
09634cd
- fix compatible arches for f18/el6
09634cd
b307c81
* Fri Jul 05 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.2.0-1
b307c81
- restrict to compatible arches
b307c81
- update to upstream release 1.2.0
b307c81
T.C. Hollingsworth 78e3d51
* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.1-2
T.C. Hollingsworth 78e3d51
- rebuild for missing npm(commander) provides on EL6
T.C. Hollingsworth 78e3d51
81ca9e4
* Tue Feb 12 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.1.1-1
81ca9e4
- update to upstream release 1.1.1
81ca9e4
- remove patch that disables a known broken test
81ca9e4
81ca9e4
* Mon Feb 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.6.1-1
81ca9e4
- initial package