%global modulename form-data

%global npmlib_dir %{npmlib_sitelib}
%global nodejs_dir %{nodejs_sitelib}

%define __requires_exclude_from ^%{npmlib_dir}/%{modulename}/%{version}/tests?/.*

Name:           npmlib-form-data
Version:        2.3.3
Release:        1%{?dist}
Summary:        A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.

License:        MIT
URL:            https://github.com/form-data/form-data#readme
Source0:        https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz


BuildRequires:  npmlib-packaging

BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  ((npmlib(asynckit) >= 0.4.0 with npmlib(asynckit) < 0.5.0))
BuildRequires:  ((npmlib(combined-stream) >= 1.0.6 with npmlib(combined-stream) < 2.0.0))
BuildRequires:  ((npmlib(mime-types) >= 2.1.12 with npmlib(mime-types) < 3.0.0))

Requires:       npmlib(%{modulename}) = %{version}

%description
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.

%package 2.3.3
Summary:        A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.


%description 2.3.3
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.

%prep
%autosetup -p0 -n package

%build
# Nothing to build

%install
mkdir -p %{buildroot}%{npmlib_dir}/%{modulename}/%{version}
cp -pr lib %{buildroot}%{npmlib_dir}/%{modulename}/%{version}
cp -pr package.json %{buildroot}%{npmlib_dir}/%{modulename}/%{version}
cp -pr yarn.lock %{buildroot}%{npmlib_dir}/%{modulename}/%{version}



mkdir -p %{buildroot}%{nodejs_dir}
ln -s %{npmlib_dir}/%{modulename}/%{version} %{buildroot}/%{nodejs_dir}/%{modulename}

%{npmlib_symlink_deps}

%check
rm -rf node_modules && %{npmlib_symlink_deps} .
%{__nodejs} -e 'require("./")'

%files
%doc README.md
%doc README.md.bak
%license License
%{nodejs_dir}/%{modulename}

%files 2.3.3
%doc README.md
%doc README.md.bak
%license License
%{npmlib_dir}/%{modulename}/%{version}
%dir %{npmlib_dir}/%{modulename}/

%changelog
* Fri Nov 16 2018 npm2srpm <dshea@redhat.com> - 2.3.3-1
- Package automatically generated by npm2srpm