%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodeunit Version: 0.9.1 Release: 8%{?dist} Summary: Easy asynchronous unit testing framework for Node.js License: MIT Group: System Environment/Libraries URL: https://github.com/caolan/nodeunit Source0: https://registry.npmjs.org/nodeunit/-/nodeunit-%{version}.tgz Patch0: %{name}-0.8.6-Load-system-modules.patch Patch1: %{name}-0.8.6-Use-system-assert.js.patch Patch2: %{name}-0.9.1-Use-newer-should.patch Patch3: %{name}-0.9.1-Use-fs-stat.patch BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: coffee-script BuildRequires: expresso BuildRequires: npm(async) BuildRequires: npm(console.log) BuildRequires: npm(ejs) BuildRequires: npm(paperboy) BuildRequires: npm(should) BuildRequires: npm(tap) %endif %description Nodeunit provides an easy asynchronous unit testing framework for Node.js: - helps you avoid common pitfalls when testing asynchronous code - easy to add test cases with setUp and tearDown functions if you wish - flexible reporters for custom output - built-in support for HTML and jUnit XML - allows the use of mocks and stubs %prep %setup -q -n package # Remove bundled dependencies rm -rf deps/ rm -f lib/assert.js # The requires need to be amended to use the unbundled dependencies. %patch0 -p1 %patch1 -p1 # Fix some tests for changes in npm(should) %patch2 -p1 # Fix use of path.exists in tests %patch3 -p1 %nodejs_fixdep async '^1.5.0' %nodejs_fixdep console.log '~0.1' %nodejs_fixdep ejs '~1.0' %nodejs_fixdep tap %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/nodeunit cp -pr package.json index.js lib/ \ %{buildroot}%{nodejs_sitelib}/nodeunit install -p -D -m0755 bin/nodeunit \ %{buildroot}%{nodejs_sitelib}/nodeunit/bin/nodeunit mkdir -p %{buildroot}%{_bindir} ln -sf %{nodejs_sitelib}/nodeunit/bin/nodeunit \ %{buildroot}%{_bindir}/nodeunit install -p -D -m0644 man1/nodeunit.1 \ %{buildroot}%{_mandir}/man1/nodeunit.1 # Put non-javascript arch independent files in _datadir to comply with Node.js # packaging guidelines. mkdir -p %{buildroot}%{_datadir}/nodeunit/bin install -p -D -m0644 bin/nodeunit.json \ %{buildroot}%{_datadir}/nodeunit/bin/nodeunit.json cp -pr share/ %{buildroot}%{_datadir}/nodeunit mkdir -p %{buildroot}%{nodejs_sitelib}/nodeunit/bin ln -sf %{_datadir}/nodeunit/bin/nodeunit.json \ %{buildroot}%{nodejs_sitelib}/nodeunit/bin/nodeunit.json ln -sf %{_datadir}/nodeunit/share \ %{buildroot}%{nodejs_sitelib}/nodeunit/share %nodejs_symlink_deps %files %doc CONTRIBUTORS.md README.md doc/ examples/ %license LICENSE %{nodejs_sitelib}/nodeunit %{_bindir}/nodeunit %{_datadir}/nodeunit %{_mandir}/man1/nodeunit.1* %changelog * Thu Feb 08 2018 Fedora Release Engineering - 0.9.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.9.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.9.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Wed Jul 13 2016 Jared Smith - 0.9.1-5 - Update npm(tap) version * Thu Feb 04 2016 Fedora Release Engineering - 0.9.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jan 20 2016 Tom Hughes - 0.9.1-3 - Replace path.exists with fs.stat in tests * Sat Nov 21 2015 Tom Hughes - 0.9.1-2 - Update npm(tap) dependency * Sat Nov 21 2015 Tom Hughes - 0.9.1-1 - Update to 0.9.1 upstream release - Update npm(async) dependency - Fix tests for newer npm(should) * Wed Jun 17 2015 Fedora Release Engineering - 0.8.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.8.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Apr 19 2014 Jamie Nguyen - 0.8.6-4 - fix version of npm(ejs) dependency * Sun Mar 02 2014 Jamie Nguyen - 0.8.6-3 - fix broken symlink * Mon Feb 24 2014 Jamie Nguyen - 0.8.6-2 - disable test/test-httputil.js as it fails in Koji * Sun Feb 23 2014 Jamie Nguyen - 0.8.6-1 - update to upstream release 0.8.6 - remove lib/assert.js * Sun Feb 23 2014 Jamie Nguyen - 0.8.1-3 - fix summary and description - use patch instead of sed * Sun Feb 23 2014 Jamie Nguyen - 0.8.1-2 - remove nodejs-json2 dependency as it is not needed either for runtime or for the unit tests * Wed Aug 28 2013 Jamie Nguyen - 0.8.1-1 - update to upstream release 0.8.1 - remove patch that has been upstreamed - put non-javascript arch independent files in _datadir to comply with Node.js packaging guidelines * Wed May 29 2013 Jamie Nguyen - 0.8.0-1 - update to upstream release 0.8.0 * Sun Feb 17 2013 Jamie Nguyen - 0.7.4-1 - initial package