%global enable_tests 0 %if 0%{?fedora} || 0%{?rhel} >= 7 %global installdir %{_jsdir}/gzip %else %global installdir %{_datadir}/javascript/gzip %endif Name: js-gzip Version: 0.3.2 Release: 1%{?dist} Summary: JavaScript library reimplementing GZIP Group: System Environment/Libraries License: MIT URL: https://github.com/beatgammit/gzip-js Source0: http://registry.npmjs.org/gzip-js/-/gzip-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 gzip-js is a pure JavaScript implementation of the GZIP file format. It uses the DEFLATE algorithm for compressing data. %prep %setup -q -n package %build # nothing to do %install mkdir -p %{buildroot}%{installdir} cp -ap lib/ bin/ %{buildroot}%{installdir} %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/buster-test %endif %files %doc LICENSE.MIT README.md %{installdir} %changelog * Thu Mar 20 2014 Zbigniew Jędrzejewski-Szmek - 0.3.2-1 - initial package