%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-ms Version: 0.7.1 Release: %mkrel 2 Summary: Tiny milliseconds conversion utility for Node.js License: MIT Group: System/Libraries URL: https://github.com/guille/ms.js/ Source0: https://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.sh # Upstream have been informed about missing LICENSE file: # https://github.com/guille/ms.js/issues/21 Source20: LICENSE BuildArch: noarch %if 0%{?fedora} >= 19 %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(expect.js) BuildRequires: 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 cp -p %{SOURCE20} . %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 README.md %license LICENSE %{nodejs_sitelib}/ms %changelog * Wed Sep 19 2018 umeabot <umeabot> 0.7.1-2.mga7 (not released yet) + Revision: 1265025 - Mageia 7 Mass Rebuild * Sun May 22 2016 tv <tv> 0.7.1-1.mga6 + Revision: 1017773 - disable testuite for boostrapping - imported package nodejs-ms * Sun May 22 2016 Thierry Vignaud <tv@mageia.org> 0.7.1-1.mga6 - import from FC * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 24 2015 Tom Hughes <tom@compton.nu> - 0.7.1-1 - update to 0.7.1 upstream release * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Apr 18 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.6.2-1 - update to upstream release 0.6.2 * Sun Jul 28 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.6.1-2 - restrict to compatible arches * Sat May 25 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.6.1-1 - update to upstream release 0.6.1 * Sat Mar 16 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 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 <jamielinux@fedoraproject.org> - 0.5.1-1 - update to upstream release 0.5.1 * Fri Feb 22 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.5.0-2 - add a copy of the MIT license to comply with license requirements * Thu Feb 14 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.5.0-1 - initial package