Blob Blame History Raw
%global modname normalize-path

%if ! ( 0%{?fedora} || 0%{?rhel} >= 7 )
%{?nodejs_find_provides_and_requires}
%global nodejs_arches %{ix86} x86_64 %{arm}
%endif

Name:           nodejs-%{modname}
Version:        2.0.0
Release:        2%{?dist}
Summary:        Nodejs library for normalizing filesystem paths
License:        MIT
URL:            https://github.com/jonschlinkert/normalize-path
# Upstream does not want to include tests in the npm tarballs, 
# so we use a Github snapshot instead.
# https://github.com/jonschlinkert/normalize-path/issues/2#issuecomment-72331596
#Source0:        http://registry.npmjs.org/%{modname}/-/%{modname}-%{version}.tgz
%global commit defaa4b483a56e8ee93539b74e9de4df59a2a172
Source0:        https://github.com/jonschlinkert/%{modname}/archive/%{commit}/%{modname}-%{version}.tar.gz
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch
BuildRequires:  nodejs-packaging
BuildRequires:  mocha
BuildRequires:  npm(minimist)
BuildRequires:  npm(should)
BuildRequires:  /usr/bin/npm

%description
Normalize file path slashes to be unix-like forward slashes, regardless of OS 
(since in reality Windows doesn't care about slash direction anyway). Also 
condenses repeat slashes to a single slash and removes and trailing slashes.

%prep
%setup -q -n %{modname}-%{commit}

%build
# nothing to do

%check
%nodejs_symlink_deps --check
npm test

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{modname}
cp -pr package.json index.js \
    %{buildroot}%{nodejs_sitelib}/%{modname}/

%files
%doc README.md LICENSE
%{nodejs_sitelib}/%{modname}

%changelog
* Wed Nov 04 2015 Dan Callaghan <dcallagh@redhat.com> - 2.0.0-2
- added missing BR on minimist

* Wed Nov 04 2015 Dan Callaghan <dcallagh@redhat.com> - 2.0.0-1
- upstream release 2.0.0

* Tue Sep 01 2015 Dan Callaghan <dcallagh@redhat.com> - 1.0.0-1
- upstream release 1.0.0: paths are no longer forced to lower case

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Nov 12 2014 Dan Callaghan <dcallagh@redhat.com> - 0.3.0-1
- upstream release 0.3.0

* Sun Oct 12 2014 Dan Callaghan <dcallagh@redhat.com> - 0.1.1-1
- initial version