%global npm_name jju %{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-jju Version: 1.2.1 Release: 3%{?dist} Summary: A set of utilities to work with JSON / JSON5 documents Url: http://rlidwka.github.io/jju/ Source0: https://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz Source10: dl-tests.sh Source11: tests-v%{version}.tar.bz2 # Source11 is generated by running Source10, which pulls from the upstream # revision control repository. License: WTFPL BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} #BuildRequires: npm(eslint) BuildRequires: npm(js-yaml) BuildRequires: mocha %endif %description A set of utilities to work with JSON / JSON5 documents %prep %setup -q -n package rm -rf test/ %setup -q -T -D -a 11 -n package %nodejs_fixdep mocha #%nodejs_fixdep js-yaml * %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pr package.json *.js lib/ \ %{buildroot}%{nodejs_sitelib}/%{npm_name} %{nodejs_symlink_deps} %if 0%{?enable_tests} %check %{nodejs_symlink_deps} --check mocha test/*.js %endif %files %{nodejs_sitelib}/jju %doc README.md %changelog * Tue Jan 05 2016 Zuzana Svetlikova - 1.2.1-3 - Remove license * Mon Jan 04 2016 Zuzana Svetlikova - 1.2.1-2 - Add tests * Tue Nov 24 2015 Zuzana Svetlikova - 1.2.1-1 - Initial build