nodejs-ejs/nodejs-ejs.spec
2020-08-21 16:40:11 +08:00

46 lines
1.1 KiB
RPMSpec

%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-ejs
Version: 1.0.0
Release: 1
Summary: Embedded JavaScript templates for Node.js
License: MIT
URL: https://github.com/visionmedia/ejs
Source0: http://registry.npmjs.org/ejs/-/ejs-%{version}.tgz
Patch0: nodejs-ejs_fix-should-syntax.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(mocha) npm(should)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%patch0 -p1
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/ejs
cp -pr package.json ejs.js ejs.min.js index.js lib/ \
%{buildroot}%{nodejs_sitelib}/ejs
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha --require should --reporter spec
%endif
%files
%doc History.md Readme.md examples/
%{nodejs_sitelib}/ejs
%changelog
* Tue Aug 18 2020 Anan Fu <fuanan3@huawei.com> - 1.0.0-1
- package init