%global enable_tests 1 %global srcname grunt-contrib-copy Name: nodejs-grunt-contrib-copy Version: 1.0.0 Release: 2%{?dist} Summary: Copy files and folders License: MIT URL: https://www.npmjs.org/package/grunt-contrib-copy Source0: https://github.com/gruntjs/%{srcname}/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: nodejs-packaging >= 6 %if 0%{?enable_tests} # skip jshint, not packaged #BuildRequires: npm(grunt-contrib-jshint) BuildRequires: npm(file-sync-cmp) BuildRequires: npm(grunt-cli) BuildRequires: npm(grunt-contrib-clean) BuildRequires: npm(grunt-contrib-internal) BuildRequires: npm(grunt-contrib-nodeunit) %endif %description Copy files and folders. %prep %autosetup -n %{srcname}-%{version} # Remove bundled node_modules if there are any.. rm -rf node_modules/ %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/grunt-contrib-copy cp -pr package.json tasks \ %{buildroot}%{nodejs_sitelib}/grunt-contrib-copy %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} grunt clean grunt copy grunt nodeunit %endif %files %doc AUTHORS CHANGELOG CONTRIBUTING.md README.md %license LICENSE-MIT %{nodejs_sitelib}/grunt-contrib-copy/ %changelog * Sun Feb 19 2017 Piotr Popieluch - 1.0.0-2 - Switch to github sources which include license and tests - Remove explicit requires - Updated buildrequires - Remove jshint BR: and tests - Enable tests - Removed redundant fixdeps - Removed symlink deps in %build section, nothing is being built - Added 'node -e requires' to check section * Fri Aug 26 2016 Matthias Runge - 1.0.0-1 - update to 1.0.0 and submit for re-review * Mon Jul 21 2014 Ralph Bean - 0.5.0-2 - Specify noarch. * Tue Jul 08 2014 Ralph Bean - 0.5.0-1 - Initial packaging for Fedora.