49 lines
1.2 KiB
RPMSpec
49 lines
1.2 KiB
RPMSpec
|
|
%global enable_tests 1
|
||
|
|
%global srcname isstream
|
||
|
|
Name: nodejs-%{srcname}
|
||
|
|
Version: 0.1.2
|
||
|
|
Release: 1
|
||
|
|
Summary: Determine if an object is a Stream
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/rvagg/isstream
|
||
|
|
Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(tape) npm(core-util-is) npm(isarray) npm(string_decoder) npm(inherits)
|
||
|
|
BuildRequires: npm(readable-stream)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
rm -rf node_modules
|
||
|
|
%nodejs_fixdep --dev readable-stream
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
|
||
|
|
cp -pr package.json isstream.js \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/%{srcname}
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
ln -s ./node_modules/readable-stream readable-stream-1.0
|
||
|
|
ln -s ./node_modules/readable-stream readable-stream-1.1
|
||
|
|
node test.js
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%doc README.md
|
||
|
|
%license LICENSE.md
|
||
|
|
%{nodejs_sitelib}/%{srcname}
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Aug 20 2020 wangxiao <wangxiao65@huawei.com> - 0.1.2-1
|
||
|
|
- Package init
|