nodejs-jsonify/nodejs-jsonify.spec

45 lines
1.1 KiB
RPMSpec
Raw Normal View History

2020-08-24 16:29:10 +08:00
%{?nodejs_find_provides_and_requires}
%global enable_tests 0
Name: nodejs-jsonify
Version: 0.0.0
Release: 1
Summary: JSON without touching any globals
License: Public Domain
URL: https://github.com/substack/jsonify
Source0: http://registry.npmjs.org/jsonify/-/jsonify-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(garbage) npm(tap)
%endif
%description
This module provides Douglas Crockford's JSON implementation without
modifying any globals. 'stringify' and 'parse' are merely exported
without respect to whether or not a global JSON object exists.
%prep
%setup -q -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/jsonify
cp -pr package.json index.js lib/ \
%{buildroot}%{nodejs_sitelib}/jsonify
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%tap test
%endif
%files
%doc README.markdown
%{nodejs_sitelib}/jsonify
%changelog
* Mon Aug 17 2020 wutao <wutao61@huawei.com> - 0.0.0-1
- Package init