%global enable_tests 0 %if 0%{?fedora} || 0%{?rhel} >= 7 %global installdir %{_jsdir}/crc32 %else %global installdir %{_datadir}/javascript/crc32 %endif Name: js-crc32 Version: 0.2.2 Release: 1%{?dist} Summary: JavaScript library reimplementing CRC 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} || 0%{?rhel} >= 7 BuildRequires: web-assets-devel Requires: web-assets-filesystem %endif %if 0%{?enable_tests} BuildRequires: npm(buster) %endif %description CRC means 'Cyclic Redundancy Check' and is a way to checksum data. It is a simple algorithm based on polynomials and is used in such projects as gzip. This module only works with UTF-8 strings, and is meant to be able to work on node and in the browser. %prep %setup -q -n package %build # nothing to do %install mkdir -p %{buildroot}%{installdir} cp -p lib/*.js bin/*.js %{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.2.2-1 - initial package