49 lines
1.3 KiB
RPMSpec
49 lines
1.3 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
Name: nodejs-wordwrap
|
|
Version: 1.2.5
|
|
Release: 1
|
|
Summary: Word wrapping library for node
|
|
License: MIT
|
|
URL: https://github.com/jonschlinkert/word-wrap
|
|
Source0: https://github.com/jonschlinkert/word-wrap/archive/%{version}/word-wrap-%{version}.tar.gz
|
|
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
|
|
%autosetup -n word-wrap-%{version} -p1
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/word-wrap
|
|
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/word-wrap
|
|
%nodejs_symlink_deps
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%{__nodejs} -e 'require("./")'
|
|
%if 0%{?enable_tests}
|
|
ln -sf .. node_modules/word-wrap
|
|
%{_bindir}/tape test/*.js
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/word-wrap
|
|
|
|
%changelog
|
|
* Thu Nov 02 2023 yaoxin <yao_xin001@hoperun.com> - 1.2.5-1
|
|
- Upgrade to 1.2.5
|
|
|
|
* Thu Aug 20 2020 zhanghua <zhanghua40@huawei.com> - 1.0.0-1
|
|
- Package init
|