nodejs-bindings/nodejs-bindings.spec

42 lines
1.4 KiB
RPMSpec
Raw Permalink Normal View History

2020-08-20 20:33:10 +08:00
%{?nodejs_find_provides_and_requires}
2020-08-20 17:38:14 +08:00
Name: nodejs-bindings
Version: 1.3.0
Release: 1
Summary: Helper module for loading your native module's .node file
License: MIT
URL: https://github.com/TooTallNate/node-bindings
Source0: https://registry.npmjs.org/bindings/-/bindings-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%description
This is a helper module for authors of Node.js native addon modules.
It is basically the "swiss army knife" of require()ing your native module's
.node file.
Throughout the course of Node's native addon history, addons have ended up
being compiled in a variety of different places, depending on which build tool
and which version of node was used. To make matters worse, now the gyp build
tool can produce either a Release or Debug build, each being built into
different locations.
This module checks all the possible locations that a native addon would be
built at, and returns the first one that loads successfully.
%prep
%setup -q -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/bindings
cp -pr package.json bindings.js \
%{buildroot}%{nodejs_sitelib}/bindings
%nodejs_symlink_deps
%files
%doc README.md
%{nodejs_sitelib}/bindings
%changelog
2020-08-20 20:33:10 +08:00
* Thu Aug 20 2020 shaoqiang kang <kangshaoqiang1@huawei.com> - 1.3.0-1
2020-08-20 17:38:14 +08:00
- Package init