Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:       nodejs-load-grunt-tasks
Version:    3.5.0
Release:    2%{?dist}
Summary:    Load multiple grunt tasks using globbing patterns
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/sindresorhus/load-grunt-tasks
Source0:    http://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-%{version}.tgz
# The npm tarball doesn't contain tests, so get it from the upstream github repo
Source1:    https://raw.githubusercontent.com/sindresorhus/load-grunt-tasks/v%{version}/gruntfile.js
# Include a copy of the MIT license to comply with license requirements.
Source2:    https://raw.githubusercontent.com/sindresorhus/load-grunt-tasks/v%{version}/license


BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:  nodejs-packaging
BuildRequires:  npm(multimatch)
BuildRequires:  npm(resolve-pkg)

%if 0%{?enable_tests}
BuildRequires:  npm(arrify)
BuildRequires:  npm(grunt-cli)
BuildRequires:  npm(grunt-contrib-clean)
BuildRequires:  npm(grunt-simple-mocha)
BuildRequires:  npm(grunt-svgmin)
BuildRequires:  npm(pkg-up)
%endif


%description
%{summary}.


%prep
%setup -q -n package
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .

%nodejs_fixdep findup-sync

%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/load-grunt-tasks
cp -pr package.json *.js \
    %{buildroot}%{nodejs_sitelib}/load-grunt-tasks

%nodejs_symlink_deps

%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/grunt
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif


%files
%{!?_licensedir:%global license %doc}
%doc readme.md
%license license
%{nodejs_sitelib}/load-grunt-tasks


%changelog
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Sat Jul 23 2016 Jared Smith <jsmith@fedoraproject.org> - 3.5.0-1
- Update to upstream 3.5.0 release

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jan 13 2016 Tom Hughes <tom@compton.nu> - 0.4.0-6
- Update npm(multimatch) dependency

* Fri Jan  1 2016 Tom Hughes <tom@compton.nu> - 0.4.0-5
- Update npm(findup-sync) dependency

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Apr 13 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.0-2
- remove stray nodejs_fixdep

* Sat Mar 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.0-1
- initial package