%global modulename needle %global npmlib_dir %{npmlib_sitelib} %global nodejs_dir %{nodejs_sitelib} %define __requires_exclude_from ^%{npmlib_dir}/%{modulename}/%{version}/tests?/.* Name: npmlib-needle Version: 2.2.4 Release: 1%{?dist} Summary: The leanest and most handsome HTTP client in the Nodelands. License: MIT URL: https://github.com/tomas/needle#readme Source0: https://registry.npmjs.org/needle/-/needle-2.2.4.tgz BuildRequires: npmlib-packaging BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: ((npmlib(debug) >= 2.1.2 with npmlib(debug) < 3.0.0)) BuildRequires: ((npmlib(iconv-lite) >= 0.4.4 with npmlib(iconv-lite) < 0.5.0)) BuildRequires: ((npmlib(sax) >= 1.2.4 with npmlib(sax) < 2.0.0)) Requires: npmlib(%{modulename}) = %{version} %description The leanest and most handsome HTTP client in the Nodelands. %package 2.2.4 Summary: The leanest and most handsome HTTP client in the Nodelands. %description 2.2.4 The leanest and most handsome HTTP client in the Nodelands. %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 examples %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr lib %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr note.xml %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr note.xml.1 %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr package.json %{buildroot}%{npmlib_dir}/%{modulename}/%{version} cp -pr test %{buildroot}%{npmlib_dir}/%{modulename}/%{version} mkdir -p %{buildroot}%{_bindir} chmod +x %{buildroot}%{npmlib_dir}/%{modulename}/%{version}/bin/needle ln -s %{npmlib_dir}/%{modulename}/%{version}/bin/needle %{buildroot}/%{_bindir}/needle 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 README.md %doc license.txt %{_bindir}/needle %{nodejs_dir}/%{modulename} %files 2.2.4 %doc README.md %doc license.txt %{npmlib_dir}/%{modulename}/%{version} %dir %{npmlib_dir}/%{modulename}/ %changelog * Wed Dec 5 2018 npm2srpm - 2.2.4-1 - Package automatically generated by npm2srpm