nodejs-grunt-legacy-util/nodejs-grunt-legacy-util.spec

52 lines
1.4 KiB
RPMSpec
Raw Normal View History

2020-08-20 21:34:03 +08:00
%global enable_tests 1
Name: nodejs-grunt-legacy-util
Version: 1.0.0
Release: 1
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
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
%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
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 1.0.0-1
- package init