%global modname grunt-sed %if ! ( 0%{?fedora} || 0%{?rhel} >= 7 ) %{?nodejs_find_provides_and_requires} %global nodejs_arches %{ix86} x86_64 %{arm} %endif # tests are disabled until grunt-exec is packaged %bcond_with tests Name: nodejs-%{modname} Version: 0.1.1 Release: 1%{?dist} Summary: Grunt task for search and replace License: MIT URL: https://github.com/jharding/grunt-sed Source0: http://registry.npmjs.org/%{modname}/-/%{modname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if %{with tests} BuildRequires: npm(replace) BuildRequires: npm(grunt-contrib-jshint) BuildRequires: npm(grunt-exec) %endif %description Built on top of replace, grunt-sed is a Grunt plugin for performing search and replace on files. %prep %setup -q -n package %nodejs_fixdep replace %build # nothing to do %check %if %{with tests} %nodejs_symlink_deps --check grunt test %endif %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{modname} cp -pr package.json tasks/ %{buildroot}%{nodejs_sitelib}/%{modname}/ %nodejs_symlink_deps %files %doc README.md LICENSE-MIT %{nodejs_sitelib}/%{modname} %changelog * Sun Oct 12 2014 Dan Callaghan - 0.1.1-1 - initial version