Blob Blame History Raw
# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}

# Well, upstream doesn't ship tests with the tarball:
# https://github.com/gruntjs/grunt-contrib-less/issues/228
%global enable_tests 0

%global barename grunt-contrib-less

Name:               nodejs-grunt-contrib-less
Version:            1.2.0
Release:            6%{?dist}
Summary:            Compile LESS files to CSS

License:            MIT
URL:                https://www.npmjs.org/package/grunt-contrib-less
Source0:            https://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz
Source1:            https://raw.githubusercontent.com/gruntjs/grunt-contrib-less/master/LICENSE-MIT
BuildArch:          noarch

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

BuildRequires:      nodejs-packaging >= 6

%if 0%{?enable_tests}
BuildRequires:      npm(grunt-contrib-nodeunit)
# We patch this guy out since it:
# 1) Has 8 unpackaged dependencies itself
# 2) is really just static analysis, not for tests.
#BuildRequires:      npm(grunt-contrib-jshint)
BuildRequires:      npm(grunt)
BuildRequires:      npm(grunt-contrib-internal)
BuildRequires:      npm(grunt-contrib-clean)
BuildRequires:      nodejs-grunt-cli
%endif


%description
Compile LESS files to CSS.

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

# Remove bundled node_modules if there are any..
rm -rf node_modules/

%nodejs_fixdep --caret
%nodejs_fixdep chalk '>=0.4.0'
%nodejs_fixdep maxmin '>=0.2.0'
%nodejs_fixdep less '>=1.7.0'
%nodejs_fixdep async ^1.5.0
%nodejs_fixdep lodash ^3.10.1

%build
# nothing to build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/grunt-contrib-less
cp -pr package.json tasks \
    %{buildroot}%{nodejs_sitelib}/grunt-contrib-less

%nodejs_symlink_deps


%check
%if 0%{?enable_tests}
%nodejs_symlink_deps --check
grunt test
%endif


%files
%doc README.md
%license LICENSE-MIT
%{nodejs_sitelib}/grunt-contrib-less/

%changelog
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

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

* Thu Jun 09 2016 Piotr Popieluch <piotr1212@gmail.com> - - 1.2.0-1
- update to 1.2.0

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

* Tue Dec 15 2015 Tom Hughes <tom@compton.nu> - 1.0.1-2
- Update npm(lodash) dependency

* Mon Nov 30 2015 Piotr Popieluch <piotr1212@gmail.com> - 1.0.1-1
- Update to new version
- Cleanup and update spec to latest guidelines

* Sun Nov 22 2015 Tom Hughes <tom@compton.nu> - 1.0.0-4
- Update npm(async) dependency

* Sat Jul 25 2015 Parag Nemade <pnemade AT fedoraproject DOT org> - 1.0.0-3
- fixdep npm(async)

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

* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 1.0.0-1
- new version

* Tue Nov 25 2014 Ralph Bean <rbean@redhat.com> - 0.12.0-1
- Latest upstream.
- Fixdep on maxmin and less (upstream re-pinned it with no other changes).

* Mon Nov 24 2014 Ralph Bean <rbean@redhat.com> - 0.11.4-2
- Add some notes about running the tests.  Still not enabled.
- Pull a nodejs_fixdep on npm(chalk).

* Thu Oct 23 2014 Ralph Bean <rbean@redhat.com> - 0.11.4-1
- Latest upstream.
- Build as noarch.

* Tue Jul 08 2014 Ralph Bean <rbean@redhat.com> - 0.9.0-1
- Initial packaging for Fedora.