866d300
%{?nodejs_find_provides_and_requires}
866d300
4168068
%global enable_tests 1
8b68365
8b68365
Name:       nodejs-bytes
f7ab329
Version:    2.4.0
f7ab329
Release:    1%{?dist}
f7ab329
Summary:    Utility to parse a string bytes to bytes and vice-versa
8b68365
License:    MIT
8b68365
URL:        https://github.com/visionmedia/bytes.js
8b68365
Source0:    http://registry.npmjs.org/bytes/-/bytes-%{version}.tgz
8b68365
# The test files are not included in the npm tarball.
8b68365
# Source1 is generated by running Source10, which pulls from the upstream
8b68365
# version control repository.
8b68365
Source1:    tests-%{version}.tar.bz2
8b68365
Source10:   dl-tests.sh
98ea5c6
8b68365
BuildArch:  noarch
eca7ddf
%if 0%{?fedora} >= 19
98ea5c6
ExclusiveArch: %{nodejs_arches} noarch
eca7ddf
%else
eca7ddf
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
eca7ddf
%endif
8b68365
eca7ddf
BuildRequires:  nodejs-packaging
8b68365
8b68365
%if 0%{?enable_tests}
8b68365
BuildRequires:  npm(mocha)
8b68365
%endif
8b68365
8b68365
%description
8b68365
%summary
8b68365
8b68365
%prep
8b68365
%setup -q -n package
8b68365
%setup -T -D -a 1 -q -n package
8b68365
8b68365
%build
8b68365
#nothing to do
8b68365
8b68365
%install
8b68365
mkdir -p %{buildroot}%{nodejs_sitelib}/bytes
8b68365
cp -pr package.json index.js \
8b68365
    %{buildroot}%{nodejs_sitelib}/bytes
8b68365
8b68365
%nodejs_symlink_deps
8b68365
8b68365
8b68365
%if 0%{?enable_tests}
8b68365
%check
4168068
%nodejs_symlink_deps --check
f7ab329
%{nodejs_sitelib}/mocha/bin/mocha --check-leaks --reporter spec
8b68365
%endif
8b68365
8b68365
8b68365
%files
8b68365
%doc History.md Readme.md
f7ab329
%license LICENSE
8b68365
%{nodejs_sitelib}/bytes
8b68365
8b68365
8b68365
%changelog
f7ab329
* Thu Feb 09 2017 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.4.0-1
f7ab329
- Update, change %%summary
f7ab329
9093d83
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4
9093d83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9093d83
810f417
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
810f417
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
810f417
dd66130
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2
dd66130
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
dd66130
4168068
* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.0-1
4168068
- update to upstream release 0.3.0
4168068
0ef40b3
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-5
0ef40b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0ef40b3
eca7ddf
* Sat Jul 06 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-4
eca7ddf
- fix compatible arches for f18/el6
eca7ddf
98ea5c6
* Fri Jul 05 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-3
98ea5c6
- restrict to compatible arches
98ea5c6
T.C. Hollingsworth 6202eac
* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.2.1-2
T.C. Hollingsworth 6202eac
- rebuild for missing npm(bytes) provides
T.C. Hollingsworth 6202eac
6cd6cb7
* Sun Apr 07 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-1
6cd6cb7
- update to upstream release 0.2.1
6cd6cb7
8b68365
* Tue Feb 12 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-2
8b68365
- document how to retrieve tests
8b68365
8b68365
* Mon Feb 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-1
8b68365
- initial package