# We cannot currently build the browser version due to a dependency loop # npm(dryice) requires npm(uglify-js) which requres this %global bootstrap 1 Name: nodejs-source-map Version: 0.1.8 Release: 3%{?dist} Summary: Node.js library that generates and consumes source maps BuildArch: noarch Group: System Environment/Libraries License: BSD URL: https://github.com/mozilla/source-map Source0: http://registry.npmjs.org/source-map/-/source-map-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: nodejs-devel BuildRequires: npm(amdefine) %if !0%{?bootstrap} BuildRequires: npm(dryice) %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 Group: System Environment/Libraries %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 %setup -q -n package %build %if !0%{?bootstrap} #build the browser version %__nodejs Makefile.dryice.js %endif %install rm -rf %buildroot mkdir -p %{buildroot}%{nodejs_sitelib}/source-map cp -pr package.json 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 #FIXME: nodejs-symlink-deps will soon learn a --check argument so we don't # have to do this manually mkdir -p node_modules ln -sf %{nodejs_sitelib}/amdefine node_modules/amdefine %__nodejs test/run-tests.js %clean rm -rf %buildroot %files %defattr(-,root,root,-) %{nodejs_sitelib}/source-map %doc LICENSE README.md %if !0%{?bootstrap} %files -n source-map %defattr(-,root,root,-) %{_datadir}/%{name} %doc LICENSE README.md %endif %changelog * Sun Feb 10 2013 T.C. Hollingsworth - 0.1.8-3 - fix BuildRequires - link dependencies in %%check - add missing %%nodejs_symlink_deps * Fri Feb 08 2013 T.C. Hollingsworth - 0.1.8-2 - fix Name in main package * Fri Jan 18 2013 T.C. Hollingsworth - 0.1.8-1 - initial package generated by npm2rpm