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

%global enable_tests 0

%global barename grunt-html-validation

Name:               nodejs-grunt-html-validation
Version:            0.1.18
Release:            4%{?dist}
Summary:            W3C html validation grunt plugin

License:            MIT
URL:                https://www.npmjs.org/package/grunt-html-validation
Source0:            https://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz
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)
BuildRequires:      npm(grunt-contrib-jshint)
BuildRequires:      npm(grunt)
BuildRequires:      npm(grunt-contrib-clean)
%endif


%description
W3C html validation grunt plugin. Validate all files in a directory
automatically.

%prep
%setup -q -n package

# Remove odd executable bits.
chmod -x LICENSE-MIT package.json tasks/html_validation.js

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

%nodejs_fixdep --caret
%nodejs_fixdep request ~2.x
%nodejs_fixdep w3cjs ~0.1.x

%build
# Nothing to build.

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

%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-html-validation/

%changelog
* Fri Aug 28 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.1.18-4
- Change Source0 url from http to https
- Remove explicit BR's
- Remove obsolete fixdep

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

* Fri Oct 24 2014 Ralph Bean <rbean@redhat.com> - 0.1.18-2
- Remove further executable bit from tasks/html_validation.js.

* Thu Oct 23 2014 Ralph Bean <rbean@redhat.com> - 0.1.18-1
- Latest upstream.
- Build as noarch.
- Remove odd executable bits on package.json and LICENSE-MIT.
- Remove Gruntfile.js from the package.
- Remove lib/ from the package (as per upstream).

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