Jared K. Smith 9d9cadb
%{?nodejs_find_provides_and_requires}
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%global packagename delegates
Jared K. Smith 9d9cadb
%global enable_tests 1
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
Name:		nodejs-delegates
Jared K. Smith 9d9cadb
Version:	1.0.0
Jared K. Smith 9d9cadb
Release:	1%{?dist}
Jared K. Smith 9d9cadb
Summary:	Delegate methods and accessors to another property
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
License:	MIT
Jared K. Smith 9d9cadb
URL:		https://github.com/visionmedia/node-delegates.git
Jared K. Smith 9d9cadb
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
BuildArch:	noarch
Jared K. Smith 9d9cadb
%if 0%{?fedora} >= 19
Jared K. Smith 9d9cadb
ExclusiveArch: %{nodejs_arches} noarch
Jared K. Smith 9d9cadb
%else
Jared K. Smith 9d9cadb
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Jared K. Smith 9d9cadb
%endif
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
BuildRequires:	nodejs-packaging
Jared K. Smith 9d9cadb
%if 0%{?enable_tests}
Jared K. Smith 9d9cadb
BuildRequires:	mocha
Jared K. Smith 9d9cadb
BuildRequires:	npm(should)
Jared K. Smith 9d9cadb
%endif
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%description
Jared K. Smith 9d9cadb
Delegate methods and accessors to another property
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%prep
Jared K. Smith 9d9cadb
%setup -q -n package
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%build
Jared K. Smith 9d9cadb
# nothing to do!
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%install
Jared K. Smith 9d9cadb
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 9d9cadb
cp -pr package.json *.js \
Jared K. Smith 9d9cadb
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%nodejs_symlink_deps
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%if 0%{?enable_tests}
Jared K. Smith 9d9cadb
%check
Jared K. Smith 9d9cadb
%nodejs_symlink_deps --check
Jared K. Smith 9d9cadb
%{__nodejs} -e 'require("./")'
Jared K. Smith 9d9cadb
%{_bindir}/mocha -R spec --require should
Jared K. Smith 9d9cadb
%endif
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%files
Jared K. Smith 9d9cadb
%{!?_licensedir:%global license %doc}
Jared K. Smith 9d9cadb
%doc *.md
Jared K. Smith 9d9cadb
%license License
Jared K. Smith 9d9cadb
%{nodejs_sitelib}/%{packagename}
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
Jared K. Smith 9d9cadb
%changelog
Jared K. Smith 9d9cadb
* Wed Dec 16 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.0-1
Jared K. Smith 9d9cadb
- Initial packaging