nodejs-grunt-legacy-util/nodejs-grunt-legacy-util.spec
2020-12-03 15:41:14 +08:00

57 lines
1.6 KiB
RPMSpec

%global enable_tests 1
Name: nodejs-grunt-legacy-util
Version: 1.0.0
Release: 2
Summary: Deprecated Grunt utils provided for backwards compatibility
License: MIT
URL: https://github.com/gruntjs/grunt-legacy-util
Source0: https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-%{version}.tgz
BuildArch: noarch
Patch0: 0001-Fix-Buffer-warnings-by-switching-to-Buffer.from.patch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(grunt-contrib-nodeunit) npm(temporary) npm(grunt-cli)
BuildRequires: npm(underscore.string) npm(lodash) npm(getobject) npm(exit) npm(which)
BuildRequires: npm(async) npm(hooker)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%patch0 -p1
%nodejs_fixdep async '^1.5.0'
%nodejs_fixdep lodash '^3.10.1'
%nodejs_fixdep underscore.string '~2.3.1'
%nodejs_fixdep which
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/grunt-legacy-util
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/grunt-legacy-util
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
/usr/bin/grunt nodeunit -v
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif
%files
%doc README.md CHANGELOG
%license LICENSE-MIT
%{nodejs_sitelib}/grunt-legacy-util
%changelog
* Fri Sep 18 2020 leiju <leiju4@huawei.com> - 1.0.0-2
- Fix check failure
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 1.0.0-1
- package init