%{?nodejs_find_provides_and_requires} %global packagename freeboard %global enable_tests 1 Name: nodejs-freeboard Version: 1.1.0 Release: 1%{?dist} Summary: A real-time dashboard builder for IOT and other web mashups License: MIT Group: System Environment/Libraries URL: https://github.com/Freeboard/freeboard Source0: https://github.com/Freeboard/freeboard/archive/v%{version}.tar.gz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: web-assets-devel Requires: web-assets-filesystem %if 0%{?enable_tests} BuildRequires: npm(grunt-contrib-concat) BuildRequires: npm(grunt-contrib-cssmin) BuildRequires: npm(grunt-contrib-uglify) BuildRequires: npm(grunt-contrib-watch) BuildRequires: npm(grunt-string-replace) %endif %description An open source, real-time dashboard builder for IOT and other web mashups %prep %setup -q -n %{packagename}-%{version} %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/freeboard cp -pr package.json lib/ plugins/ \ %{buildroot}%{nodejs_sitelib}/freeboard mkdir -p %{buildroot}%{_webassetdir}/freeboard cp -pr css/ img/ js/ *.html \ %{buildroot}%{_webassetdir}/freeboard %nodejs_symlink_deps %check %nodejs_symlink_deps --check %if 0%{?enable_tests} %{_bindir}/grunt %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc LICENSE README.md %{nodejs_sitelib}/freeboard %{_webassetdir}/freeboard %changelog * Sat Jul 2 2016 Jared Smith - 1.10.0-1 - Initial packaging