45 lines
1.2 KiB
RPMSpec
45 lines
1.2 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global commit 212d7d4b5f049e31d30907ee73ac767329db92e1
|
|
%global enable_tests 1
|
|
Name: nodejs-css-parse
|
|
Version: 1.7.0
|
|
Release: 1
|
|
Summary: A JavaScript CSS parser for Node.js and the browser
|
|
License: MIT
|
|
URL: https://github.com/reworkcss/css-parse
|
|
Source0: https://github.com/reworkcss/css-parse/archive/212d7d4b5f049e31d30907ee73ac767329db92e1/nodejs-css-parse-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(mocha) npm(should)
|
|
%endif
|
|
%description
|
|
%{summary}.
|
|
|
|
%prep
|
|
%setup -q -n css-parse-%{commit}
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/css-parse
|
|
cp -pr package.json index.js \
|
|
%{buildroot}%{nodejs_sitelib}/css-parse
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
/usr/bin/mocha --require should --reporter spec --bail
|
|
%endif
|
|
|
|
%files
|
|
%doc examples/ History.md LICENSE Readme.md
|
|
%{nodejs_sitelib}/css-parse
|
|
|
|
%changelog
|
|
* Mon Aug 17 2020 Anan Fu <fuanan3@huawei.com> - 1.7.0-1
|
|
- package init
|