%{?nodejs_find_provides_and_requires} %global packagename qunitjs %global enable_tests 1 Name: nodejs-qunitjs Version: 1.23.1 Release: 2%{?dist} Summary: An easy-to-use JavaScript Unit Testing framework License: MIT URL: https://github.com/jquery/qunit.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. # Sources 1-3 are generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source2: src-%{version}.tar.bz2 Source3: build-%{version}.tar.bz2 Source10: dl-tests.sh # The Gruntfile is not included in the npm tarball. Source11: https://raw.githubusercontent.com/jquery/qunit/%{version}/Gruntfile.js ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(grunt-cli) %if 0%{?enable_tests} BuildRequires: npm(async) BuildRequires: npm(grunt) BuildRequires: npm(grunt-contrib-concat) BuildRequires: npm(grunt-contrib-watch) BuildRequires: npm(grunt-contrib-nodeunit) BuildRequires: npm(grunt-contrib-internal) BuildRequires: npm(load-grunt-tasks) BuildRequires: npm(underscore.string) %endif %description An easy-to-use JavaScript Unit Testing framework. %prep %setup -q -n package # setup the tests %setup -q -T -D -a 1 -n package %setup -q -T -D -a 2 -n package %setup -q -T -D -a 3 -n package # setup the Gruntfile cp -p %{SOURCE11} . # remove pre-compiled files rm qunit/* %build mkdir node_modules %nodejs_symlink_deps --build %{_bindir}/grunt build cp dist/qunit.js qunit/ rm -rf ./node_modules/ %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json qunit/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/grunt test-on-node %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE.txt %{nodejs_sitelib}/%{packagename} %changelog * Fri Feb 01 2019 Fedora Release Engineering - 1.23.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Jul 31 2018 Jared K. Smith - 1.23.1-1 - Update to upstream 1.23.1 release - Update license to only MIT, as src/diff.js is no longer present in src tarball * Fri Jul 13 2018 Fedora Release Engineering - 1.22.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Feb 08 2018 Fedora Release Engineering - 1.22.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.22.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 1.22.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Feb 24 2016 Jared Smith - 1.22.0-1 - Update to upstream 1.22.0 release * Mon Feb 22 2016 Jared Smith - 1.21.0-3 - Use macro to link to build requirements * Mon Feb 22 2016 Jared Smith - 1.21.0-2 - Fixes for licensing of src/diff.js - Remove pre-generated files, to ensure that we're building new ones - Don't include qunit.css, as it's not needed * Sat Feb 20 2016 Jared Smith - 1.21.0-1 - Update to upstream 1.21.0 release * Tue Jan 12 2016 Jared Smith - 1.20.0-1 - Update to upstream 1.20.0 release * Wed Oct 28 2015 Jared Smith - 1.19.0-2 - rebuilt * Tue Oct 20 2015 Jared Smith - 1.19.0-1 - Initial packaging