Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:       nodejs-defined
Version:    0.0.0
Release:    1%{?dist}
Summary:    Return the first argument that is '!== undefined'
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/substack/defined
Source0:    http://registry.npmjs.org/defined/-/defined-%{version}.tgz
BuildArch:  noarch

BuildRequires:  nodejs-devel

%if 0%{?enable_tests}
BuildRequires:  npm(tap)
BuildRequires:  npm(tape)
%endif

%description
%{summary}.


%prep
%setup -q -n package


%build
#nothing to do


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

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
ln -sf %{nodejs_sitelib} .
%tap test/*.js
%endif


%files
%doc LICENSE readme.markdown example/
%{nodejs_sitelib}/defined


%changelog
* Mon May 27 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.0-1
- initial package