%global modname replace %if ! ( 0%{?fedora} || 0%{?rhel} >= 7 ) %{?nodejs_find_provides_and_requires} %global nodejs_arches %{ix86} x86_64 %{arm} %endif Name: nodejs-%{modname} Version: 0.3.0 Release: 2%{?dist} Summary: Command line search and replace utility using Nodejs License: MIT URL: https://github.com/harthur/replace Source0: http://registry.npmjs.org/%{modname}/-/%{modname}-%{version}.tgz # https://github.com/harthur/replace/issues/42 # LICENSE will be included in the next release Source1: https://raw.githubusercontent.com/harthur/replace/04c99bd9a316341b1732739eda029542f027e5a4/LICENSE BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging BuildRequires: npm(tap) BuildRequires: npm(tape) BuildRequires: npm(nomnom) BuildRequires: npm(colors) BuildRequires: npm(minimatch) %description replace is a command line utility for performing search-and-replace on files. It's similar to sed but there are a few differences: * Modifies files when matches are found * Recursive search on directories with -r * Uses JavaScript syntax for regular expressions and replacement strings. %prep %setup -q -n package cp -p %{SOURCE1} . %nodejs_fixdep nomnom %nodejs_fixdep colors %nodejs_fixdep minimatch %build # nothing to do %check %nodejs_symlink_deps --check tap test %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{modname} cp -pr package.json replace.js defaultignore bin/ \ %{buildroot}%{nodejs_sitelib}/%{modname}/ # Not installing to /usr/bin for now, because search and replace both conflict # with existing packages: # https://github.com/harthur/replace/issues/34 %nodejs_symlink_deps %files %doc README.md LICENSE %{nodejs_sitelib}/%{modname} %changelog * Wed Nov 12 2014 Dan Callaghan - 0.3.0-2 - using LICENSE file committed upstream * Sun Oct 12 2014 Dan Callaghan - 0.3.0-1 - initial version