866d300
%{?nodejs_find_provides_and_requires}
866d300
8b68365
%global enable_tests 0
8b68365
8b68365
Name:       nodejs-bytes
6cd6cb7
Version:    0.2.1
eca7ddf
Release:    4%{?dist}
8b68365
Summary:    Byte size string parser/serializer for Node.js
8b68365
# License text is included in Readme.md
8b68365
License:    MIT
8b68365
Group:      System Environment/Libraries
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
BuildRequires:  npm(should)
8b68365
%endif
8b68365
8b68365
%description
8b68365
%summary
8b68365
8b68365
8b68365
%prep
8b68365
%setup -q -n package
8b68365
%setup -T -D -a 1 -q -n package
8b68365
8b68365
8b68365
%build
8b68365
#nothing to do
8b68365
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
6cd6cb7
ln -sf %{nodejs_sitelib} .
8b68365
%{nodejs_sitelib}/mocha/bin/mocha --reporter spec --require should
8b68365
%endif
8b68365
8b68365
8b68365
%files
8b68365
%doc History.md Readme.md
8b68365
%{nodejs_sitelib}/bytes
8b68365
8b68365
8b68365
%changelog
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