%{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-bytes Version: 2.1.0 Release: 1%{?dist} Summary: Byte size string parser/serializer for Node.js # License text is included in Readme.md License: MIT Group: System Environment/Libraries URL: https://github.com/visionmedia/bytes.js Source0: http://registry.npmjs.org/bytes/-/bytes-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source10: dl-tests.sh 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: npm(mocha) BuildRequires: npm(should) BuildRequires: npm(grunt-cli) %endif %description %summary %prep %setup -q -n package %setup -T -D -a 1 -q -n package %nodejs_fixdep grunt %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/bytes cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/bytes %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{nodejs_sitelib}/mocha/bin/mocha --reporter spec --require should %endif %files %doc History.md Readme.md %{nodejs_sitelib}/bytes %changelog * Thu Oct 08 2015 Jared Smith - 2.1.0-1 - Update to upstream 2.1.0 release * Wed Jun 17 2015 Fedora Release Engineering - 0.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Apr 20 2014 Jamie Nguyen - 0.3.0-1 - update to upstream release 0.3.0 * Sat Aug 03 2013 Fedora Release Engineering - 0.2.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sat Jul 06 2013 Jamie Nguyen - 0.2.1-4 - fix compatible arches for f18/el6 * Fri Jul 05 2013 Jamie Nguyen - 0.2.1-3 - restrict to compatible arches * Wed Jun 19 2013 T.C. Hollingsworth - 0.2.1-2 - rebuild for missing npm(bytes) provides * Sun Apr 07 2013 Jamie Nguyen - 0.2.1-1 - update to upstream release 0.2.1 * Tue Feb 12 2013 Jamie Nguyen - 0.2.0-2 - document how to retrieve tests * Mon Feb 11 2013 Jamie Nguyen - 0.2.0-1 - initial package