# needed for building on el6 %{?nodejs_find_provides_and_requires} # tests fail, they use deprecated functions and are disabled in upstream %global enable_tests 0 %global srcname json-schema %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global owner kriszyp Name: nodejs-%{srcname} Version: 0.2.2 Release: 1%{?dist} Summary: JSON Schema specifications, reference schemas, and a CommonJS implementation # license text requested https://github.com/kriszyp/json-schema/pull/61 # https://github.com/kriszyp/json-schema/issues/62 License: AFL or BSD and MIT URL: https://github.com/%{owner}/%{srcname} Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz Source1: https://raw.githubusercontent.com/dojo/dojo/master/LICENSE Source2: %{name}-LICENSE-MIT BuildArch: noarch %if 0%{?rhel} == 6 ExclusiveArch: %{ix86} x86_64 %{arm} noarch %else ExclusiveArch: %{nodejs_arches} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(vows) %endif %description %{summary}. %prep %setup -qn package rm -rf node_modules cp -p %{SOURCE1} . cp -p %{SOURCE2} ./LICENSE-MIT sed -i 's/\r$//' README.md %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json draft-* lib/ \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check vows --spec test/*.js %endif %files %{!?_licensedir:%global license %doc} %doc README.md %license LICENSE LICENSE-MIT %{nodejs_sitelib}/%{srcname} %changelog * Sun Dec 06 2015 Piotr Popieluch - 0.2.2-1 - Initial package