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

%{?nodejs_find_provides_and_requires}

Summary:       A node.js driver for mysql
Name:          nodejs-%{npm_name}
Version:       2.0.1
Release:       1%{?dist}
Group:         Development/Languages
License:       MIT
URL:           http://github.com/felixge/node-mysql
Source0:       http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
BuildRequires: nodejs-devel
%if 0%{?enable_tests}
BuildRequires:  npm(underscore)
BuildRequires:  npm(urun)
BuildRequires:  npm(utest)
%endif
BuildArch:     noarch
ExclusiveArch: %{ix86} x86_64 %{arm} 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 index.js lib package.json 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 Feb 06 2014 Troy Dawson <tdawson@redhat.com> - 2.0.1-1
- Update to version 2.0.1
- add nodejs exclusive arch
- add macro to invoke dependency generator on EL6

* 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