!1 package init
From: @wang_yue111 Reviewed-by: @solarhu Signed-off-by: @solarhu
This commit is contained in:
commit
b819bab086
BIN
node-require-directory-cc71c23.tar.gz
Normal file
BIN
node-require-directory-cc71c23.tar.gz
Normal file
Binary file not shown.
49
nodejs-require-directory.spec
Normal file
49
nodejs-require-directory.spec
Normal file
@ -0,0 +1,49 @@
|
||||
%{?nodejs_find_provides_and_requires}
|
||||
%global enable_tests 1
|
||||
%global srcname require-directory
|
||||
%global commit0 cc71c23dd0c16cefd26855303c16ca1b9b50a36d
|
||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||
%global owner troygoode
|
||||
Name: nodejs-%{srcname}
|
||||
Version: 2.1.1
|
||||
Release: 1
|
||||
Summary: Recursively iterates over specified directory, require()'ing each file
|
||||
License: MIT
|
||||
URL: https://github.com/%{owner}/node-%{srcname}
|
||||
Source0: https://github.com/%{owner}/node-%{srcname}/archive/%{commit0}.tar.gz#/node-%{srcname}-%{shortcommit0}.tar.gz
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
BuildRequires: nodejs-packaging
|
||||
%if 0%{?enable_tests}
|
||||
BuildRequires: npm(mocha)
|
||||
%endif
|
||||
%description
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -qn node-%{srcname}-%{commit0}
|
||||
rm -rf node_modules
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
|
||||
cp -pr package.json *.js \
|
||||
%{buildroot}%{nodejs_sitelib}/%{srcname}
|
||||
%nodejs_symlink_deps
|
||||
%if 0%{?enable_tests}
|
||||
|
||||
%check
|
||||
%nodejs_symlink_deps --check
|
||||
mocha
|
||||
%endif
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %doc}
|
||||
%doc README.markdown
|
||||
%license LICENSE
|
||||
%{nodejs_sitelib}/%{srcname}
|
||||
|
||||
%changelog
|
||||
* Tue Aug 18 2020 wangyue <wangyue92@huawei.com> - 2.1.1-1
|
||||
- package init
|
||||
5
nodejs-require-directory.yaml
Normal file
5
nodejs-require-directory.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/troygoode/node-require-directory
|
||||
version_control: github
|
||||
src_repo: troygoode/node-require-directory
|
||||
tag_prefix: "^"
|
||||
seperator: ""
|
||||
Loading…
x
Reference in New Issue
Block a user