Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-gaze
Version:    0.5.1
Release:    4%{?dist}
Summary:    A globbing fs.watch wrapper built from parts of other watch libraries
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/shama/gaze
Source0:    http://registry.npmjs.org/gaze/-/gaze-%{version}.tgz
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:    tests-%{version}.tar.bz2
Source2:    https://raw.githubusercontent.com/shama/gaze/dad5345a2876346fe49a68ee6e4db34205680798/Gruntfile.js
Source10:   dl-tests.sh

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

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(async)
BuildRequires:  npm(globule)
BuildRequires:  npm(grunt)
BuildRequires:  npm(grunt-cli)
BuildRequires:  npm(grunt-contrib-nodeunit)
BuildRequires:  npm(nodeunit)
BuildRequires:  npm(rimraf)
%endif

%description
This Node.js module provides a globbing fs.watch wrapper built from the best
parts of other fine watch libraries: speedy data behavior from chokidar, the
API interface from watch, and file globbing using glob.


%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
cp -p %{SOURCE2} .

%nodejs_fixdep globule '~0.1'


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/gaze
cp -pr package.json lib/ \
    %{buildroot}%{nodejs_sitelib}/gaze

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/grunt nodeunit -v
%endif


%files
%doc LICENSE-MIT README.md
%{nodejs_sitelib}/gaze


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

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Mar 30 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.5.1-2
- fix versioned dependency on npm(globule)

* Sat Mar 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.5.1-1
- update to upstream release 0.5.1
- enable tests

* Mon Aug 26 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.1-1
- update to upstream release 0.4.1

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Jul 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.4-2
- restrict to compatible arches

* Sat May 25 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.4-1
- update to upstream release 0.3.4

* Sat Mar 09 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.3-2
- shorten the %%summary

* Sun Feb 17 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.3-1
- initial package