!1 package init
From: @kang_xiao_qiang Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
438cbdec98
47
nodejs-caller-path.spec
Normal file
47
nodejs-caller-path.spec
Normal file
@ -0,0 +1,47 @@
|
||||
%global enable_tests 0
|
||||
%global module_name caller-path
|
||||
Name: nodejs-%{module_name}
|
||||
Version: 2.0.0
|
||||
Release: 1
|
||||
Summary: Get the path of the caller module
|
||||
License: MIT
|
||||
URL: https://github.com/sindresorhus/caller-path
|
||||
Source0: https://github.com/sindresorhus/caller-path/archive/v%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging
|
||||
%if 0%{?enable_tests}
|
||||
BuildRequires: npm(fixture) npm(mocha)
|
||||
%endif
|
||||
%description
|
||||
Get the path of the caller module. You can't use module.parent as modules are
|
||||
cached and it will return the first caller module, not necessarily the current
|
||||
one.
|
||||
|
||||
%prep
|
||||
%autosetup -n caller-path-%{version}
|
||||
rm -rf node_modules
|
||||
cp -p %{SOURCE0} .
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
|
||||
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
|
||||
%nodejs_symlink_deps
|
||||
%if 0%{?enable_tests}
|
||||
|
||||
%check
|
||||
%nodejs_symlink_deps --check
|
||||
%{__nodejs} -e 'require("./")'
|
||||
mocha
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc readme.md
|
||||
%license license
|
||||
%{nodejs_sitelib}/%{module_name}
|
||||
|
||||
%changelog
|
||||
* Mon Aug 17 2020 Shaoqiang Kang <kangshaoqiang1@huawei.com> - 2.0.0-1
|
||||
- Package init
|
||||
4
nodejs-caller-path.yaml
Normal file
4
nodejs-caller-path.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: sindresorhus/caller-path
|
||||
tag_prefix: "v"
|
||||
seperator: "."
|
||||
BIN
v2.0.0.tar.gz
Normal file
BIN
v2.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user