nodejs-source-map/nodejs-source-map.spec

69 lines
1.9 KiB
RPMSpec
Raw Permalink Normal View History

2020-08-20 10:17:31 +08:00
%{?nodejs_find_provides_and_requires}
%global bootstrap 1
Name: nodejs-source-map
Version: 0.5.6
2022-05-09 19:55:29 +08:00
Release: 2
2020-08-20 10:17:31 +08:00
Summary: Node.js library that generates and consumes source maps
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
2022-05-09 19:55:29 +08:00
License: BSD-3-Clause
2020-08-20 10:17:31 +08:00
URL: https://github.com/mozilla/source-map
Source0: https://github.com/mozilla/source-map/archive/%{version}/source-map-%{version}.tar.gz
BuildRequires: nodejs-packaging
%if !0%{?bootstrap}
BuildRequires: npm(webpack)
%endif
%description
A Node.js library that generates and consumes source maps,
A version suitable for use in the browser is available in the source-map
package.
%if !0%{?bootstrap}
%package -n source-map
Summary: Client-side library that generates and consumes source maps
%description -n source-map
A client-side library that generates and source maps. It is suitable for use
in browsers and is provided in original and minified form.
The Node.js library is available in the nodejs-source-map package.
%endif
%prep
%autosetup -n source-map-%{version}
%build
%if !0%{?bootstrap}
webpack --color
%endif
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/source-map
cp -pr package.json source-map.js lib %{buildroot}%{nodejs_sitelib}/source-map
%if !0%{?bootstrap}
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -p dist/*.js %{buildroot}%{_datadir}/%{name}/
%endif
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%__nodejs test/run-tests.js
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/source-map
%if !0%{?bootstrap}
%files -n source-map
%{_datadir}/%{name}
%doc README.md
%license LICENSE
%endif
%changelog
2022-05-09 19:55:29 +08:00
* Mon May 9 2022 liyanan <liyanan32@h-partners.com> - 0.5.6-2
- License compliance rectification
2020-08-20 10:17:31 +08:00
* Wed Aug 12 2020 zhanghua <zhanghua40@huawei.com> - 0.5.6-1
- package init