Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

# 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.33
Release:        1%{?dist}
Summary:        Node.js library that generates and consumes source maps

BuildArch:      noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

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-packaging
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
%nodejs_symlink_deps --check
%__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
* Thu Mar 13 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.33-1
- update to upstream release 0.1.33

* Tue Jul 30 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.27-1
- update to upstream release 0.1.27
- restrict to compatible arches

* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.1.22-1
- new upstream release 0.1.22

* Mon Apr 15 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.1.8-4
- add macro to enable dependency generation on EPEL6

* Sun Feb 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.1.8-3
- fix BuildRequires
- link dependencies in %%check
- add missing %%nodejs_symlink_deps

* Fri Feb 08 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.1.8-2
- fix Name in main package

* Fri Jan 18 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.1.8-1
- initial package generated by npm2rpm