%{?nodejs_find_provides_and_requires} %global enable_tests 0 %if 0%{?fedora} || 0%{?rhel} >= 7 %global installdir %{_jsdir}/deflate %else %global installdir %{_datadir}/javascript/deflate %endif Name: nodejs-deflate-js Version: 0.2.3 Release: 1%{?dist} Summary: JavaScript library reimplementing DEFLATE, made available for Node.js Group: System Environment/Libraries License: GPLv2 URL: https://github.com/beatgammit/deflate-js Source0: http://registry.npmjs.org/deflate-js/-/deflate-js-%{version}.tgz BuildArch: noarch %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: web-assets-devel Requires: web-assets-filesystem %endif %if 0%{?enable_tests} BuildRequires: npm(buster) %endif Requires: js-deflate = %{version} %description %{summary}. %prep %setup -q -n package # dependency seems to be missing from package.json %nodejs_fixdep optimist '~0.2' %build # nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/deflate-js cp -pr package.json \ %{buildroot}%{nodejs_sitelib}/deflate-js # link to file provided by js-deflate package mkdir -p %{buildroot}%{nodejs_sitelib}/deflate-js/bin ln -sf %{installdir}/index.js \ %{buildroot}%{nodejs_sitelib}/deflate-js/ ln -sf %{installdir}/{deflate,inflate}.js \ %{buildroot}%{nodejs_sitelib}/deflate-js/bin/ %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/buster-test %endif %files %doc LICENSE LICENSE.GPLv2 README.md %{nodejs_sitelib}/deflate-js %changelog * Thu Mar 20 2014 Zbigniew Jędrzejewski-Szmek - 0.2.3-1 - initial package