49 lines
1.2 KiB
RPMSpec
49 lines
1.2 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global packagename interpret
|
|
%global enable_tests 1
|
|
Name: nodejs-interpret
|
|
Version: 1.0.1
|
|
Release: 1
|
|
Summary: A dictionary of file extensions and associated module loaders
|
|
License: MIT
|
|
URL: https://github.com/tkellen/node-interpret.git
|
|
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: mocha
|
|
%endif
|
|
%description
|
|
A dictionary of file extensions and associated module loaders.
|
|
|
|
%prep
|
|
%autosetup -n package
|
|
|
|
%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}
|
|
%{_bindir}/echo -e "\e[102m -=#=- No test suite -=#=- \e[0m"
|
|
%else
|
|
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md CHANGELOG
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
%changelog
|
|
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 1.0.1-1
|
|
- Package init
|