Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > 35880f851b17bfc0998304ae89222163 > files > 2

nodejs-with-3.0.0-3.mga6.src.rpm

%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-with
Version:    3.0.0
Release:    %mkrel 3
Summary:    Compile time `with` for strict mode JavaScript
License:    MIT
Group:      System/Libraries
URL:        https://github.com/ForbesLindesay/with
Source0:    http://registry.npmjs.org/with/-/with-%{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-%{version}.tar.bz2
Source10:   dl-tests.sh

BuildArch:  noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  mocha
BuildRequires:  uglify-js
%endif

%description
%{summary}.

%prep
%setup -q -n package
find . -type f -exec chmod -x '{}' \;
for i in LICENSE README.md; do
    sed -i -e 's/\r$//' "${i}"
done
%setup -q -T -D -a 1 -n package

%nodejs_fixdep uglify-js '~2.2'


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/with
cp -pr package.json index.js vars.js \
    %{buildroot}%{nodejs_sitelib}/with

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
if [ ! -d node_modules/uglify-js ]; then
    ln -sf /usr/lib/node_modules/uglify-js node_modules/uglify-js
fi
/usr/bin/mocha -R spec
%endif


%files
%doc LICENSE README.md
%{nodejs_sitelib}/with




%changelog
* Sun Nov 15 2015 tv <tv> 3.0.0-3.mga6
+ Revision: 903187
- rebuild with fixed deps

* Tue Dec 09 2014 tv <tv> 3.0.0-2.mga5
+ Revision: 802500
- reenable testsuite

* Wed Oct 29 2014 tv <tv> 3.0.0-1.mga5
+ Revision: 794347
- disable tests for bootstrap
- imported package nodejs-with