%global modname nomnom %if ! ( 0%{?fedora} || 0%{?rhel} >= 7 ) %{?nodejs_find_provides_and_requires} %global nodejs_arches %{ix86} x86_64 %{arm} %endif # tests are disabled until nodeunit is packaged %bcond_with tests Name: nodejs-%{modname} Version: 1.8.0 Release: 1%{?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 %if %{with tests} BuildRequires: npm(nodeunit) %endif %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 %build # nothing to do %if %{with tests} %check %nodejs_symlink_deps --check ./node_modules/.bin/nodeunit test/*.js %endif %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 * Sun Oct 12 2014 Dan Callaghan - 1.8.0-1 - initial version