Blob Blame History Raw
%{?scl:%scl_package nodejs-commander}
%{!?scl:%global pkg_name %{name}}

%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:       %{?scl_prefix}nodejs-commander
Version:    2.9.0
Release:    4%{?dist}
Summary:    Node.js command-line interfaces made easy
# License text is included in Readme.md
License:    MIT
URL:        https://github.com/visionmedia/commander.js
Source0:    https://registry.npmjs.org/commander/-/commander-%{version}.tgz
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:    tests-v%{version}.tar.bz2
Source2:    examples-v%{version}.tar.bz2
Source10:   dl-tests.sh

BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{nodejs_arches} noarch
%endif

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

BuildRequires:  %{?scl_prefix}nodejs-devel

%if 0%{?enable_tests}
BuildRequires:  %{?scl_prefix}npm(should)
BuildRequires:  %{?scl_prefix}npm(sinon)
BuildRequires:  %{?scl_prefix}npm(graceful-readlink)
%endif

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

%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
%setup -q -T -D -a 2 -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

#%check
#%nodejs_symlink_deps --check
#%{__nodejs} -e 'require("./")'
#%if 0%{?enable_tests}
#./test/run test/test.*.js
#%endif

%files
%doc Readme.md examples/
%license LICENSE
%{nodejs_sitelib}/commander

%changelog
* Mon May 28 2018 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.9.0-4
- Resolves: RHBZ#1543198, rebuild for multiarch

* Mon Sep 19 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.9.0-3
- Built for RHSCL

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Feb 01 2016 Piotr Popieluch <piotr1212@gmail.com> - 2.9.0-1
- update to upstream release 2.9.0

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.2.0-1
- update to upstream release 2.2.0

* Sun Mar 02 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.1.0-1
- update to upstream release 2.1.0

* Thu Aug 29 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.2.0-6
- fix version of dependency on nodejs-keypress again

* Wed Aug 28 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.2.0-5
- fix version of dependency on nodejs-keypress

* Mon Aug 26 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.2.0-4
- rebuild to enable tests

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jul 06 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.2.0-2
- fix compatible arches for f18/el6

* 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