nodejs-wordwrap/nodejs-wordwrap.spec

49 lines
1.3 KiB
RPMSpec
Raw Normal View History

2020-08-21 17:38:13 +08:00
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-wordwrap
2023-11-02 17:37:03 +08:00
Version: 1.2.5
2020-08-21 17:38:13 +08:00
Release: 1
Summary: Word wrapping library for node
License: MIT
2023-11-02 17:37:03 +08:00
URL: https://github.com/jonschlinkert/word-wrap
Source0: https://github.com/jonschlinkert/word-wrap/archive/%{version}/word-wrap-%{version}.tar.gz
2020-08-21 17:38:13 +08:00
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(tape)
%endif
%description
Wrap those words. Show them at what columns to start and stop.
%prep
2023-11-02 17:37:03 +08:00
%autosetup -n word-wrap-%{version} -p1
2020-08-21 17:38:13 +08:00
%build
%install
2023-11-02 17:37:03 +08:00
mkdir -p %{buildroot}%{nodejs_sitelib}/word-wrap
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/word-wrap
2020-08-21 17:38:13 +08:00
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
2023-11-02 17:37:03 +08:00
ln -sf .. node_modules/word-wrap
2020-08-21 17:38:13 +08:00
%{_bindir}/tape test/*.js
%endif
%files
%{!?_licensedir:%global license %doc}
2023-11-02 17:37:03 +08:00
%doc README.md
2020-08-21 17:38:13 +08:00
%license LICENSE
2023-11-02 17:37:03 +08:00
%{nodejs_sitelib}/word-wrap
2020-08-21 17:38:13 +08:00
%changelog
2023-11-02 17:37:03 +08:00
* Thu Nov 02 2023 yaoxin <yao_xin001@hoperun.com> - 1.2.5-1
- Upgrade to 1.2.5
2020-08-21 17:38:13 +08:00
* Thu Aug 20 2020 zhanghua <zhanghua40@huawei.com> - 1.0.0-1
- Package init