Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-shelljs
Version:    0.3.0
Release:    4%{?dist}
Summary:    Portable Unix shell commands for Node.js
# The bulk of the project is licensed under BSD license.
# src/cp.js and src/rm.js contain MIT licensed code.
# https://fedorahosted.org/fpc/ticket/413
License:    BSD and MIT
Group:      System Environment/Libraries
URL:        http://github.com/arturadib/shelljs
Source0:    http://registry.npmjs.org/shelljs/-/shelljs-%{version}.tgz
# The test files are not included in the npm tarball.
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:    tests-v%{version}.tar.bz2
Source10:   dl-tests.sh
# Include a copy of the MIT license to comply with license requirements.
Source20:   LICENSE.MIT

Patch0:     %{name}-0.3.0-Do-not-run-jshint-tests.patch

BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:  nodejs-packaging

%description
%{summary}.


%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
%patch0 -p1
cp -p %{SOURCE20} .


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/shelljs
cp -pr package.json global.js make.js shell.js src/ \
    %{buildroot}%{nodejs_sitelib}/shelljs

mkdir -p %{buildroot}%{nodejs_sitelib}/shelljs/bin
install -p -m0755 bin/shjs \
    %{buildroot}%{nodejs_sitelib}/shelljs/bin
mkdir -p %{buildroot}%{_bindir}
ln -sf %{nodejs_sitelib}/shelljs/bin/shjs \
    %{buildroot}%{_bindir}/shjs

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%__nodejs scripts/run-tests
%endif


%files
%doc LICENSE README.md
%{nodejs_sitelib}/shelljs
%{_bindir}/shjs


%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu May 15 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.0-1
- update to upstream release 0.3.0
- fix License tag
- patch out jshint tests
- include copy of the MIT license

* Sat Mar 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.6-1
- initial package