%{?nodejs_find_provides_and_requires} %global packagename json-schema %global enable_tests 1 Name: nodejs-json-schema Version: 0.2.2 Release: 1%{?dist} Summary: JSON Schema validation and specifications License: BSD or AFL URL: http://github.com/kriszyp/json-schema Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # License file isn't included in this package. Developer points to upstream project # license as part of the Persevere project administered by the Dojo Foundation Source1: https://raw.githubusercontent.com/dojo/dojo/master/LICENSE ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(vows) %endif Requires: nodejs %description JSON Schema validation and specifications %prep %setup -q -n package cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.xml draft-00/ draft-01/ draft-02/ draft-03/ draft-04 lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check echo TESTS DISABLED IN UPSTREAM PACKAGE.JSON %{_bindir}/vows --spec test/*.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Thu Oct 29 2015 Jared Smith - 0.2.2-1 - Initial packaging