50 lines
1.1 KiB
RPMSpec
50 lines
1.1 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global packagename os-homedir
|
|
%global enable_tests 0
|
|
Name: nodejs-os-homedir
|
|
Version: 1.0.1
|
|
Release: 1
|
|
Summary: An io.js 2.3.0 os.homedir() ponyfill
|
|
License: MIT
|
|
URL: https://github.com/sindresorhus/os-homedir
|
|
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
Source1: https://raw.githubusercontent.com/sindresorhus/os-homedir/v%{version}/test.js
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildArch: noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: ava
|
|
%endif
|
|
Requires: nodejs
|
|
%description
|
|
An io.js 2.3.0 os.homedir() ponyfill
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
cp -p %{SOURCE1} .
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
cp -pr package.json index.js \
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%{__nodejs} -e 'require("./")'
|
|
%__nodejs test.js
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md
|
|
%license license
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
%changelog
|
|
* Mon Aug 17 2020 wutao <wutao61@huawei.com> - 1.0.1-1
|
|
- Package init
|