%{?nodejs_find_provides_and_requires} %global enable_tests 1 # tests disabled due to failing to find grunt contrib modules, even if installed Name: nodejs-grunt Version: 0.4.5 Release: 4%{?dist} Summary: Grunt is a JavaScript library used for automation and running tasks License: MIT Group: System Environment/Libraries URL: https://github.com/gruntjs/grunt Source0: http://registry.npmjs.org/grunt/-/grunt-%{version}.tgz # Get the Gruntfile.js file from the 0.4.5 tag in GitHub Source1: https://raw.githubusercontent.com/gruntjs/grunt/e6f9cdfd61e35f8dc81649c544b8645621ab103d/Gruntfile.js # fix "_ is not defined" errors when using templates # submitted upstream: https://github.com/gruntjs/grunt/pull/1151 Patch1: %{name}-fix-templates.patch 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(coffee-script) BuildRequires: npm(async) BuildRequires: npm(colors) BuildRequires: npm(dateformat) BuildRequires: npm(difflet) BuildRequires: npm(eventemitter2) BuildRequires: npm(exit) BuildRequires: npm(findup-sync) BuildRequires: npm(getobject) BuildRequires: npm(glob) BuildRequires: npm(grunt) BuildRequires: npm(grunt-cli) BuildRequires: npm(grunt-contrib-nodeunit) BuildRequires: npm(grunt-contrib-internal) BuildRequires: npm(grunt-contrib-watch) BuildRequires: npm(grunt-legacy-util) BuildRequires: npm(hooker) BuildRequires: npm(iconv-lite) BuildRequires: npm(js-yaml) BuildRequires: npm(lodash) BuildRequires: npm(minimatch) BuildRequires: npm(nodeunit) BuildRequires: npm(nopt) BuildRequires: npm(rimraf) BuildRequires: npm(temporary) BuildRequires: npm(underscore.string) BuildRequires: npm(which) BuildRequires: npm(test) %endif %description Grunt is the JavaScript task runner. Why use a task runner? In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes. After you've configured it, a task runner can do most of that mundane work for you with basically zero effort. %prep %setup -q -n package %patch1 -p1 # copy the gruntfile cp -p %{SOURCE1} . %nodejs_fixdep async %nodejs_fixdep coffee-script %nodejs_fixdep colors %nodejs_fixdep dateformat %nodejs_fixdep eventemitter2 %nodejs_fixdep findup-sync %nodejs_fixdep glob %nodejs_fixdep hooker %nodejs_fixdep iconv-lite %nodejs_fixdep minimatch %nodejs_fixdep nopt %nodejs_fixdep rimraf %nodejs_fixdep lodash %nodejs_fixdep underscore.string %nodejs_fixdep which %nodejs_fixdep js-yaml %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/grunt cp -pr package.json internal-tasks/ lib/ \ %{buildroot}%{nodejs_sitelib}/grunt %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check #/usr/bin/mocha -R spec grunt test %endif %files %doc LICENSE-MIT README.md %{nodejs_sitelib}/grunt %changelog * Wed Oct 21 2015 Jared Smith - 0.4.5-4 - More drastic nodejs dependency fixes * Wed Oct 21 2015 Jared Smith - 0.4.5-3 - Fix nodejs dependency on glob * Tue Oct 20 2015 Jared Smith - 0.4.5-2 - Fix build dependency on colors * Mon Oct 19 2015 Jared Smith - 0.4.5-1 - Update to upstream 0.4.5 release * Wed Jun 17 2015 Fedora Release Engineering - 0.4.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.4.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat May 31 2014 T.C. Hollingsworth - 0.4.4-3 - apply patch to fix "_ is not defined" errors when using templates * Sun Apr 20 2014 Jamie Nguyen - 0.4.4-2 - add missing internal-tasks/ folder * Sat Mar 29 2014 Jamie Nguyen - 0.4.4-1 - update to upstream release 0.4.4 * Sun Nov 03 2013 Jamie Nguyen - 0.4.1-2 - improve %%summary - add ExclusiveArch logic * Fri Jun 21 2013 Jamie Nguyen - 0.4.1-1 - initial package