1 |
%{?nodejs_find_provides_and_requires} |
2 |
|
3 |
# sometimes you might need to disable tests to get it to build since tap |
4 |
# depends on this. enabling tast require a lot of deps. |
5 |
%global enable_tests 0 |
6 |
|
7 |
Name: nodejs-minimist |
8 |
Version: 1.2.7 |
9 |
Release: %mkrel 1 |
10 |
Summary: Parse argument options in Node.js |
11 |
|
12 |
Group: System/Libraries |
13 |
License: MIT |
14 |
URL: https://github.com/minimistjs/minimist |
15 |
Source0: https://github.com/minimistjs/minimist/archive/refs/tags/v%{version}.tar.gz |
16 |
BuildRequires: nodejs-packaging |
17 |
|
18 |
%if 0%{?enable_tests} |
19 |
BuildRequires: npm(tap) |
20 |
BuildRequires: npm(tape) |
21 |
%endif |
22 |
BuildArch: noarch |
23 |
|
24 |
|
25 |
%description |
26 |
This module is the guts of nodejs-optimist's argument parser without all the |
27 |
fanciful decoration. |
28 |
|
29 |
%prep |
30 |
%setup -q -n minimist-%version |
31 |
|
32 |
%build |
33 |
#nothing to do |
34 |
|
35 |
%install |
36 |
mkdir -p %{buildroot}%{nodejs_sitelib}/minimist |
37 |
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/minimist |
38 |
|
39 |
%check |
40 |
%if 0%{?enable_tests} |
41 |
%nodejs_symlink_deps --check |
42 |
%tap test/*.js |
43 |
%endif |
44 |
|
45 |
|
46 |
%files |
47 |
%{nodejs_sitelib}/minimist |
48 |
%doc LICENSE README.md example |
49 |
|