|
|
d47b64b |
%{?nodejs_find_provides_and_requires}
|
|
|
d47b64b |
|
|
|
d47b64b |
%global enable_tests 1
|
|
|
d47b64b |
|
|
|
d47b64b |
Name: nodejs-shelljs
|
|
Jared K. Smith |
d4d07af |
Version: 0.7.3
|
|
Jared K. Smith |
d4d07af |
Release: 1%{?dist}
|
|
|
d47b64b |
Summary: Portable Unix shell commands for Node.js
|
|
|
d47b64b |
# The bulk of the project is licensed under BSD license.
|
|
|
d47b64b |
# src/cp.js and src/rm.js contain MIT licensed code.
|
|
|
d47b64b |
# https://fedorahosted.org/fpc/ticket/413
|
|
|
d47b64b |
License: BSD and MIT
|
|
|
d47b64b |
Group: System Environment/Libraries
|
|
|
d47b64b |
URL: http://github.com/arturadib/shelljs
|
|
|
d47b64b |
Source0: http://registry.npmjs.org/shelljs/-/shelljs-%{version}.tgz
|
|
|
d47b64b |
# The test files are not included in the npm tarball.
|
|
|
d47b64b |
# Source1 is generated by running Source10, which pulls from the upstream
|
|
|
d47b64b |
# version control repository.
|
|
Jared K. Smith |
d4d07af |
Source1: tests-%{version}.tar.bz2
|
|
|
d47b64b |
Source10: dl-tests.sh
|
|
|
d47b64b |
|
|
Jared K. Smith |
d4d07af |
# The "shjs.js" test file is failing in mock
|
|
Jared K. Smith |
d4d07af |
# when run from scripts/run-tests.js
|
|
Jared K. Smith |
d4d07af |
#
|
|
Jared K. Smith |
d4d07af |
# So, to make a long story short, we'll patch it out of the
|
|
Jared K. Smith |
d4d07af |
# run-tests.js script
|
|
Jared K. Smith |
d4d07af |
Patch0: nodejs-shelljs_fix-tests.patch
|
|
|
d47b64b |
|
|
|
d47b64b |
BuildArch: noarch
|
|
|
d47b64b |
%if 0%{?fedora} >= 19
|
|
|
d47b64b |
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
d47b64b |
%else
|
|
|
d47b64b |
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
|
d47b64b |
%endif
|
|
|
d47b64b |
|
|
|
d47b64b |
BuildRequires: nodejs-packaging
|
|
Jared K. Smith |
d4d07af |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
d4d07af |
BuildRequires: coffee-script
|
|
Jared K. Smith |
d4d07af |
BuildRequires: npm(glob)
|
|
Jared K. Smith |
d4d07af |
%endif
|
|
|
d47b64b |
|
|
|
d47b64b |
%description
|
|
|
d47b64b |
%{summary}.
|
|
|
d47b64b |
|
|
|
d47b64b |
|
|
|
d47b64b |
%prep
|
|
|
d47b64b |
%setup -q -n package
|
|
|
d47b64b |
%setup -q -T -D -a 1 -n package
|
|
|
d47b64b |
%patch0 -p1
|
|
|
d47b64b |
|
|
Jared K. Smith |
d4d07af |
sed -i '1s/env //' bin/shjs
|
|
Jared K. Smith |
d4d07af |
|
|
Jared K. Smith |
d4d07af |
%nodejs_fixdep glob
|
|
|
d47b64b |
|
|
|
d47b64b |
%build
|
|
|
d47b64b |
#nothing to do
|
|
|
d47b64b |
|
|
|
d47b64b |
|
|
|
d47b64b |
%install
|
|
|
d47b64b |
mkdir -p %{buildroot}%{nodejs_sitelib}/shelljs
|
|
|
d47b64b |
cp -pr package.json global.js make.js shell.js src/ \
|
|
|
d47b64b |
%{buildroot}%{nodejs_sitelib}/shelljs
|
|
|
d47b64b |
|
|
|
d47b64b |
mkdir -p %{buildroot}%{nodejs_sitelib}/shelljs/bin
|
|
|
d47b64b |
install -p -m0755 bin/shjs \
|
|
|
d47b64b |
%{buildroot}%{nodejs_sitelib}/shelljs/bin
|
|
|
d47b64b |
mkdir -p %{buildroot}%{_bindir}
|
|
|
d47b64b |
ln -sf %{nodejs_sitelib}/shelljs/bin/shjs \
|
|
|
d47b64b |
%{buildroot}%{_bindir}/shjs
|
|
|
d47b64b |
|
|
|
d47b64b |
%nodejs_symlink_deps
|
|
|
d47b64b |
|
|
|
d47b64b |
|
|
|
d47b64b |
%check
|
|
|
d47b64b |
%nodejs_symlink_deps --check
|
|
Jared K. Smith |
d4d07af |
%{__nodejs} -e 'require("./")'
|
|
Jared K. Smith |
d4d07af |
%if 0%{?enable_tests}
|
|
|
d47b64b |
%__nodejs scripts/run-tests
|
|
Jared K. Smith |
d4d07af |
%else
|
|
Jared K. Smith |
d4d07af |
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
|
d47b64b |
%endif
|
|
|
d47b64b |
|
|
|
d47b64b |
|
|
|
d47b64b |
%files
|
|
Jared K. Smith |
d4d07af |
%{!?_licensedir:%global license %doc}
|
|
Jared K. Smith |
d4d07af |
%license LICENSE
|
|
Jared K. Smith |
d4d07af |
%doc README.md MAINTAINERS
|
|
|
d47b64b |
%{nodejs_sitelib}/shelljs
|
|
|
d47b64b |
%{_bindir}/shjs
|
|
|
d47b64b |
|
|
|
d47b64b |
|
|
|
d47b64b |
%changelog
|
|
Jared K. Smith |
d4d07af |
* Sat Jul 30 2016 Jared Smith <jsmith@fedoraproject.org> - 0.7.3-1
|
|
Jared K. Smith |
d4d07af |
- Update to upstream 0.7.3 release
|
|
Jared K. Smith |
d4d07af |
|
|
|
aadbb4a |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-5
|
|
|
aadbb4a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
aadbb4a |
|
|
|
7a434bb |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4
|
|
|
7a434bb |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
7a434bb |
|
|
|
4e23c8a |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-3
|
|
|
4e23c8a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
4e23c8a |
|
|
|
a90f8a7 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2
|
|
|
a90f8a7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
a90f8a7 |
|
|
|
d47b64b |
* Thu May 15 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.3.0-1
|
|
|
d47b64b |
- update to upstream release 0.3.0
|
|
|
d47b64b |
- fix License tag
|
|
|
d47b64b |
- patch out jshint tests
|
|
|
d47b64b |
- include copy of the MIT license
|
|
|
d47b64b |
|
|
|
d47b64b |
* Sat Mar 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.6-1
|
|
|
d47b64b |
- initial package
|