%{?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 Name: nodejs-%{srcname} Version: 0.4.0 Release: 1%{?dist} Summary: Minify HTML License: MIT URL: https://github.com/gruntjs/grunt-contrib-htmlmin Source0: https://github.com/gruntjs/%{srcname}/archive/v%{version}/%{srcname}-%{version}.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}-%{version} 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 * Fri Feb 27 2015 Piotr Popieluch - 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 - 0.3.0-1 - Initial package