62 lines
1.8 KiB
RPMSpec
62 lines
1.8 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 0
|
||
|
|
Name: nodejs-tiny-lr-fork
|
||
|
|
Version: 0.0.5
|
||
|
|
Release: 1
|
||
|
|
Summary: A tiny LiveReload server implementation you can spawn in the background
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/shama/tiny-lr
|
||
|
|
Source0: https://registry.npmjs.org/tiny-lr-fork/-/tiny-lr-fork-%{version}.tgz
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(connect) npm(debug) npm(express) npm(faye-websocket) npm(mocha)
|
||
|
|
BuildRequires: npm(noptify) npm(qs) npm(request) npm(supertest)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
%nodejs_fixdep faye-websocket '~0.7'
|
||
|
|
%nodejs_fixdep qs '^6.0.2'
|
||
|
|
%nodejs_fixdep noptify '~0.0.3'
|
||
|
|
%nodejs_fixdep debug '^2.2.0'
|
||
|
|
|
||
|
|
%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 readme.md
|
||
|
|
%license LICENSE-MIT
|
||
|
|
%{nodejs_sitelib}/tiny-lr-fork
|
||
|
|
%{_bindir}/tiny-lr
|
||
|
|
%{_bindir}/update-livereload
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Wed Aug 12 2020 wutao <wutao61@huawei.com> - 0.0.5-1
|
||
|
|
- package init
|