51 lines
1.1 KiB
RPMSpec
51 lines
1.1 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global packagename event-emitter
|
|
%global enable_tests 0
|
|
Name: nodejs-event-emitter
|
|
Version: 0.3.4
|
|
Release: 1
|
|
Summary: Environment agnostic event emitter
|
|
License: MIT
|
|
URL: https://github.com/medikoo/event-emitter.git
|
|
Source0: https://registry.npmjs.org/event-emitter/-/event-emitter-%{version}.tgz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging npm(d)
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(tad)
|
|
%endif
|
|
|
|
%description
|
|
Environment agnostic event emitter
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
%nodejs_fixdep d "<=2.0.0"
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
cp -pr package.json *.js \
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
%nodejs_symlink_deps
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%{__nodejs} -e 'require("./")'
|
|
%if 0%{?enable_tests}
|
|
%{__nodejs} %{nodejs_sitelib}/tad/bin/tad
|
|
%else
|
|
echo "Tests are disabled..."
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md CHANGES
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
%changelog
|
|
* Tue Aug 18 2020 leiju <leiju4@huawei.com> - 0.3.4-1
|
|
- Package init
|