Blob Blame History Raw
%global enable_tests 0

Name:       nodejs-bytes
Version:    0.2.1
Release:    1%{?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

BuildRequires:  nodejs-devel

%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
ln -sf %{nodejs_sitelib} .
%{nodejs_sitelib}/mocha/bin/mocha --reporter spec --require should
%endif


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


%changelog
* 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