50 lines
1.3 KiB
RPMSpec
50 lines
1.3 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
%global srcname require-directory
|
|
%global commit0 cc71c23dd0c16cefd26855303c16ca1b9b50a36d
|
|
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
|
%global owner troygoode
|
|
Name: nodejs-%{srcname}
|
|
Version: 2.1.1
|
|
Release: 1
|
|
Summary: Recursively iterates over specified directory, require()'ing each file
|
|
License: MIT
|
|
URL: https://github.com/%{owner}/node-%{srcname}
|
|
Source0: https://github.com/%{owner}/node-%{srcname}/archive/%{commit0}.tar.gz#/node-%{srcname}-%{shortcommit0}.tar.gz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(mocha)
|
|
%endif
|
|
%description
|
|
%{summary}.
|
|
|
|
%prep
|
|
%setup -qn node-%{srcname}-%{commit0}
|
|
rm -rf node_modules
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
|
|
cp -pr package.json *.js \
|
|
%{buildroot}%{nodejs_sitelib}/%{srcname}
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
mocha
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc README.markdown
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/%{srcname}
|
|
|
|
%changelog
|
|
* Tue Aug 18 2020 wangyue <wangyue92@huawei.com> - 2.1.1-1
|
|
- package init
|