# needed for building on el6 %{?nodejs_find_provides_and_requires} %global enable_tests 1 %global srcname dashdash %global owner trentm Name: nodejs-%{srcname} Version: 1.10.1 Release: 1%{?dist} Summary: A light, featureful and explicit option parsing library for node.js License: MIT URL: https://github.com/trentm/node-dashdash Source0: https://github.com/%{owner}/node-%{srcname}/archive/%{version}.tar.gz BuildArch: noarch %if 0%{?rhel} == 6 ExclusiveArch: %{ix86} x86_64 %{arm} noarch %else ExclusiveArch: %{nodejs_arches} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(nodeunit) BuildRequires: npm(assert-plus) %endif %description %{summary}. %prep %setup -qn node-%{srcname}-%{version} rm -rf node_modules %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check nodeunit test/*.test.js %endif %files %{!?_licensedir:%global license %doc} %doc CHANGES.md AUTHORS README.md TODO.txt examples %license LICENSE.txt %{nodejs_sitelib}/%{srcname} %changelog * Sun Dec 13 2015 Piotr Popieluch - 1.10.1-1 - Initial package