45 lines
1.0 KiB
RPMSpec
45 lines
1.0 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 1
|
||
|
|
Name: nodejs-defined
|
||
|
|
Version: 1.0.0
|
||
|
|
Release: 1
|
||
|
|
Summary: Return the first argument that is '!== undefined'
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/substack/defined
|
||
|
|
Source0: http://registry.npmjs.org/defined/-/defined-%{version}.tgz
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(tap) npm(tape)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/defined
|
||
|
|
cp -pr package.json index.js \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/defined
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
|
||
|
|
%check
|
||
|
|
ln -sf %{nodejs_sitelib} .
|
||
|
|
%tap test/*.js
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%{!?_licensedir:%global license %doc}
|
||
|
|
%doc readme.markdown example/
|
||
|
|
%license LICENSE
|
||
|
|
%{nodejs_sitelib}/defined
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Tue Aug 18 2020 Anan Fu <fuanan3@huawei.com> - 1.0.0-1
|
||
|
|
- package init
|