package init

This commit is contained in:
wangchong1995924 2020-08-21 14:56:54 +08:00
parent 4bba9d8c45
commit d83d6afabe
3 changed files with 53 additions and 0 deletions

49
nodejs-sprintf-js.spec Normal file
View File

@ -0,0 +1,49 @@
%{?nodejs_find_provides_and_requires}
%global packagename sprintf-js
%global enable_tests 1
Name: nodejs-sprintf-js
Version: 1.1.0
Release: 1
Summary: JavaScript sprintf implementation
License: BSD
URL: https://github.com/alexei/sprintf.js.git
Source0: https://registry.npmjs.org/sprintf-js/-/sprintf-js-%{version}.tgz
ExclusiveArch: %{nodejs_arches} noarch
BuildArch: noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: mocha
%endif
Requires: nodejs
%description
JavaScript sprintf implementation
%prep
%setup -q -n package
rm -rf dist/
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr *.json src/ \
%{buildroot}%{nodejs_sitelib}/%{packagename}
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%if 0%{?enable_tests}
/usr/bin/mocha -R spec
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif
%files
%{!?_licensedir:%global license %doc}
%doc *.md demo/
%license LICENSE
%{nodejs_sitelib}/%{packagename}
%changelog
* Fri Aug 21 2020 wangchong <wangchong56@huawei.com> - 1.1.0-1
- package init

4
nodejs-sprintf-js.yaml Normal file
View File

@ -0,0 +1,4 @@
version-control: github
src_repo: alexei/sprintf.js
tag_prefix: ^v
seperator: .

BIN
sprintf-js-1.1.0.tgz Normal file

Binary file not shown.