44 lines
1.1 KiB
RPMSpec
44 lines
1.1 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 1
|
||
|
|
Name: nodejs-package
|
||
|
|
Version: 1.0.1
|
||
|
|
Release: 1
|
||
|
|
Summary: Provides an easy way to export package.json data
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/vesln/package
|
||
|
|
Source0: http://registry.npmjs.org/package/-/package-%{version}.tgz
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(mocha) npm(should)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/package
|
||
|
|
cp -pr package.json lib/ \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/package
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
NODE_ENV=test %{nodejs_sitelib}/mocha/bin/mocha -R spec --require should \
|
||
|
|
$(find test -iname '*.test.js')
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%doc Readme.md examples/
|
||
|
|
%{nodejs_sitelib}/package
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Aug 20 2020 wangchong <wangchong56@huawei.com> - 1.0.1-1
|
||
|
|
- package init
|