Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global packagename delegates
%global enable_tests 1

Name:		nodejs-delegates
Version:	1.0.0
Release:	1%{?dist}
Summary:	Delegate methods and accessors to another property

License:	MIT
URL:		https://github.com/visionmedia/node-delegates.git
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz

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:	mocha
BuildRequires:	npm(should)
%endif

%description
Delegate methods and accessors to another property


%prep
%setup -q -n package


%build
# nothing to do!

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

%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%{_bindir}/mocha -R spec --require should
%endif


%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license License
%{nodejs_sitelib}/%{packagename}



%changelog
* Wed Dec 16 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.0-1
- Initial packaging