# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}
%global enable_tests 0
%global commit0 5b7c4d89b7e1d3f6e0ccd95a279f9dcab8640000
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%global barename grunt-contrib-connect
Name: nodejs-grunt-contrib-connect
Version: 0.11.2
Release: 2%{?dist}
Summary: Start a connect web server
License: MIT
URL: https://www.npmjs.org/package/grunt-contrib-connect
Source0: https://github.com/gruntjs/%{barename}/archive/%{commit0}.tar.gz#/%{barename}-%{shortcommit0}.tar.gz
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging >= 6
%if 0%{?enable_tests}
BuildRequires: npm(grunt-contrib-nodeunit)
BuildRequires: npm(grunt-contrib-jshint)
BuildRequires: npm(grunt-cli)
BuildRequires: npm(grunt)
BuildRequires: npm(grunt-contrib-internal)
%endif
%description
Start a connect web server.
%prep
%setup -qn %{barename}-%{commit0}
# Remove bundled node_modules if there are any..
rm -rf node_modules/
%nodejs_fixdep --caret
%nodejs_fixdep portscanner ~*
%nodejs_fixdep connect ~2.x
%nodejs_fixdep async ^1.5.0
%nodejs_fixdep serve-static '1.x'
%nodejs_fixdep serve-index '1.x'
%nodejs_fixdep morgan '1.x'
%nodejs_fixdep connect-livereload '0.x'
%build
%nodejs_symlink_deps --build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/grunt-contrib-connect
cp -pr package.json tasks \
%{buildroot}%{nodejs_sitelib}/grunt-contrib-connect
%nodejs_symlink_deps
%check
%if 0%{?enable_tests}
%nodejs_symlink_deps --check
grunt jshint test
%endif
%files
%doc AUTHORS CHANGELOG CONTRIBUTING.md README.md docs/
%license LICENSE-MIT
%{nodejs_sitelib}/grunt-contrib-connect/
%changelog
* Tue Dec 01 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.11.2-2
- Fxidep dependencies
* Mon Nov 30 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.11.2-1
- Update to new version
- Update specfile to newer guidelines
- Change Source to github because NPM lacks license
* Sun Nov 22 2015 Tom Hughes <tom@compton.nu> - 0.8.0-4
- Update npm(async) dependency
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Oct 23 2014 Ralph Bean <rbean@redhat.com> - 0.8.0-2
- Mark as noarch.
* Tue Jul 08 2014 Ralph Bean <rbean@redhat.com> - 0.8.0-1
- Initial packaging for Fedora.