Blame SPECS/nodejs-preserve.spec

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