Blame SPECS/nodejs-preserve.spec

a89207
%{?scl:%scl_package nodejs-%{npm_name}}
a89207
%{!?scl:%global pkg_name %{name}}
a89207
a89207
%{?nodejs_find_provides_and_requires}
a89207
%global npm_name preserve
a89207
a89207
# Disable until dependencies are met
a89207
%global enable_tests 0
a89207
a89207
Summary:       Temporarily substitute tokens in the given string with placeholders
a89207
Name:          %{?scl_prefix}nodejs-%{npm_name}
a89207
Version:       0.2.0
a89207
Release:       2%{?dist}
a89207
License:       MIT
a89207
URL:           https://github.com/jonschlinkert/preserve
a89207
Source0:       http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
a89207
BuildRequires: nodejs010-runtime
a89207
ExclusiveArch: %{nodejs_arches} noarch
a89207
BuildArch:     noarch
a89207
Provides:      %{?scl_prefix}nodejs-%{npm_name} = %{version}
a89207
a89207
%if 0%{?enable_tests}
a89207
BuildRequires:  %{?scl_prefix}npm(mocha)
a89207
%endif
a89207
a89207
%description
a89207
Temporarily substitute tokens in the given string with placeholders, 
a89207
then put them back after transforming the string.
a89207
a89207
Useful for protecting tokens, like templates in HTML, from being 
a89207
mutated when the string is transformed in some way, 
a89207
like from a formatter/beautifier.
a89207
a89207
%prep
a89207
%setup -q -n package
a89207
a89207
%build
a89207
a89207
%install
a89207
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
a89207
cp -pr index.js package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
a89207
a89207
%nodejs_symlink_deps
a89207
a89207
%if 0%{?enable_tests}
a89207
a89207
%check
a89207
%nodejs_symlink_deps --check
a89207
mocha -R spec
a89207
%endif
a89207
a89207
%files
a89207
%{!?_licensedir:%global license %doc}
a89207
%doc README.md
a89207
%license LICENSE
a89207
%{nodejs_sitelib}/%{npm_name}
a89207
a89207
%changelog
a89207
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 0.2.0-2
a89207
- Enable scl macros, fix license macro for el6
a89207
a89207
* Wed Dec 16 2015 Troy Dawson <tdawson@redhat.com> - 0.2.0-1
a89207
- Initial package