a88dfe2
# This macro is needed at the start for building on EL6
a88dfe2
%{?nodejs_find_provides_and_requires}
a88dfe2
a88dfe2
%global enable_tests 0
a88dfe2
a88dfe2
%global barename open
a88dfe2
a88dfe2
Name:               nodejs-open
a88dfe2
Version:            0.0.5
1847dc1
Release:            4%{?dist}
a88dfe2
Summary:            Open a file or url in the user's preferred application
a88dfe2
a88dfe2
Group:              Development/Libraries
a88dfe2
License:            MIT
a88dfe2
URL:                https://www.npmjs.org/package/open
a88dfe2
Source0:            http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz
a88dfe2
BuildArch:          noarch
a88dfe2
a88dfe2
%if 0%{?fedora} >= 19
a88dfe2
ExclusiveArch:      %{nodejs_arches} noarch
a88dfe2
%else
a88dfe2
ExclusiveArch:      %{ix86} x86_64 %{arm} noarch
a88dfe2
%endif
a88dfe2
a88dfe2
BuildRequires:      nodejs-packaging >= 6
a88dfe2
a88dfe2
%if 0%{?enable_tests}
a88dfe2
BuildRequires:      npm(mocha)
a88dfe2
%endif
a88dfe2
a88dfe2
a88dfe2
%description
a88dfe2
Open a file or url in the user's preferred application.
a88dfe2
a88dfe2
%prep
a88dfe2
%setup -q -n package
a88dfe2
a88dfe2
# Remove bundled node_modules if there are any..
a88dfe2
rm -rf node_modules/
a88dfe2
a88dfe2
%nodejs_fixdep --caret
a88dfe2
a88dfe2
%build
a88dfe2
%nodejs_symlink_deps --build
a88dfe2
a88dfe2
%install
a88dfe2
mkdir -p %{buildroot}%{nodejs_sitelib}/open
a88dfe2
cp -pr package.json lib \
a88dfe2
    %{buildroot}%{nodejs_sitelib}/open
a88dfe2
a88dfe2
%nodejs_symlink_deps
a88dfe2
a88dfe2
%check
a88dfe2
%if 0%{?enable_tests}
a88dfe2
%nodejs_symlink_deps --check
a88dfe2
node_modules/mocha/bin/mocha
a88dfe2
%endif
a88dfe2
a88dfe2
%files
a88dfe2
%doc README.md LICENSE
a88dfe2
%{nodejs_sitelib}/open/
a88dfe2
a88dfe2
%changelog
1847dc1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-4
1847dc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1847dc1
d7017f9
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0.5-3
d7017f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d7017f9
a88dfe2
* Mon Jul 21 2014 Ralph Bean <rbean@redhat.com> - 0.0.5-2
a88dfe2
- Specify noarch.
a88dfe2
a88dfe2
* Tue Jul 08 2014 Ralph Bean <rbean@redhat.com> - 0.0.5-1
a88dfe2
- Initial packaging for Fedora.