diff --git a/nodejs-source-map.spec b/nodejs-source-map.spec new file mode 100644 index 0000000..0adf3be --- /dev/null +++ b/nodejs-source-map.spec @@ -0,0 +1,65 @@ +%{?nodejs_find_provides_and_requires} +%global bootstrap 1 +Name: nodejs-source-map +Version: 0.5.6 +Release: 1 +Summary: Node.js library that generates and consumes source maps +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +License: BSD +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 +* Wed Aug 12 2020 zhanghua - 0.5.6-1 +- package init diff --git a/nodejs-source-map.yaml b/nodejs-source-map.yaml new file mode 100644 index 0000000..b6406f3 --- /dev/null +++ b/nodejs-source-map.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: mozilla/source-map +tag_pattern: "^" +seperator: "." diff --git a/source-map-0.5.6.tar.gz b/source-map-0.5.6.tar.gz new file mode 100644 index 0000000..cc255fa Binary files /dev/null and b/source-map-0.5.6.tar.gz differ