Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > f8796cfa14181cf3b894a7f8bb95d4fd > files > 3

nodejs-tap-0.4.4-2.mga5.src.rpm

%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:           nodejs-tap
Version:        0.4.4
Release:        %mkrel 2
Summary:        A Test Anything Protocol library

Group:          Development/Tools
License:        MIT
URL:            https://github.com/isaacs/node-tap
Source0:        http://registry.npmjs.org/tap/-/tap-%{version}.tgz
Source1:        macros.nodejs-tap

# the segv test results in SIGSEGV as you would expect, not SIGBUS as is written
# in the test:  https://github.com/isaacs/node-tap/pull/75
# However, in koji it actually results in SIGTERM instead, so we're just going
# to skip the segv test altogether.
Patch1:         nodejs-tap-segv-actually-segfaults.patch
# (tv) fix deps:
Patch2:         relax-req.diff

BuildArch:  noarch
BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
# we need to replicate the dependencies of this package for it to be able to
# test itself
BuildRequires:  npm(inherits) = 1.0.0
BuildRequires:  npm(yamlish)
BuildRequires:  npm(slide)
BuildRequires:  npm(runforcover)
BuildRequires:  npm(nopt)
BuildRequires:  npm(mkdirp)
BuildRequires:  npm(difflet)
BuildRequires:  npm(deep-equal)
BuildRequires:  npm(buffer-equal)
BuildRequires:  npm(glob)
%endif

%description
This is a mix-and-match set of utilities that you can use to write test
harnesses and frameworks that communicate with one another using the
Test Anything Protocol.

%prep
%setup -q -n package
#%%patch1 -p1
%patch2 -p1

%nodejs_fixdep glob 3.2
%nodejs_fixdep inherits 1

#remove bundled modules
rm -rf node_modules

%build
#nothing to do

%install
rm -rf %buildroot

mkdir -p %{buildroot}%{nodejs_sitelib}/tap
cp -pr bin lib package.json %{buildroot}%{nodejs_sitelib}/tap

mkdir -p %{buildroot}%{_bindir}
ln -sf ../lib/node_modules/tap/bin/tap.js %{buildroot}%{_bindir}/tap

#install some macros for use in RPM %%check sections
install -Dpm0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.tap

#make secondary scripts executable
chmod 0755 %{buildroot}%{nodejs_sitelib}/tap/bin/*

%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
# Temporarily disable test/segv.js
rm -f test/segv.js

%nodejs_symlink_deps --check
%__nodejs %{buildroot}%{nodejs_sitelib}/tap/bin/tap.js test/*.js
%endif

%files
%defattr(-,root,root,-)
%{nodejs_sitelib}/tap
%{_bindir}/tap
%{_sysconfdir}/rpm/macros.tap
%doc coverage-example example README.md AUTHORS LICENSE



%changelog
* Wed Oct 29 2014 tv <tv> 0.4.4-2.mga5
+ Revision: 794597
- patch 2: relax deps

* Tue Oct 28 2014 tv <tv> 0.4.4-1.mga5
+ Revision: 793999
- disable tests
- imported package nodejs-tap