47 lines
1.1 KiB
RPMSpec
47 lines
1.1 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global bootstrap 0
|
||
|
|
Name: nodejs-optimist
|
||
|
|
Version: 0.6.1
|
||
|
|
Release: 1
|
||
|
|
Summary: Light-weight option parsing for Node.js
|
||
|
|
BuildArch: noarch
|
||
|
|
License: MIT/X11
|
||
|
|
URL: https://github.com/substack/node-optimist
|
||
|
|
Source0: https://registry.npmjs.org/optimist/-/optimist-%{version}.tgz
|
||
|
|
Patch0: fix-tests.patch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if !0%{?bootstrap}
|
||
|
|
BuildRequires: npm(tap) npm(hashish) npm(wordwrap)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
Light-weight option parsing with an argv hash. No optstrings attached.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
%patch0 -p0
|
||
|
|
%nodejs_fixdep wordwrap
|
||
|
|
%nodejs_fixdep minimist
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/optimist
|
||
|
|
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/optimist
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
%{__nodejs} -e 'require("./")'
|
||
|
|
%if !0%{?bootstrap}
|
||
|
|
tap test/*.js
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%{nodejs_sitelib}/optimist
|
||
|
|
%doc readme.markdown example
|
||
|
|
%license LICENSE
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Mon Aug 17 2020 wutao <wutao61@huawei.com> - 0.6.1-1
|
||
|
|
- Package init
|