%{?scl:%scl_package nodejs-ms} %{!?scl:%global pkg_name %{name}} %{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: %{?scl_prefix}nodejs-ms Version: 0.7.1 Release: 2%{?dist} Summary: Tiny milliseconds conversion utility for Node.js License: MIT Group: System Environment/Libraries URL: https://github.com/guille/ms.js/ Source0: http://registry.npmjs.org/ms/-/ms-%{version}.tgz # The tests 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.ms.sh BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs010-runtime %if 0%{?enable_tests} BuildRequires: %{?scl_prefix}npm(expect.js) BuildRequires: %{?scl_prefix}npm(mocha) %endif %description This module is a tiny milliseconds conversion utility for Node.js. It does the following: - If a number is supplied to ms, a string with a unit is returned. - If a string that contains the number is supplied, it returns it as a number (e.g: it returns 100 for '100'). - If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned. %prep %setup -q -n package %setup -q -T -D -a 1 -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/ms cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/ms %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{nodejs_sitelib}/mocha/bin/mocha test/test.js %endif %files %doc History.md LICENSE README.md %{nodejs_sitelib}/ms %changelog * Tue Dec 01 2015 Tomas Hrcka - 0.7.1-2 - Enable scl macros * Thu Sep 10 2015 Troy Dawson - 0.7.1-1 - Update to 0.7.1 - Turn off tests until all dependencies are built * Fri Apr 18 2014 Jamie Nguyen - 0.6.2-1 - update to upstream release 0.6.2 * Sun Jul 28 2013 Jamie Nguyen - 0.6.1-2 - restrict to compatible arches * Sat May 25 2013 Jamie Nguyen - 0.6.1-1 - update to upstream release 0.6.1 * Sat Mar 16 2013 Jamie Nguyen - 0.6.0-1 - update to upstream release 0.6.0 - History.md is now not included in the npm tarball - tests are now not included in the npm tarball, so download separately * Fri Mar 15 2013 Jamie Nguyen - 0.5.1-1 - update to upstream release 0.5.1 * Fri Feb 22 2013 Jamie Nguyen - 0.5.0-2 - add a copy of the MIT license to comply with license requirements * Thu Feb 14 2013 Jamie Nguyen - 0.5.0-1 - initial package