Project

General

Profile

Download (4.68 KB) Statistics
| Branch: | Tag: | Revision:
%global npm_name react-router-dom

Name: nodejs-%{npm_name}
Version: 4.3.1
Release: 2%{?dist}
Summary: DOM bindings for React Router
License: MIT
Group: Development/Libraries
URL: https://github.com/ReactTraining/react-router#readme
Source0: https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.3.1.tgz
Source1: https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz
Source2: https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz
Source3: https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz
Source4: https://registry.npmjs.org/warning/-/warning-4.0.1.tgz
Source5: https://registry.npmjs.org/history/-/history-4.7.2.tgz
Source6: https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz
Source7: https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz
Source8: https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz
Source9: https://registry.npmjs.org/value-equal/-/value-equal-0.4.0.tgz
Source10: https://registry.npmjs.org/warning/-/warning-3.0.0.tgz
Source11: https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz
Source12: https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz
Source13: https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz
Source14: https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz
Source15: %{npm_name}-%{version}-registry.npmjs.org.tgz
BuildRequires: nodejs-packaging
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch

Provides: npm(%{npm_name}) = %{version}
Provides: bundled(npm(history)) = 4.7.2
Provides: bundled(npm(hoist-non-react-statics)) = 2.5.5
Provides: bundled(npm(invariant)) = 2.2.4
Provides: bundled(npm(isarray)) = 0.0.1
Provides: bundled(npm(js-tokens)) = 3.0.2
Provides: bundled(npm(loose-envify)) = 1.3.1
Provides: bundled(npm(object-assign)) = 4.1.1
Provides: bundled(npm(path-to-regexp)) = 1.7.0
Provides: bundled(npm(prop-types)) = 15.6.2
Provides: bundled(npm(react-router)) = 4.3.1
Provides: bundled(npm(react-router-dom)) = 4.3.1
Provides: bundled(npm(resolve-pathname)) = 2.2.0
Provides: bundled(npm(value-equal)) = 0.4.0
Provides: bundled(npm(warning)) = 4.0.1
Provides: bundled(npm(warning)) = 3.0.0
AutoReq: no
AutoProv: no

%define npm_cache_dir /tmp/npm_cache_%{name}-%{version}-%{release}

%description
%{summary}

%prep
mkdir -p %{npm_cache_dir}
for tgz in %{sources}; do
echo $tgz | grep -q registry.npmjs.org || npm cache add --cache %{npm_cache_dir} $tgz
done
%setup -T -q -a 15 -D -n %{npm_cache_dir}

%build
npm install --cache-min Infinity --cache %{npm_cache_dir} --no-shrinkwrap --no-optional --global-style true %{npm_name}@%{version}

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/node_modules %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/BrowserRouter.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/HashRouter.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/Link.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/MemoryRouter.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/NavLink.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/Prompt.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/Redirect.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/Route.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/Router.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/StaticRouter.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/Switch.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/es %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/generatePath.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/index.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/matchPath.js %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/umd %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pfr node_modules/%{npm_name}/withRouter.js %{buildroot}%{nodejs_sitelib}/%{npm_name}

%clean
rm -rf %{buildroot} %{npm_cache_dir}

%files
%{nodejs_sitelib}/%{npm_name}
%doc node_modules/%{npm_name}/README.md

%changelog
* Wed Jun 27 2018 Tomer Brisker <tbrisker@gmail.com> 4.3.1-2
- Change to bundle strategy

* Thu Jun 07 2018 Eric D. Helms <ericdhelms@gmail.com> 4.3.1-1
- Update to 4.3.1

* Thu Apr 19 2018 Eric D. Helms <ericdhelms@gmail.com> 4.2.2-1
- Add nodejs-react-router-dom generated by npm2rpm using the single strategy

(7-7/17)