nodejs-sprintf-js/nodejs-sprintf-js.spec

56 lines
1.3 KiB
RPMSpec
Raw Permalink Normal View History

2020-08-21 14:56:54 +08:00
%{?nodejs_find_provides_and_requires}
%global packagename sprintf-js
%global enable_tests 1
Name: nodejs-sprintf-js
2023-11-02 14:32:22 +08:00
Version: 1.1.2
Release: 1
2020-08-21 14:56:54 +08:00
Summary: JavaScript sprintf implementation
2022-05-10 15:59:15 +08:00
License: BSD-3-Clause
2020-08-21 14:56:54 +08:00
URL: https://github.com/alexei/sprintf.js.git
2023-11-02 14:32:22 +08:00
Source0: https://github.com/alexei/sprintf.js/archive/%{version}.tar.gz
2020-08-21 14:56:54 +08:00
ExclusiveArch: %{nodejs_arches} noarch
BuildArch: noarch
2020-08-21 17:52:10 +08:00
BuildRequires: nodejs-packaging
2020-08-21 14:56:54 +08:00
%if 0%{?enable_tests}
2020-08-21 17:52:10 +08:00
BuildRequires: mocha
2020-08-21 14:56:54 +08:00
%endif
2020-08-21 17:52:10 +08:00
Requires: nodejs
2020-08-21 14:56:54 +08:00
%description
JavaScript sprintf implementation
%prep
2023-11-02 14:32:22 +08:00
%setup -q -n sprintf.js-%{version}
2020-08-21 14:56:54 +08:00
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
2023-11-02 14:32:22 +08:00
* Thu Nov 02 2023 wulei <wu_lei@hoperun.com> - 1.1.2-1
- Update to 1.1.2
2022-05-10 15:59:15 +08:00
* Tue May 10 2022 liyanan <liyanan32@h-partners.com> - 1.1.0-2
- License compliance rectification
2020-08-21 14:56:54 +08:00
* Fri Aug 21 2020 wangchong <wangchong56@huawei.com> - 1.1.0-1
- package init