Blame SPECS/nodejs-preserve.spec

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