Blob Blame History Raw
%global npm_name mysql
# Although there are tests
# the dependancies aren't in Fedora yet
%global enable_tests 0

Summary:       A node.js driver for mysql
Name:          nodejs-%{npm_name}
Version:       2.0.0
Release:       alpha9.2%{?dist}
Group:         Development/Languages
License:       MIT
URL:           http://github.com/felixge/node-mysql
# Alpha 9 is marked as stable, but cannot be part of the version
# Be sure to change this version when updating to something higher
Source0:       http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-2.0.0-alpha9.tgz
BuildRequires: nodejs-devel
%if 0%{?enable_tests}
BuildRequires:  npm(underscore)
BuildRequires:  npm(urun)
BuildRequires:  npm(utest)
%endif
BuildArch:     noarch

%description
This is a node.js driver for mysql.
It is written in JavaScript, does not require compiling, 
and is 100% MIT licensed.

%prep
%setup -q -n package
%nodejs_fixdep bignumber.js '>=1.0.1'
%nodejs_fixdep require-all '>=0.0.3'

%build
#nothing to do

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pr benchmark index.js lib Makefile package.json test tool %{buildroot}%{nodejs_sitelib}/%{npm_name}

%if 0%{?enable_tests}
%check
make test
%endif

%files
%doc Changes.md License Readme.md
%{nodejs_sitelib}/%{npm_name}

%changelog
* Thu Oct 10 2013 Troy Dawson <tdawson@redhat.com> - 2.0.0-alpha9.2
- Fix require-all dependancy to work with version in Fedora

* Thu Oct 03 2013 Troy Dawson <tdawson@redhat.com> - 2.0.0-alpha9.1
- Updated to version 2.0.0-alpha9

* Tue May 21 2013 Troy Dawson <tdawson@redhat.com> - 2.0.0-alpha8.1
- Initial build