!1 package init
From: @wang_yue111 Reviewed-by: @solarhu Signed-off-by: @solarhu
This commit is contained in:
commit
2df1e76ae0
50
nodejs-resolve-pkg.spec
Normal file
50
nodejs-resolve-pkg.spec
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global packagename resolve-pkg
|
||||||
|
%global enable_tests 0
|
||||||
|
Name: nodejs-resolve-pkg
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Resolve the path of a package regardless of it having an entry
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/sindresorhus/resolve-pkg
|
||||||
|
Source0: https://github.com/sindresorhus/resolve-pkg/archive/v%{version}.tar.gz
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: nodejs-packaging npm(resolve-from)
|
||||||
|
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(ava)
|
||||||
|
%endif
|
||||||
|
%description
|
||||||
|
Resolve the path of a package regardless of it having an entry
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n resolve-pkg-%{version}
|
||||||
|
%nodejs_fixdep resolve-from
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
||||||
|
cp -pr package.json index.js \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{__nodejs} -e 'require("./")'
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
%{_bindir}/ava
|
||||||
|
%else
|
||||||
|
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{!?_licensedir:%global license %doc}
|
||||||
|
%doc *.md
|
||||||
|
%license license
|
||||||
|
%{nodejs_sitelib}/%{packagename}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Aug 19 2020 wangyue <wangyue92@huawei.com> - 1.0.0-1
|
||||||
|
- package init
|
||||||
5
nodejs-resolve-pkg.yaml
Normal file
5
nodejs-resolve-pkg.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
git_url: https://github.com/sindresorhus/resolve-pkg
|
||||||
|
version_control: github
|
||||||
|
src_repo: sindresorhus/resolve-pkg
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
BIN
v1.0.0.tar.gz
Normal file
BIN
v1.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user