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