package init
This commit is contained in:
parent
f86a3d82d1
commit
9694016872
53
nodejs-rechoir.spec
Normal file
53
nodejs-rechoir.spec
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global packagename rechoir
|
||||||
|
%global enable_tests 0
|
||||||
|
Name: nodejs-rechoir
|
||||||
|
Version: 0.6.2
|
||||||
|
Release: 1
|
||||||
|
Summary: Require any supported file as a node module
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/tkellen/node-rechoir
|
||||||
|
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
||||||
|
#git clone tps://github.com/tkellen/node-rechoir
|
||||||
|
#cd node-rechoir
|
||||||
|
#git archive --prefix='test/' --format=tar v%{version}:test/ | bzip2 > tests-%{version}.tar.bz2
|
||||||
|
Source1: tests-%{version}.tar.bz2
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: nodejs-packaging npm(resolve)
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: mocha npm(require-uncached)
|
||||||
|
%endif
|
||||||
|
%description
|
||||||
|
Require any supported file as a node module.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n package
|
||||||
|
%autosetup -T -D -a 1 -n package
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
||||||
|
cp -pr package.json *.js lib/ \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{__nodejs} -e 'require("./")'
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
NODE_ENV=test %{_bindir}/mocha -R spec
|
||||||
|
%else
|
||||||
|
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{!?_licensedir:%global license %doc}
|
||||||
|
%doc *.md CHANGELOG
|
||||||
|
%license LICENSE
|
||||||
|
%{nodejs_sitelib}/%{packagename}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Aug 22 2020 wangyue <wangyue92@huawei.com> - 0.6.2-1
|
||||||
|
- package init
|
||||||
5
nodejs-rechoir.yaml
Normal file
5
nodejs-rechoir.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
git_url: https://github.com/tkellen/node-rechoir
|
||||||
|
version_control: github
|
||||||
|
src_repo: tkellen/node-rechoir
|
||||||
|
tag_prefix: "^"
|
||||||
|
seperator: "."
|
||||||
BIN
rechoir-0.6.2.tgz
Normal file
BIN
rechoir-0.6.2.tgz
Normal file
Binary file not shown.
BIN
tests-0.6.2.tar.bz2
Normal file
BIN
tests-0.6.2.tar.bz2
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user