%{?nodejs_find_provides_and_requires} %global packagename sentiment # Tests disabled, as they depend on npm(jshint), which is under a non-free # license -- see https://github.com/jshint/jshint/issues/1234 %global enable_tests 1 Name: nodejs-sentiment Version: 4.0.1 Release: 1%{?dist} Summary: AFINN-based sentiment analysis for Node.js License: MIT URL: https://github.com/thisandagain/sentiment Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: build-%{version}.tar.bz2 Source2: tests-%{version}.tar.bz2 Source10: dl-tests.sh ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(async) %if 0%{?enable_tests} BuildRequires: npm(tap) %endif %description AFINN-based sentiment analysis for Node.js %prep %autosetup -n package %autosetup -T -D -a 1 -n package %autosetup -T -D -a 2 -n package %build %nodejs_symlink_deps --build make rm -rf node_modules/ %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/tap ./test/{unit,integration}/*.js %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc %license %{nodejs_sitelib}/%{packagename} %changelog * Mon Sep 25 2017 Jared Smith - 4.0.1-1 - Update to upstream 4.0.1 release * Mon Dec 19 2016 Jared Smith - 2.1.0-1 - Initial packaging