%global enable_tests 1 %global srcname fg-lodash Name: nodejs-%{srcname} Version: 0.0.2 Release: 2%{?dist} Summary: FG variant of lodash License: MIT URL: https://github.com/FGRibreau/lodash Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: jasmine-node %endif %description %{summary}. %prep %setup -q -n package rm -rf node_modules %nodejs_fixdep lodash '3.x' %nodejs_fixdep underscore.string '2.3.x' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/jasmine-node specs/index.spec.js %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Tue Dec 15 2015 Piotr Popieluch - 0.0.2-2 - Fixdep lodash - Enable tests * Fri Aug 28 2015 Piotr Popieluch - 0.0.2-1 - Initial package