47 lines
1.1 KiB
RPMSpec
47 lines
1.1 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global packagename path-is-absolute
|
|
%global enable_tests 0
|
|
Name: nodejs-path-is-absolute
|
|
Version: 1.0.0
|
|
Release: 1
|
|
Summary: Node.js 0.12 path.isAbsolute() ponyfill
|
|
License: MIT
|
|
URL: https://github.com/sindresorhus/path-is-absolute
|
|
Source0: https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-%{version}.tgz
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildArch: noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: mocha
|
|
%endif
|
|
Requires: nodejs
|
|
%description
|
|
Node.js 0.12 path.isAbsolute() ponyfill
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
cp -pr package.json *.js \
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
/usr/bin/mocha -R spec
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md
|
|
%license license
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
%changelog
|
|
* Thu Aug 13 2020 wangyue <wangyue92@huawei.com> - 1.0.0-1
|
|
- package init
|