%{?scl:%scl_package nodejs-optimist}
%{!?scl:%global pkg_name %{name}}
%{?nodejs_find_provides_and_requires}
# no tap? no problem
%global bootstrap 1
Name: %{?scl_prefix}nodejs-optimist
Version: 0.4.0
Release: 6%{?dist}
Summary: Light-weight option parsing for Node.js
BuildArch: noarch
Group: System Environment/Libraries
# no license file included; package.json says "MIT/X11"
License: MIT/X11
URL: http://github.com/substack/node-optimist
Source0: http://registry.npmjs.org/optimist/-/optimist-%{version}.tgz
BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}nodejs-devel
%if !0%{?bootstrap}
BuildRequires: %{?scl_prefix}npm(tap)
BuildRequires: %{?scl_prefix}npm(hashish)
%endif
%description
Light-weight option parsing with an argv hash. No optstrings attached.
%prep
%setup -q -n package
%nodejs_fixdep wordwrap
%build
#nothing to do
%install
rm -rf %buildroot
mkdir -p %{buildroot}%{nodejs_sitelib}/optimist
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/optimist
%if !0%{?bootstrap}
%check
%nodejs_tap test/*.js
%endif
%clean
rm -rf %buildroot
%files
%defattr(-,root,root,-)
%{nodejs_sitelib}/optimist
%doc LICENSE readme.markdown example
%changelog
* Mon Jan 11 2016 Tomas Hrcka <thrcka@redhat.com> - 0.4.0-6
- Enable scl macros
* Thu Dec 17 2015 Troy Dawson <tdawson@redhat.com> - 0.4.0-5
- Fix dependencies
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.4.0-1
- new upstream release 0.4.0
* Fri Jan 18 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.3.5-1
- initial package generated by npm2rpm