Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

# disable tests
# tests depend on jshint which is not packaged due to license issues
# https://github.com/jshint/jshint/issues/1234
%global enable_tests 0
%global srcname grunt-contrib-htmlmin
%global commit e210c0acbbbcb8e1b3960a0168d60f843e2f9830

Name:           nodejs-%{srcname}
Version:        0.4.0
Release:        2%{?dist}
Summary:        Minify HTML
License:        MIT
URL:            https://github.com/gruntjs/grunt-contrib-htmlmin
Source0:        https://github.com/gruntjs/%{srcname}/archive/%{commit}/%{srcname}-%{commit}.tar.gz

BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(grunt)
BuildRequires:  npm(grunt-contrib-clean)
BuildRequires:  npm(grunt-contrib-internal)
BuildRequires:  npm(grunt-contrib-jshint)
BuildRequires:  npm(grunt-contrib-nodeunit)
%endif


%description
%{summary}.


%prep
%setup -q -n %{srcname}-%{commit}
rm -rf node_modules/

%nodejs_fixdep chalk '0.x'
%nodejs_fixdep pretty-bytes


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json tasks/ %{buildroot}%{nodejs_sitelib}/%{srcname}

%nodejs_symlink_deps


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


%files
%doc README.md
%license LICENSE-MIT
%{nodejs_sitelib}/%{srcname}


%changelog
* Sun Mar  8 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.4.0-2
- Update Source0 to comply with github source guidelines

* Fri Feb 27 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.4.0-1
- Updated to upstream 0.4.0
- Corrected URL
- Clarified disabled check comment
- Moved licence from %%doc to %%license
- Moved Source0 from npm to github, new npm release doesn't contain the license
- Fixdep on chalk and pretty-bytes

* Fri Nov 21 2014 Piotr Popieluch <piotr1212@gmail.com> - 0.3.0-1
- Initial package