85d242d
%{?nodejs_find_provides_and_requires}
85d242d
85d242d
%global enable_tests 1
85d242d
85d242d
Name:       nodejs-monocle
85d242d
Version:    1.1.51
a9256cc
Release:    3%{?dist}
85d242d
Summary:    A tool for watching directories for file changes
85d242d
License:    BSD
85d242d
Group:      System Environment/Libraries
85d242d
URL:        https://github.com/samccone/monocle
85d242d
Source0:    http://registry.npmjs.org/monocle/-/monocle-%{version}.tgz
85d242d
# The test files are not included in the npm tarball.
85d242d
# Source1 is generated by running Source10, which pulls from the upstream
85d242d
# version control repository.
85d242d
Source1:    tests-00ccc2a0454058f0cd1964d0703d8322f78af049.tar.bz2
85d242d
Source10:   dl-tests.sh
85d242d
85d242d
BuildArch:  noarch
85d242d
%if 0%{?fedora} >= 19
85d242d
ExclusiveArch: %{nodejs_arches} noarch
85d242d
%else
85d242d
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
85d242d
%endif
85d242d
85d242d
BuildRequires:  nodejs-packaging
85d242d
85d242d
%if 0%{?enable_tests}
c850a52
BuildRequires:  npm(mocha)
85d242d
BuildRequires:  npm(readdirp)
85d242d
%endif
85d242d
85d242d
%description
85d242d
%{summary}.
85d242d
85d242d
85d242d
%prep
85d242d
%setup -q -n package
85d242d
find . -type f -exec chmod -x '{}' \;
85d242d
%setup -q -T -D -a 1 -n package
85d242d
c850a52
%nodejs_fixdep readdirp '~0.3'
85d242d
85d242d
85d242d
%build
85d242d
#nothing to do
85d242d
85d242d
85d242d
%install
85d242d
mkdir -p %{buildroot}%{nodejs_sitelib}/monocle
85d242d
cp -pr package.json monocle.js \
85d242d
    %{buildroot}%{nodejs_sitelib}/monocle
85d242d
85d242d
%nodejs_symlink_deps
85d242d
85d242d
85d242d
%if 0%{?enable_tests}
85d242d
%check
85d242d
%nodejs_symlink_deps --check
85d242d
/usr/bin/mocha test -R spec -t 2000
85d242d
%endif
85d242d
85d242d
85d242d
%files
85d242d
%doc LICENSE README.md
85d242d
%{nodejs_sitelib}/monocle
85d242d
85d242d
85d242d
%changelog
a9256cc
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.51-3
a9256cc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a9256cc
c850a52
* Sat Apr 26 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.1.51-2
c850a52
- fix version of npm(readdirp) dependency
c850a52
85d242d
* Sun Mar 02 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.1.51-1
85d242d
- initial package