%global modulename opener %global npmlib_dir %{npmlib_sitelib} %global nodejs_dir %{nodejs_sitelib} %define __requires_exclude_from ^%{npmlib_dir}/%{modulename}/%{version}/tests?/.* Name: npmlib-opener Version: 1.5.1 Release: 2%{?dist} Summary: Opens stuff, like webpages and files and executables, cross-platform License: (WTFPL or MIT) URL: https://github.com/domenic/opener#readme Source0: https://registry.npmjs.org/opener/-/opener-1.5.1.tgz BuildRequires: npmlib-packaging BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch Requires: npmlib(%{modulename}) = %{version} %description Opens stuff, like webpages and files and executables, cross-platform %package 1.5.1 Summary: Opens stuff, like webpages and files and executables, cross-platform %description 1.5.1 Opens stuff, like webpages and files and executables, cross-platform %prep %autosetup -p0 -n package %build # Nothing to build %install mkdir -p %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr bin %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr lib %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr package.json %{buildroot}%{npmlib_dir}/%{modulename}/%{version} mkdir -p %{buildroot}%{_bindir} chmod +x %{buildroot}%{npmlib_dir}/%{modulename}/%{version}/bin/opener-bin.js ln -s %{npmlib_dir}/%{modulename}/%{version}/bin/opener-bin.js %{buildroot}/%{_bindir}/opener mkdir -p %{buildroot}%{nodejs_dir} ln -s %{npmlib_dir}/%{modulename}/%{version} %{buildroot}/%{nodejs_dir}/%{modulename} %{npmlib_symlink_deps} %check %{npmlib_symlink_deps} . %{__nodejs} -e 'require("./")' %files %doc LICENSE.txt %doc README.md %{_bindir}/opener %{nodejs_dir}/%{modulename} %files 1.5.1 %doc LICENSE.txt %doc README.md %{npmlib_dir}/%{modulename}/%{version} %dir %{npmlib_dir}/%{modulename}/ %changelog * Thu Dec 6 2018 npm2srpm - 1.5.1-2 - Package automatically generated by npm2srpm