%{?nodejs_find_provides_and_requires} %global packagename grunt-contrib-copy # Tests disabled due to failing tests %global enable_tests 0 Name: nodejs-grunt-contrib-copy Version: 1.0.0 Release: 1%{?dist} Summary: Copy files and folders License: MIT URL: https://github.com/gruntjs/grunt-contrib-copy Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. # Source1 and Source2 are generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source2: docs-%{version}.tar.bz2 Source10: dl-tests.sh # Gruntfile isn't in the npm tarball Source20: https://raw.githubusercontent.com/gruntjs/grunt-contrib-copy/v%{version}/Gruntfile.js # .jshintrc file as well Source21: https://raw.githubusercontent.com/gruntjs/grunt-contrib-copy/v%{version}/.jshintrc # AUTHORS file as well Source22: https://raw.githubusercontent.com/gruntjs/grunt-contrib-copy/v%{version}/AUTHORS # and a license file Source23: https://raw.githubusercontent.com/gruntjs/grunt-contrib-copy/v%{version}/LICENSE-MIT BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(chalk) BuildRequires: npm(file-sync-cmp) BuildRequires: npm(grunt-contrib-clean) BuildRequires: npm(grunt-contrib-internal) BuildRequires: npm(grunt-contrib-jshint) BuildRequires: npm(grunt-contrib-nodeunit) BuildRequires: npm(jshint) %if 0%{?enable_tests} BuildRequires: mocha %endif %description Copy files and folders %prep %setup -q -n package # setup the tests %setup -q -T -D -a 1 -n package # setup the docs %setup -q -T -D -a 1 -n package # copy the gruntfile, jshintrc, and AUTHORS files cp -p %{SOURCE20} . cp -p %{SOURCE21} . cp -p %{SOURCE22} . cp -p %{SOURCE23} . %build # nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json tasks/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} grunt --force --verbose %elif %{_bindir}/echo "Tests disabled..." %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE-MIT %{nodejs_sitelib}/%{packagename} %changelog * Thu Jul 28 2016 Jared Smith - 1.0.0-1 - Update to upstream 1.0.0 release * Thu Feb 4 2016 Jared Smith - 0.8.2-1 - Initial packaging