Blob Blame History Raw
# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}

%global enable_tests 0
%global srcname log-symbols
%global commit ffcc995a1d4efc91ceed3e536fecccc8dc517c76

Name:           nodejs-%{srcname}
Version:        1.0.2
Release:        1%{?dist}
Summary:        Colored symbols for various log levels
License:        MIT
URL:            https://github.com/sindresorhus/log-symbols
Source0:        https://github.com/sindresorhus/%{srcname}/archive/%{commit}/%{srcname}-%{commit}.tar.gz

BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(ava)
%endif


%description
%{summary}.

%prep
%setup -q -n %{srcname}-%{commit}
rm -rf node_modules/
%nodejs_fixdep chalk ^0.x


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr index.js package.json %{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
node test.js
%endif


%files
%doc readme.md
%license license
%{nodejs_sitelib}/%{srcname}


%changelog
* Sun Mar  8 2015 Piotr Popieluch <piotr1212@gmail.com> - 1.0.2-1
- Update to upstream 1.0.2
- Update Source0 to comply with github guidelines

* Wed Dec 31 2014 Piotr Popieluch <piotr1212@gmail.com> - 1.0.1-1
- Initial package