Blame SPECS/nodejs-ps-tree.spec

3a5ed6
%{?scl:%scl_package nodejs-%{npm_name}}
3a5ed6
%{!?scl:%global pkg_name %{name}}
3a5ed6
3a5ed6
%{?nodejs_find_provides_and_requires}
3a5ed6
%global npm_name ps-tree
3a5ed6
3a5ed6
# Disable until dependencies are met
3a5ed6
%global enable_tests 0
3a5ed6
3a5ed6
Summary:       Get all children of a pid.
3a5ed6
Name:          %{?scl_prefix}nodejs-%{npm_name}
3a5ed6
Version:       1.0.1
3a5ed6
Release:       3%{?dist}
3a5ed6
License:       MIT
3a5ed6
URL:           https://github.com/indexzero/ps-tree
3a5ed6
Source0:       http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
3a5ed6
BuildRequires: nodejs010-runtime
3a5ed6
ExclusiveArch: %{nodejs_arches} noarch
3a5ed6
BuildArch:     noarch
3a5ed6
Provides:      %{?scl_prefix}nodejs-%{npm_name} = %{version}
3a5ed6
3a5ed6
%if 0%{?enable_tests}
3a5ed6
BuildRequires:  %{?scl_prefix}npm(chalk)
3a5ed6
BuildRequires:  %{?scl_prefix}npm(istanbul)
3a5ed6
BuildRequires:  %{?scl_prefix}npm(tape)
3a5ed6
%endif
3a5ed6
3a5ed6
%description
3a5ed6
Get all children of a pid.
3a5ed6
3a5ed6
%prep
3a5ed6
%setup -q -n package
3a5ed6
3a5ed6
%nodejs_fixdep event-stream '>= 3.2.0'
3a5ed6
3a5ed6
%build
3a5ed6
3a5ed6
%install
3a5ed6
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
3a5ed6
cp -pr bin index.js package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
3a5ed6
3a5ed6
mkdir -p %{buildroot}%{_bindir}
3a5ed6
ln -sf %{nodejs_sitelib}/%{npm_name}/bin/ps-tree.js %{buildroot}%{_bindir}/ps-tree.js
3a5ed6
3a5ed6
%nodejs_symlink_deps
3a5ed6
3a5ed6
%if 0%{?enable_tests}
3a5ed6
3a5ed6
%check
3a5ed6
%nodejs_symlink_deps --check
3a5ed6
istanbul cover ./node_modules/.bin/tape ./test/test.js ./test/direct.js
3a5ed6
%endif
3a5ed6
3a5ed6
%files
3a5ed6
%doc README.md LICENSE
3a5ed6
%{nodejs_sitelib}/%{npm_name}
3a5ed6
%{_bindir}/ps-tree.js
3a5ed6
3a5ed6
%changelog
3a5ed6
* Wed Jan 06 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.1-3
3a5ed6
- Enable scl macros
3a5ed6
3a5ed6
* Wed Dec 16 2015 Troy Dawson <tdawson@redhat.com> -1.0.1-1
3a5ed6
- Initial package