Blob Blame History Raw
%{?scl:%scl_package nodejs-cmd-shim}
%{!?scl:%global pkg_name %{name}}

%{?nodejs_find_provides_and_requires}

Name:           %{?scl_prefix}nodejs-cmd-shim
Version:        1.1.0
Release:        4.1%{?dist}
Summary:        Used to create executable scripts on Windows and Unix
BuildArch:      noarch
ExclusiveArch: %{nodejs_arches} noarch

Group:          Development/Libraries
License:        BSD
URL:            https://github.com/ForbesLindesay/cmd-shim
Source0:        http://registry.npmjs.org/cmd-shim/-/cmd-shim-%{version}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  %{?scl_prefix}nodejs-devel

#for tests
#BuildRequires:  npm(tap)
#BuildRequires:  npm(mkdirp)
#BuildRequires:  npm(rimraf)

%description
The cmd-shim used in npm to create executable scripts on Windows, since symlinks
are not suitable for this purpose there.

On Unix systems, you should use a symbolic link instead, but this module
supports creating shell script shims also.

%prep
%setup -q -n package

# CRLF -> LF
sed -i 's/\r//g' README.md LICENSE

%build
#nothing to do

%install
rm -rf %buildroot

mkdir -p %{buildroot}%{nodejs_sitelib}/cmd-shim
cp -pr index.js package.json %{buildroot}%{nodejs_sitelib}/cmd-shim

%nodejs_symlink_deps

#%check
#%nodejs_symlink_deps --check
#%tap test/*.js

%clean
rm -rf %buildroot

%files
%defattr(-,root,root,-)
%{nodejs_sitelib}/cmd-shim
%doc README.md LICENSE

%changelog
* Thu Nov 07 2013 Tomas Hrcka <thrcka@redhat.com> - 1.1.0-4.1
- Software collections support

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sat Jun 22 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.0-3
- restrict to compatible arches

* Thu May 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.0-2
- fix EOL encodings

* Thu May 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.1.0-1
- initial package