58 lines
1.0 KiB
RPMSpec
58 lines
1.0 KiB
RPMSpec
|
|
%global enable_tests 1
|
||
|
|
%global srcname util
|
||
|
|
|
||
|
|
Name: nodejs-%{srcname}
|
||
|
|
Version: 0.10.3
|
||
|
|
Release: 1
|
||
|
|
Summary: Node.JS util module
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/defunctzombie/node-util
|
||
|
|
Source0: http://registry.npmjs.org/util/-/util-%{version}.tgz
|
||
|
|
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(inherits)
|
||
|
|
%endif
|
||
|
|
|
||
|
|
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
rm -rf node_modules/
|
||
|
|
%nodejs_fixdep inherits '2.x'
|
||
|
|
|
||
|
|
|
||
|
|
%build
|
||
|
|
#nothing to do
|
||
|
|
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
|
||
|
|
cp -pr package.json util.js support/ %{buildroot}%{nodejs_sitelib}/%{srcname}
|
||
|
|
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
|
||
|
|
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
%{__nodejs} test/node/*.js
|
||
|
|
%endif
|
||
|
|
|
||
|
|
|
||
|
|
%files
|
||
|
|
%doc README.md LICENSE
|
||
|
|
%{nodejs_sitelib}/%{srcname}
|
||
|
|
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Wed Aug 12 2020 wangxiao <wangxiao65@huawei.com> - 0.10.3-1
|
||
|
|
- package init
|