Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

# This is a fork of the original tiny-lr: <https://github.com/mklabs/tiny-lr>.
# The maintainer of the fork has stated that the fork is only temporary and
# will cease to exist once the maintainer of the original software springs
# back to life. The fork has gained favour among other modules, notably the
# Grunt project, so we will ship the fork with the intention of Obsoleting it
# once the original tiny-lr has been revived.

# Versions of connect and express used in the test suite are outdated.
%global enable_tests 0

Name:       nodejs-tiny-lr-fork
Version:    0.0.5
Release:    4%{?dist}
Summary:    A tiny LiveReload server implementation you can spawn in the background
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/shama/tiny-lr
Source0:    http://registry.npmjs.org/tiny-lr-fork/-/tiny-lr-fork-%{version}.tgz

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(connect)
BuildRequires:  npm(debug)
BuildRequires:  npm(express)
BuildRequires:  npm(faye-websocket)
BuildRequires:  npm(mocha)
BuildRequires:  npm(noptify)
BuildRequires:  npm(qs)
BuildRequires:  npm(request)
BuildRequires:  npm(supertest)
%endif

%description
%{summary}.


%prep
%setup -q -n package

%nodejs_fixdep faye-websocket '~0.7'
%nodejs_fixdep qs '~0.6.6'
%nodejs_fixdep noptify '~0.0.3'
%nodejs_fixdep debug '~0.7'


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/tiny-lr-fork
cp -pr package.json lib/ tasks/ \
    %{buildroot}%{nodejs_sitelib}/tiny-lr-fork

mkdir -p %{buildroot}%{nodejs_sitelib}/tiny-lr-fork/bin
install -p -m755 bin/tiny-lr \
    %{buildroot}%{nodejs_sitelib}/tiny-lr-fork/bin/tiny-lr
install -p -m755 bin/update-livereload \
    %{buildroot}%{nodejs_sitelib}/tiny-lr-fork/bin/update-livereload

mkdir -p %{buildroot}%{_bindir}
ln -sf %{nodejs_sitelib}/tiny-lr-fork/bin/tiny-lr \
    %{buildroot}%{_bindir}/tiny-lr
ln -sf %{nodejs_sitelib}/tiny-lr-fork/bin/update-livereload \
    %{buildroot}%{_bindir}/update-livereload

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/mocha --reporter spec
%endif


%files
%doc LICENSE-MIT readme.md
%{nodejs_sitelib}/tiny-lr-fork
%{_bindir}/tiny-lr
%{_bindir}/update-livereload


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

* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.5-3
- fix versioned dependencies

* Sun Mar 30 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.5-2
- symlink to _bindir

* Sat Mar 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.5-1
- initial package