%{?nodejs_find_provides_and_requires}
%global enable_tests 0
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: https://github.com/gruntjs/grunt/archive/v%{version}/grunt-%{version}.tar.gz
# 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: 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-watch)
BuildRequires: npm(grunt-legacy-log)
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(shelljs)
BuildRequires: npm(temporary)
BuildRequires: npm(underscore.string)
BuildRequires: npm(which)
%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 grunt-%{version}
%patch1 -p1
%nodejs_fixdep async '^1.5.0'
%nodejs_fixdep coffee-script '~1.3'
%nodejs_fixdep colors '^1.1.2'
%nodejs_fixdep dateformat '*'
%nodejs_fixdep eventemitter2 '~0.4'
%nodejs_fixdep findup-sync '~0.1'
%nodejs_fixdep glob '~3.1'
%nodejs_fixdep hooker '~0.2'
%nodejs_fixdep iconv-lite '~0.2'
%nodejs_fixdep minimatch '~3.0.0'
%nodejs_fixdep nopt '~2.0'
%nodejs_fixdep rimraf '~2.0'
%nodejs_fixdep lodash '^3.10.1'
%nodejs_fixdep underscore.string '~2.2'
%nodejs_fixdep which '~1.0'
%nodejs_fixdep js-yaml '~2.0'
%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
grunt test
%endif
%files
%doc README.md
%license LICENSE-MIT
%{nodejs_sitelib}/grunt
%changelog
* Fri Jan 1 2016 Tom Hughes <tom@compton.nu> - 0.4.5-4
- Update npm(minimatch) dependency
* Mon Dec 14 2015 Tom Hughes <tom@compton.nu> - 0.4.5-3
- Update npm(lodash) dependency
* Sat Nov 21 2015 Tom Hughes <tom@compton.nu> - 0.4.5-2
- Update npm(colors) dependency
* Sat Nov 21 2015 Tom Hughes <tom@compton.nu> - 0.4.5-1
- Update to 0.4.5 upstream release
- Update npm(async) dependency
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat May 31 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.4.4-3
- apply patch to fix "_ is not defined" errors when using templates
* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.4-2
- add missing internal-tasks/ folder
* Sat Mar 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.4-1
- update to upstream release 0.4.4
* Sun Nov 03 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.1-2
- improve %%summary
- add ExclusiveArch logic
* Fri Jun 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.1-1
- initial package