%{?nodejs_find_provides_and_requires} %global packagename optjs %global enable_tests 1 Name: nodejs-optjs Version: 3.2.2 Release: 1%{?dist} Summary: Probably the sole command line option parser you'll ever need License: MIT URL: https://github.com/dcodeIO/opt.js Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # License requested at https://github.com/dcodeIO/opt.js/issues/1 Source1: LICENSE-MIT.txt BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} # nothing %endif %description Probably the sole command line option parser you'll ever need to... %prep %setup -q -n package # setup the license file cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json opt.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{__nodejs} test.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE-MIT.txt %{nodejs_sitelib}/%{packagename} %changelog * Fri Jul 08 2016 Jared Smith - 3.2.2-1 - Update to upstream 3.2.2 release - Changle license to reflect upstream change to MIT license * Mon Nov 16 2015 Jared Smith - 3.2.1-1 - Initial packaging