Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-bytes
Version:    0.3.0
Release:    2%{?dist}
Summary:    Byte size string parser/serializer for Node.js
# License text is included in Readme.md
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/visionmedia/bytes.js
Source0:    http://registry.npmjs.org/bytes/-/bytes-%{version}.tgz
# The test files are not included in the npm tarball.
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:    tests-%{version}.tar.bz2
Source10:   dl-tests.sh

BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
BuildRequires:  npm(should)
%endif

%description
%summary


%prep
%setup -q -n package
%setup -T -D -a 1 -q -n package


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/bytes
cp -pr package.json index.js \
    %{buildroot}%{nodejs_sitelib}/bytes

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha --reporter spec --require should
%endif


%files
%doc History.md Readme.md
%{nodejs_sitelib}/bytes


%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.0-1
- update to upstream release 0.3.0

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jul 06 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-4
- fix compatible arches for f18/el6

* Fri Jul 05 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-3
- restrict to compatible arches

* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.2.1-2
- rebuild for missing npm(bytes) provides

* Sun Apr 07 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-1
- update to upstream release 0.2.1

* Tue Feb 12 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-2
- document how to retrieve tests

* Mon Feb 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.0-1
- initial package