%{?nodejs_find_provides_and_requires} %global packagename heap %global enable_tests 1 Name: nodejs-heap Version: 0.2.6 Release: 12%{?dist} Summary: Binary heap (priority queue) algorithms License: Python # license text is at bottom of README.md URL: https://github.com/qiao/heap.js.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: coffee-script BuildRequires: mocha BuildRequires: npm(should) %endif %description Binary heap (priority queue) algorithms (ported from Python's heapq module) %prep %setup -q -n package # remove pre-compiled version rm lib/heap.js %build %{_bindir}/coffee -c -b -o lib/ src/*.coffee %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %{_bindir}/coffee -c -b test/*.coffee %{_bindir}/mocha -r should -R spec %endif %files %{!?_licensedir:%global license %doc} %doc *.md %{nodejs_sitelib}/%{packagename} %changelog * Wed Jan 29 2020 Fedora Release Engineering - 0.2.6-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering - 0.2.6-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Feb 01 2019 Fedora Release Engineering - 0.2.6-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 0.2.6-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Feb 08 2018 Fedora Release Engineering - 0.2.6-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 0.2.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 0.2.6-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Feb 04 2016 Fedora Release Engineering - 0.2.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Nov 06 2015 Jared Smith - 0.2.6-4 - Fix missing lib/ directory * Fri Nov 06 2015 Jared Smith - 0.2.6-2 - Fix missing BuildRequires * Fri Nov 6 2015 Jared Smith - 0.2.6-1 - Initial packaging