# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
%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: 8%{?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)
# Disable jshint testing
#BuildRequires: npm(grunt-contrib-jshint)
BuildRequires: npm(grunt-cli)
BuildRequires: npm(grunt)
BuildRequires: npm(opn)
BuildRequires: npm(portscanner)
BuildRequires: npm(connect)
BuildRequires: npm(connect-livereload)
BuildRequires: npm(serve-static)
BuildRequires: npm(grunt-contrib-internal)
%endif
%description
Start a connect web server.
%prep
%setup -qn %{barename}-%{commit0}
# remove missing dep in Gruntfile for tests
sed -i "s/'jshint', //" Gruntfile.js
# 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'
%nodejs_fixdep opn '3.x'
%build
# Nothing to 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 test --force
%endif
%files
%doc AUTHORS CHANGELOG CONTRIBUTING.md README.md docs/
%license LICENSE-MIT
%{nodejs_sitelib}/grunt-contrib-connect/
%changelog
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Dec 03 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.11.2-3
- Fixdep nodejs-opn
- Enable tests
* 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.