%{?nodejs_find_provides_and_requires} %global packagename rx-lite %global enable_tests 1 Name: nodejs-rx-lite Version: 4.0.8 Release: 1%{?dist} Summary: Lightweight library for composing asynchronous and event-based operations License: ASL 2.0 URL: https://github.com/Reactive-Extensions/RxJS.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. # Sources 1-4 are generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source2: src-%{version}.tar.bz2 Source3: docs-%{version}.tar.bz2 Source4: examples-%{version}.tar.bz2 Source5: modules-%{version}.tar.bz2 Source6: ts-%{version}.tar.bz2 Source10: dl-tests.sh # Gruntfile Source20: https://raw.githubusercontent.com/Reactive-Extensions/RxJS/v%{version}/Gruntfile.js # License Source21: https://raw.githubusercontent.com/Reactive-Extensions/RxJS/v%{version}/license.txt BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(grunt) BuildRequires: npm(grunt-cli) %if 0%{?enable_tests} %endif %description Lightweight library for composing asynchronous and event-based operations in JavaScript %prep %setup -q -n package # setup the tests, src, docs, examples, modules, ts %setup -q -T -D -a 1 -n package %setup -q -T -D -a 2 -n package %setup -q -T -D -a 3 -n package %setup -q -T -D -a 4 -n package %setup -q -T -D -a 5 -n package %setup -q -T -D -a 6 -n package # gruntfile cp -p %{SOURCE20} . # license cp -p %{SOURCE21} . %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %nodejs_fixdep grunt %nodejs_fixdep load-grunt-tasks %endif %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json rx.lite.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/grunt rebuild-ts %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md doc/ examples/ %license license.txt %{nodejs_sitelib}/%{packagename} %changelog * Mon Feb 22 2016 Jared Smith - 4.0.8-1 - Update to upstream 4.0.8 release * Thu Feb 4 2016 Jared Smith - 4.0.7-1 - Initial packaging