%global enable_tests 1 %global srcname relateurl Name: nodejs-%{srcname} Version: 0.2.5 Release: 3%{?dist} Summary: Minify URLs by converting them from absolute to relative License: MIT URL: https://github.com/stevenvachon/%{srcname} Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz # License in upstream but not yet in latest release Source1: https://raw.githubusercontent.com/stevenvachon/%{srcname}/master/LICENSE BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging BuildRequires: mocha BuildRequires: npm(chai) %description %{summary}. %prep %setup -q -n package rm -rf node_modules/ cp -p %{SOURCE1} . %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha test/ --bail --reporter spec --check-leaks %endif %files %doc README.md LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Tue Dec 16 2014 Piotr Popieluch - 0.2.5-3 - Added license from upstream * Sat Dec 6 2014 Piotr Popieluch - 0.2.5-2 - Removed Group tag - Added rm -rf node_modules/ - Replaced nodejs-chai with npm(chai) * Sun Nov 16 2014 Piotr Popieluch - 0.2.5-1 - Initial package