Blame SPECS/nodejs-ms.spec

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