Blob Blame History Raw
%global modname nomnom

%if ! ( 0%{?fedora} || 0%{?rhel} >= 7 )
%{?nodejs_find_provides_and_requires}
%global nodejs_arches %{ix86} x86_64 %{arm}
%endif

Name:           nodejs-%{modname}
Version:        1.8.1
Release:        6%{?dist}
Summary:        Nodejs option parser with generated usage and commands
License:        MIT
URL:            https://github.com/harthur/nomnom
Source0:        http://registry.npmjs.org/%{modname}/-/%{modname}-%{version}.tgz
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch
BuildRequires:  nodejs-packaging
BuildRequires:  npm(nodeunit)
BuildRequires:  npm(underscore)
BuildRequires:  npm(chalk)

Patch1:         0001-relax-underscore-version-requirement.patch

# nodejs.req does not handle '1.6 - 1.8' correctly, need to file a bug about it...
# manually specify the dependency for now
%global __requires_exclude underscore
Requires:       npm(underscore) >= 1.6
Requires:       npm(underscore) < 1.9

%description
Nomnom is an option parser for Node. It noms your args and gives them back to 
you in a hash.

%prep
%setup -q -n package
%patch1 -p1
%nodejs_fixdep chalk "^1.1.1"

%build
# nothing to do

%check
%nodejs_symlink_deps --check
nodeunit test/*.js

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{modname}
cp -p package.json nomnom.js %{buildroot}%{nodejs_sitelib}/%{modname}/
%nodejs_symlink_deps

%files
%doc README.md LICENSE
%{nodejs_sitelib}/%{modname}

%changelog
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Feb 22 2016 Tom Hughes <tom@compton.nu> - 1.8.1-5
- Update npm(chalk) dependency

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

* Mon Jan 11 2016 Dan Callaghan <dcallagh@redhat.com> - 1.8.1-3
- enabled tests

* Wed Oct 07 2015 Dan Callaghan <dcallagh@redhat.com> - 1.8.1-2
- relaxed underscore version requirement

* Tue Sep 01 2015 Dan Callaghan <dcallagh@redhat.com> - 1.8.1-1
- upstream bug fix release 1.8.1

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

* Sun Oct 12 2014 Dan Callaghan <dcallagh@redhat.com> - 1.8.0-1
- initial version