%global enable_tests 0 %if 0%{?fedora} || 0%{?rhel} >= 7 %global installdir %{_jsdir}/deflate %else %global installdir %{_datadir}/javascript/deflate %endif Name: js-deflate Version: 0.2.3 Release: 1%{?dist} Summary: JavaScript library reimplementing DEFLATE Group: System Environment/Libraries License: GPLv2 and MIT URL: https://github.com/beatgammit/deflate-js Source0: http://registry.npmjs.org/deflate-js/-/deflate-js-%{version}.tgz BuildArch: noarch %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: web-assets-devel Requires: web-assets-filesystem %endif %if 0%{?enable_tests} BuildRequires: npm(buster) %endif %description Reimplementation of deflate compression/decompression in the browser and node. %prep %setup -q -n package %build # nothing to do %install mkdir -p %{buildroot}%{installdir} cp -p bin/*.js index.js %{buildroot}%{installdir} %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/buster-test %endif %files %doc LICENSE LICENSE.GPLv2 LICENSE.MIT README.md %doc examples/ %{installdir} %changelog * Thu Mar 20 2014 Zbigniew Jędrzejewski-Szmek - 0.2.3-1 - initial package