Blame SPECS/nodejs-ms.spec

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