2020-08-21 10:31:37 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global packagename replace-require-self
|
2020-09-07 17:04:21 +08:00
|
|
|
Name: nodejs-replace-require-self
|
|
|
|
|
Version: 1.1.1
|
|
|
|
|
Release: 1
|
|
|
|
|
Summary: Require($THIS_PACKAGE) -> require('./')
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/kemitchell/replace-require-self.js.git
|
|
|
|
|
Source0: https://github.com/kemitchell/replace-require-self.js/archive/v%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
2020-08-21 10:31:37 +08:00
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
2020-09-07 17:04:21 +08:00
|
|
|
BuildRequires: nodejs-packaging npm(stream-replace)
|
2020-08-21 10:31:37 +08:00
|
|
|
%description
|
|
|
|
|
Require($THIS_PACKAGE) -> require('./')
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-09-07 17:04:21 +08:00
|
|
|
%autosetup -n replace-require-self.js-%{version}
|
2020-08-21 10:31:37 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
cp -pr package.json *.js \
|
2020-09-07 17:04:21 +08:00
|
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
2020-08-21 10:31:37 +08:00
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
ln -sf %{nodejs_sitelib}/%{packagename}/cli.js \
|
|
|
|
|
%{buildroot}%{_bindir}/replace-require-self
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
%{_bindir}/replace-require-self
|
|
|
|
|
|
|
|
|
|
%changelog
|
2020-09-07 17:04:21 +08:00
|
|
|
* Mon Sep 7 2020 wangchong <wangchong56@huawei.com> - 1.1.1-1
|
2020-08-21 10:31:37 +08:00
|
|
|
- package init
|