%{?nodejs_find_provides_and_requires} %global enable_tests 0 %if 0%{?fedora} || 0%{?rhel} >= 7 %global installdir %{_jsdir}/crc32 %else %global installdir %{_datadir}/javascript/crc32 %endif Name: nodejs-crc32 Version: 0.2.2 Release: 1%{?dist} Summary: JavaScript library reimplementing CRC32, made available for Node.js Group: System Environment/Libraries License: MIT URL: https://github.com/beatgammit/crc32 Source0: http://registry.npmjs.org/crc32/-/crc32-%{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-crc32 = %{version} %description %{summary}. %prep %setup -q -n package %build # nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/crc32 cp -pr package.json \ %{buildroot}%{nodejs_sitelib}/crc32 # link to file provided by js-crc32 package mkdir -p %{buildroot}%{nodejs_sitelib}/crc32/lib ln -sf %{installdir}/crc32.js \ %{buildroot}%{nodejs_sitelib}/crc32/lib/ %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check /usr/bin/buster-test %endif %files %doc LICENSE.MIT README.md %{nodejs_sitelib}/crc32 %changelog * Thu Mar 20 2014 Zbigniew Jędrzejewski-Szmek - 0.2.2-1 - initial package